Plant Watering Kit
This page describes how to build an automated plant watering system. It uses a soil moisture sensor and a water level sensor. It turns on a pump when the soil is too dry and turns on a buzzer when the water level is too low.
- Arduino Uno
- Grove shield
- 12V power supply
- three 20cm cables
- two 40cm cables with power line cut
- red jumper wire
- two 2 foot (about 6cm) sections of vinyl tubing
- Grove button
- Grove relay
- Grove buzzer
- water sensor
- soil moisture sensor
- water container
- potted plant
Prepare your Arduino
- Use the provided screws to attach the Arduino to the base plate.
- Add rubber feet to the base plate.
- Attach the Grove shield to the Arduino. Be sure to line up the pins properly.
- Install the plugin if you haven't already.
- Plug in the Arduino into your computer using a USB cable.
Assemble the Plant Watering System
Wire the pump:
- Connect the black pump wire to the barrel connector negative side.
- Connect the red pump wire to the relay (either side).
- Connect the red jumper wire from the relay (other side) to the barrel connector positive side.
Connect the hoses to the pump:
- The short hose connects to the pump inlet (top of pump; see photo)
- The long hose connects to the pump output (side of pump; see photo)
The water sensor has two ends: one with a circuit board and one without:
The circuit end should be outside the container and non-circuit end near the bottom inside the container. When the water drops below this level, the buzzer will sound. You can bend the wires over the rim of the container. When you have found a good position for the sensor, attach it using foam tape. Make sure the container is clean and dry before attaching the sensor.
Connect the devices to the Arduino:
- Connect the soil moisture sensor to A0 using a long cable.
- Connect the water level sensor to A2 using a long cable.
- Connect the button to D2 using a short cable.
- Connect the relay to D4 using a short cable.
- Connect the buzzer to D6 using a short cable.
Calibration (optional): You can use the Plant Watering Calibration lesson to help you calibrate the threshold values.
Send the code to the Arduino:
Use the Arduino Programmer to send the
PlantWateringprogram to your Arduino.
You can use the
Optionstab to change the thresholds for the water / soil sensors as well as increase or decrease the delay between updates from the sensors. Longer delays will help prevent corrosion, but they'll also increase the ammount of time the pump runs for. This is because the pump only turns on or off when the sensor values change. Depending on your plant and water container sizes you may want to adjust the delay.
You can find more information about the moisture sensors and how the delay affects corrosion here.
Start the system:
Fill the hoses with water. The hoses must be filled before the pump is turned on.
It's fine to temporarily submerge the pump to do this. Submerge the hoses and the pump together and when the hoses are filled with water, place a finger over the hose ends and move them to the plant and water containers (make sure to fill the water container).
Make sure the output hose is going into the plant. (Otherwise you may end up with a small flood.)
- Plug in the power supply. At this point the pump will run if the soil is dry.
Test the system: The button will force the sensor values to update. Otherwise they update every 10 seconds by default to help prevent corrosion.
- If you hold down the button and remove the moisture sensor from the soil, the pump should turn on.
- If you hold down the button and empty the water supply container, the buzzer should turn on.
(You may need to give it a few minutes to dry out.)