Smart plant irrigation system
Water plants automatically when the soil gets dry, with thresholds you can tune and a log of watering.
What you'll learn
- โReading analog sensors
- โControlling a pump safely with a relay
- โCalibration and hysteresis
What you'll build
- โReads soil moisture every few seconds
- โPump turns on below a threshold and off above another
- โLCD shows moisture and status
- โManual override button
Step-by-step guide
- 1
Parts
Arduino Uno, capacitive soil moisture sensor (lasts longer than resistive), 5V relay module, small DC pump with its own supply, 16ร2 I2C LCD.
- 2
Wire safely
Power the pump from a separate supply through the relay; share ground with the Arduino; never run mains voltage without supervision.
- 3
Calibrate
Read analogRead values in dry air and in water; map to 0โ100%.
- 4
Control logic
Turn pump ON below 35% and OFF above 55% (two thresholds = hysteresis, so it does not flicker).
- 5
Safety timer
Never run the pump more than 20 seconds at once; wait before checking again.
- 6
Display
Show moisture % and pump state on the LCD with the LiquidCrystal_I2C library.
- 7
Test and document
Log readings over a day, take photos and a short video for your portfolio.
๐ Make it stand out
- +ESP32 + Wi-Fi to see readings on your phone
- +Rain sensor to skip watering
- +Solar power