Difference between revisions of "S14: Smart Planter"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Team Members & Responsibilities)
(Objectives & Introduction)
Line 19: Line 19:
  
 
== Objectives & Introduction ==
 
== Objectives & Introduction ==
This system will be achieved using two different types of sensors: the first will be soil hygrometer inserted into the bottom of the planter to detect the amount of water the plant currently possesses in its soil. This will the the highest priority in determining whether the plant needs additional water. The second sensor is a combination humidity and temperature sensor attached to a peg (for security and to keep the wires safe) that will relay the data back to the SJSUONE board. In order to conserve energy, the system will collect data three times a day (8 am, 12 pm, and  4 pm) and determine how much water needs to be added. A real-time clock will be used to determine these times and to not water at night to avoid root-rot. The data will show how fast the plant is consuming verses how hot and humid the environment is and allow for a more customizable calculation. This will be used to calculate how long to turn on the pump in the water reservoir to drip water into the plant. A drip system was chosen because this method has shown it is the most effective in not wasting water as opposed to a spray sprinkler system that loses more water to evaporation. All of the various information will in turn be displayed on an LCD screen for the user to view.
+
This system will be achieved using two different types of sensors: the first will be soil hygrometer inserted into the bottom of the planter to detect the amount of water the plant currently possesses in its soil. This will be the highest priority in determining whether the plant needs additional water. The second sensor is a combination humidity and temperature sensor attached to a peg (for security and to keep the wires safe) that will relay the data back to the SJSUONE board. In order to conserve energy, the system will collect data twice a day (8 am and 12 pm) and determine how much water needs to be added. A real-time clock along with an Alarm timer will be used to determine when to trigger the sensors and collect data. In addition, a push-button is implemented as a alternate way to activate the sensors to check if the plant needs to be watered. The data will show how fast the plant is consuming verses how hot and humid the environment is and allow for a more customizable calculation. This will be used to calculate how long to turn on the pump in the water reservoir to drip water into the plant. A drip system was chosen because this method has shown it is the most effective in not wasting water as opposed to a spray sprinkler system that loses more water to evaporation. Finally, information including the last time checked, whether the plant was watered at this time, and the temperature at this time will be displayed on an LCD screen for the user to view.
  
 
=== Team Members & Responsibilities ===
 
=== Team Members & Responsibilities ===

Revision as of 22:33, 16 May 2014

Grading Criteria

  • How well is Software & Hardware Design described?
  • How well can this report be used to reproduce this project?
  • Code Quality
  • Overall Report Quality:
    • Software Block Diagrams
    • Hardware Block Diagrams
      Schematic Quality
    • Quality of technical challenges and solutions adopted.

Project Title

Smart Planter

Initial Concept

Abstract

Most people just don’t have the time in the day to remember to water a garden and when they do they over-water, wasting resources and hurting the plant. The solution is a system that takes in data on the moisture of the soil, the temperature, and the humidity of the environment and pumps the necessary water accordingly.

Objectives & Introduction

This system will be achieved using two different types of sensors: the first will be soil hygrometer inserted into the bottom of the planter to detect the amount of water the plant currently possesses in its soil. This will be the highest priority in determining whether the plant needs additional water. The second sensor is a combination humidity and temperature sensor attached to a peg (for security and to keep the wires safe) that will relay the data back to the SJSUONE board. In order to conserve energy, the system will collect data twice a day (8 am and 12 pm) and determine how much water needs to be added. A real-time clock along with an Alarm timer will be used to determine when to trigger the sensors and collect data. In addition, a push-button is implemented as a alternate way to activate the sensors to check if the plant needs to be watered. The data will show how fast the plant is consuming verses how hot and humid the environment is and allow for a more customizable calculation. This will be used to calculate how long to turn on the pump in the water reservoir to drip water into the plant. A drip system was chosen because this method has shown it is the most effective in not wasting water as opposed to a spray sprinkler system that loses more water to evaporation. Finally, information including the last time checked, whether the plant was watered at this time, and the temperature at this time will be displayed on an LCD screen for the user to view.

Team Members & Responsibilities

  • Carissa Labriola
    • Driver Development for sensors, Circuit Board Design, Software Layout
  • Sovist Thou
    • LCD Driver Display, DC Motor Control, Physical Layout, Circuit Board Design
  • Leeladithya Avala
    • FreeRTOS Software Design, Physical Layout, Circuit Board Design

Schedule

Week# Date Task Actual
1 3/23 Research and order parts Complete
2 3/30 Test peripherals individually, start writing environment Not yet started
3 4/6 Finish hardware set up Not yet started
4 4/13 Finish drivers and FreeRTOS environment Not yet started
5 4/20 Test and Edit environment Not yet started
6 4/27 Review and consider add-ons Not yet started

Parts List & Cost

Item Description Qty Unit Cost Total Cost Source
1 Hygrometer 1 $6.00 $6.00 http://www.amazon.com/gp/product/B00CKWMLC6/
2 7mm Silicon Tubing 1 $8.00 $8.00 http://www.amazon.com/gp/product/B0094FZCIW/
3 Submersible Water Pump 1 $15.00 $15.00 http://www.amazon.com/gp/product/B007XHZ25G/
4 LCD Screen 1 $25.00 $25.00 New Heaven
5 Plant Pot 1 $2.00 $2.00 Orchard Supple Hardware
6 Water Basin 1 $4.00 $4.00 Target
7 Plant 1 $3.00 $3.00 Trader Joe's
8 Temperature And Humidity Measurement Sensor 1 $7.00 $7.00 http://amzn.com/B00CDHH3WQ
Total $79.00

Design & Implementation

Hardware Design

The hardware for the project is broken down by the needs of the different sensors. The temperature/humidity sensor requires a 1 KOhm resistor between the Vcc pin and the data pin since the sensor is an open collector

Hardware Interface

Each of the peripherals has a different BUS system. The soil hygrometer flows voltage through the pegs, measures the resistance between them which is dependent on the moisture level and translates this information into an analog output. Therefore, the pin is attached to one of the analog to digital pins on the board in order to translate the signal into a number that will determine the appropriate level. The In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.

Software Design

Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.

//place image for initial waveform here

Implementation

//This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation. //

Temperature/Humidity Sensor: The temperature/humidity sensor (officially named the AM2302) utilizes the tri-state properties of the ...

Hygrometer:

DC Motor: The DC motor is a submersible food-grade water pump that is placed at the bottom of the water basin instead of needed to be primed. The output is attached to a silicon tube that then transports the water to the plant. The inputs for the motor are ground and power, which have been placed through a mosfet in order for the microcontroller to be able to control the power through an output GPIO pin. ...

LCD Screen:

Testing & Technical Challenges

For testing this project, each of the sub-modules was completed individually and then compiled together to work in unison.


My Issue #1

The first issue encountered was in writing the driver for the temperature and humidity sensor. The particular device the team purchased works off of a single line for data transfer using the tri-state of an open collector to send start and acknowledge signals back and forth between the microcontroller and the device. The timing for sending the data is down to the microseconds so the driver timing had to be very precise or data would be missed. ...

My Issue #2

While the documentation for the AM2302 temperature sensor says that the minimum voltage level is 3.3V and the board is supposed to output 3.3V, in reality this does not work. This was found to be a combination of the sensor really needing +5V to work properly and the board was found to only output 3.2V (tested using a multimeter). The fix for the issue was to alter the power line portion of the circuitry such that we now have the initial +12V set up to drive the DC motor then a +5V line for the microcontroller and the temperature/humidity sensor to connect to for power.

My Issue #3

The second issue experienced was programming the analog signal from the hygrometer sensor. Since this type of communication had not been experimented with before, it took a few hours completely of research to make sure that all of the correct bits were being set but ultimately this extra time spent double checking all of the inputs meant only a few trials on the board before it worked successfully.

Tips for the future

1) Make a separate project folder just for testing sub-modules. It gets distracting if there is a bunch of code that you are not currently using. 2) Read the manual, copy the comments into your code and integrate the page numbers of where you found that information into your commentary. It will save you a lot of time in the future when you are trying to decide if you bit-masked incorrectly. 3) ...

Conclusion

Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?

Project Video

Upload a video of your project and post the link here.

Project Source Code

Send me your zipped source code and I will upload this to SourceForge and link it for you.

References

Acknowledgement

Any acknowledgement that you may wish to provide can be included here.

References Used

List any references used in project. http://www.adafruit.com/datasheets/Digital%20humidity%20and%20temperature%20sensor%20AM2302.pdf

http://blog.ringerc.id.au/2012/01/using-rht03-aliases-rht-22.html

Appendix

You can list the references you used.