How to Build a Low-Cost Automated Plant Watering System with Arduino
Introduction
An automated plant watering system can help keep your plants healthy and thriving when you are away from home. Building one yourself using an Arduino microcontroller is a fun electronics project that can fit many budgets. In this guide, I will walk through the entire process of constructing a simple automated water pump that waters plants on a schedule.
Components Needed
To build the automated watering system, you will need:
-
Arduino Uno or compatible microcontroller - This serves as the brains of the system. The Arduino will control the water pump and timing.
-
Water pump - This pump will deliver water to the plants. You need one that can plug into a standard wall outlet for power. Submersible pumps work well.
-
Power relay module - The relay module allows the Arduino to switch the pump on and off.
-
Breadboard and jumper wires - Used to easily connect components to the Arduino.
-
Real time clock (RTC) module - Keeps time for the Arduino when it is unplugged.
-
9V battery - Powers the Arduino when not plugged into USB.
-
Resistors - Current limiting resistors for components like the relay module.
-
Tubing, pots, water, etc. - For setting up the plants and pump system.
Circuit Assembly
With the components ready, it's time to assemble the circuit on the breadboard:
-
Connect the RTC module to the Arduino using I2C pins.
-
Connect the relay module to the Arduino's digital pins. Use a resistor on the input side.
-
Connect the 9V battery to power the Arduino when unplugged from USB.
-
Use jumper wires to connect the components neatly.
-
Insert the Arduino and connect to your computer via USB (for now).
Writing the Arduino Code
The Arduino code controls the system by setting the timing for the water pump. Here are the key functions:
-
Include the RTC and relay libraries
-
Initialize the RTC and get the current time
-
Set watering schedule times
-
Check the RTC time against schedule
-
If time matches, turn on relay to activate pump
-
Delay to run the pump for set duration
-
Turn off relay and pump
-
Enter sleep mode until next scheduled time
I used simple if
statements and for
loops for the logic. The full code can be found on GitHub.
Setting Up the Watering Mechanism
With the electronics ready, the watering mechanism needs to be assembled:
-
Place plants that need watering together.
-
Lay down the tubing in the pots and secure.
-
Place the pump in the water reservoir.
-
Connect the pump power cord to the relay module.
-
Make sure water can flow freely from pump to plants.
-
Fill reservoir with enough water to feed the plants as needed.
Completing and Testing the System
To complete the automated plant watering system:
-
Upload the Arduino code.
-
Configure the watering schedule times as desired.
-
Disconnect USB power and connect the 9V battery.
-
Let the system run and observe operation.
-
Refill the reservoir as needed.
-
Adjust the schedule and duration to suit your plants.
Some tweaks may be required but once up and running the system will water your plants automatically! Just be sure to refill the water reservoir periodically.
Conclusion
Building your own automated plant watering system with Arduino is a great electronics project that can be adapted to suit many needs. The key is an Arduino to control the pump, a watering mechanism, and code to turn the pump on and off on a schedule. This provides a simple way to keep plants watered without daily effort.