Intro: Raspberry Pi Plant Watering System
DISCLAIMER: This project has been developed by students/amateurs and has not been tested completely. We accept no responsibility for any damage caused by following this instructable.
This is how you make a raspberry pi assisted watering system for your plant(s). The raspberry pi has a database with settings for the most usual household herbs, and a frontend that you can connect to from your computer. From this front-end, you can edit the info of what plants are connected, how much watering they need, etc.
Step 1: Requirements
To get started you need to acquire some components. Below is a list containing component names and suggestions to where you can buy them.
- Raspberry pi
- 2V025-08 DC12V Solenoid valve http://www.ebay.co.uk/itm/301843613801
- MCP3008 http://www.ebay.co.uk/itm/252014430083
- Breadboard http://www.dx.com/p/830-point-solderless-breadboar...
- Assorted jumper wires http://www.dx.com/p/breadboard-jumper-wires-for-el...
- Analog soil hygrometer http://www.amazon.co.uk/Hygrometer-Moisture-Sensor...
- 8xAA Battery holder http://www.ebay.co.uk/itm/1-2-3-4-6-8-x-AA-AAA-23A...
- 390 Ohm resistor http://www.ebay.co.uk/itm/50-pcs-Through-Hole-Fixe...
- 1N4007 Diode http://www.ebay.co.uk/itm/100x-1A-1000V-DO-41-Diod...
TIP120 NPN Transistor http://www.ebay.co.uk/itm/5-x-TIP120-NPN-Power-Tra...
Step 2: Building a Wooden Framework for the Plant
Even though we were using a plant pot for this project, we still need some framework to hold the raspberry pi, the electrical circuitry, and the water container.
The most important points here is to have somewhere to affix the water container above the plant, and away from the electronics.
For this prototype we built our framework out of simple wood pieces that we bought on the cheap. Feel free to create your own design for the framework. However, if you do want to create a similar framework as ours, follow these steps.
Firstly, pick up the wood and a plastic bottle:
- Two 20x10cm normal wood planks.
- Two 15x10cm normal wood planks.
- Four 15x5cm normal wood planks.
- Three 10cm tall wood sticks (in lack of a better name).
- One 50cm tall wood stick.
- A half liter plastic soda bottle.
- Some industrial purpose tape.
- A quarter inch, elastic, plastic tube.
Next, build the case. You will need a hammer and a handful of nails.
Put together the wooden parts as in the pictures.
Thirdly, cut off the bottom of the plastic bottle with a knife, and attach tape around the edge. Then attach the plastic bottle (bottom side up) to the tall stick with a piece of tape.
Step 3: Connect Valve: Part 1
Step 4: Connect Valve: Part 2
Separate the two shown parts
Step 5: Connect Valve: Part 3
Separate the two parts as shown
Step 6: Connect Valve: Part 4
Note where the 1 and 2 is located on the module. 1 is + and 2 is -
Step 7: Connect Valve: Part 5
Connect a red wire to the backside of the point marked 1 from the last step, and a black wire to the point marked 2.
Secure the wires by tightening the screws.
Step 8: Connect Valve: Part 6
Thread the wires through the housing as shown.
Step 9: Connect Valve: Part 7
Reattach the module in the housing.
Reconnect the housing to the rest of the valve.
Reattach the screw.
The result should be as shown.
Step 10: Wire Up Breadboard
Connect jumper wires and components exactly as shown. Remember that the direction of the components matter. WARNING: Connecting a wire or component incorrectly can be a fire hazard or damage your equipment, do not connect the power source before you are sure that everything is properly connected.
If you are using a different Raspberry Pi from the one in our picture, the same pins that we used are still usable, all the top pins should be the same on newer raspberry pi. If you are unsure you can check the Raspberry Pi pinout at http://pinout.xyz/
Step 11: Adapt the Input to the Valve to Fit the Bottle.
Using industrial tape, expand the rind of the valve to fit the opening of the water bottle. Do this by taping around the input of the valve.
NOTE: When using this method our valve was leaking slightly. So it might be better using thread seal tape instead.
Step 12: Install Software
- Download our preconfigured raspbian image from [Link Here]
- Extract file using for instance 7-Zip (http://www.7-zip.org/)
- Download and install Win32DiskImager (https://sourceforge.net/projects/win32diskimager/)
- Write file from step 2 to sd-card using Win32DiskImager
Step 13: Start Raspberry Pi
- Insert the sd-card into the raspberry pi
- Start the raspberry pi by connecting the power cable
- Connect a network cable from your router to the raspberry pi
- Go to http://raspberrypi.local/ from a computer connected to the same router
NOTE: The watering levels are not properly tested so the results may vary.
Step 14: (Optional) Connect Additional Sensors and Valves
Additional sensors and valves can be connected as shown in the image.
WARNING: This configuration has not been tested
NOTE: The red cable from the battery pack is slightly changed from the original image.
For each additional sensor, connect the yellow wire to the pin one space to the right of the last one.
For each additional valve connect it to the next unused pin on the following list on the raspberry pi.
- 7 (Shown as purple in image)
- 11 (Shown as purple in image)
In this list, 7 corresponds to Pin number 0 in the system and 22 corresponds to Pin number 7