Difference between revisions of "S14: Smart Planter"
Proj user19 (talk | contribs) (→Design & Implementation) |
Proj user19 (talk | contribs) (→Project Title) |
||
Line 14: | Line 14: | ||
Smart Planter | Smart Planter | ||
[[File:Project Pic.jpg|center|frame|Initial Concept]] | [[File:Project Pic.jpg|center|frame|Initial Concept]] | ||
+ | //Change to current picture | ||
== Abstract == | == Abstract == |
Revision as of 23:13, 20 May 2014
Contents
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
//Change to current picture
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. It will only water the plant if the algorithm determines that the plant needs to be watered to prevent drowning 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, Peripheral Device Hardware Integration, 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 | Write drivers for peripherals and environment | environment complete, peripherals not |
3 | 4/6 | Finish hardware set up, continue peripherals | Hardware complete, peripherals continued |
4 | 4/13 | Finish drivers and FreeRTOS environment | 2/5 drivers complete |
5 | 4/20 | Test and Edit environment | Ongoing testing |
6 | 5/3 | Continue Testing | Ongoing testing |
7 | 5/10 | Final Testing | Ongoing Testing |
8 | 5/17 | Final testing and set up | Current Endeavor |
9 | 5/21 | Demo | Not yet |
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. To have the design function as expected, the team required circuitry to provide the appropriate power to each peripheral as well as the CPU. The Basic System Design, shown in the Figure below, shows how each component will be laid out onto the base board. The LCD, SJSUONE board and prototype board will be set inside a clear box to protect the design from any water spills as well as allow for the user to view the design. The prototype board was used to build the power unit for the system so that there could be a 10V and 5V power line supplied by a 10 DCV wall supply. The water supply includes of a submersible DC water pump that will be sitting at the bottom of the bucket since it is not self-priming and needs to be completely submerged. The silicon tubing will be coming out of the bucket and will be fed to the plant' s soil as a drip system. A single push button was also added to allow the user to check the parameters at any given time in the day while not allowing them to over-water the plant.
The Figure below shows the circuit design for our system. As mentioned above, majority of this of will be enclosed inside the box, to keep it away from water.
Hardware Interface
Each of the peripherals utilized a different type of BUS communication. The soil hygrometer sends voltage through the pegs, measures the resistance between them, a value 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. Two different temperature sensors were utilized in the implementation: the on-board temperature sensor and the DHT22. The on-board temperature sensor utilizes a I2C communication which has two data lines: SDA for the address, acknowledge, and data and SCL for the clock to time the information.
The DHT uses a custom single line communication to send information in between the microcontroller and the device. The
Software Design
The software for the planter used FreeRTOS as a base
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. The temperature/humidity sensor required the majority of the debugging time since it utilizes microsecond-precision in transferring the data. Across the board, the team found that when testing that making a separate project folder just for testing sub-modules made the debugging process more efficient. The team's procedure was to write the drivers for each of the devices with their own test code then one by one start to integrate each one into a main test program. Starting with the hygrometer being placed into the FreeRTOS frame, a button interrupt was integrated. Once this procedure was successful, the temperature sensor's input was added in. This was followed by the integration of the motor pump and lastly the LCD screen. The issues that were encountered along the testing procedure can be seen below:
Temperature Sensor Issues #1
The first issue encountered was in writing the driver for the temperature and humidity sensor. The DHT22 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 has to be very precise or data would be missed. Hours were spent debugging a delay-based version that would hang while waiting for the end of the acknowledge from the
Temperature Sensor Issues #2
While the documentation for the DHT22 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.
Hygrometer Issue #1
Programming the analog signal from the hygrometer sensor required a little research and debugging. 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.
LCD Issue #1
//Sovist Input//
DC Motor Issue #1 =
//Sovist Input//
Protoboard Issue #1
//Adithya Input//
Water container
The plastic water container for the project needed to have two holes drilled in for the silicon tubing and the wires for the DC motor. While the sealing for the silicon tubing held up, the wires produced a small leak, which became a hazard around all of the electronics. The solution for this issue was to add more hot glue whenever a drip was noticed and to seal both sides of the hole for extra support. As a result the container is now successfully sealed.
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.