Arduino Three-Zone Drip Irrigation with Capacitive Soil Sensors and Solenoid Valves
Build a three-zone drip irrigation controller: three soil sensors, each with its own calibration, and three valves that water one bed at a time, take turns and never let a broken bed hog the water.

Your project challenge
Water three beds, one at a time. Turn each sensor into a % with its own two numbers. A bed is dry under 30% and done over 60%. A turn lasts at most 5 seconds, then the next dry bed. Top row: the three %s, like 20% 45% 65%. Bottom row: ZONE 1, 2 or 3, or ALL OK.
Components you’ll use
- Arduino Uno
- Capacitive Soil Moisture Sensor v1.2 × 3
- Relay Module × 3
- 12V Solenoid Water Valve (1/2 inch) × 3
- Battery
- LCD 16x2 Display
What you’ll build
Many Indian farms water their beds from one overhead tank through drip pipes. You will build the controller: three beds, a soil sensor and a valve for each, and one tank.
How it works
Each capacitive sensor gives a high number in dry soil and a low number in wet soil. Every sensor is a little different, so each has its own air and water numbers. Turn each reading into a percent with its own pair. The relays are active LOW: LOW opens that bed’s valve.
The key idea
Keep three of everything in arrays. Water one bed at a time, because the tank cannot push water into all three. Start below 30% and stop above 60%. Give each turn at most 5 seconds, then move to the next dry bed after it.
⚠ Watch out
A bed with a broken pipe never gets wet. Without the time limit, it takes all the water and the other beds dry out.
Make it yours: save each bed’s calibration in EEPROM and add a button to calibrate a new sensor in air and water.
The editor has the wiring guide, the code and the simulator.
Build this project