Skip to content
Intermediate 3 hours

Automatic Plant Watering System with Arduino

By Amit1379
July 13, 2026

This project uses a capacitive soil moisture sensor (more durable than resistive sensors) to monitor a plant’s soil. When moisture drops below a set threshold, the Arduino activates a 5 V mini submersible water pump for a few seconds via a transistor or relay. A small LCD or OLED shows the current moisture level and watering status.

What You’ll Need

  • Arduino Uno or Nano
  • Capacitive soil moisture sensor v1.2 (recommended over resistive)
  • 5 V mini submersible water pump + silicone tubing
  • NPN transistor (TIP120 or similar) OR 5 V relay module
  • 1N4007 flyback diode (if using transistor)
  • 1 kΩ base resistor (if using transistor)
  • OLED 0.96″ I2C display (optional)
  • 5 V / 2 A power supply or powered USB hub (pump draws ~200 mA)
  • Small water reservoir (bottle or container)

Step-by-Step Instructions

  1. Test the sensor: Connect sensor VCC to 3.3 V, GND to GND, AOUT to A0. Upload a simple analogRead sketch. Dry soil reads ~800–1023; wet soil reads ~300–400. Note your sensor’s specific dry/wet values.
  2. Wire the pump driver: Connect the TIP120 base through 1 kΩ to Arduino pin 7. TIP120 collector to pump negative, emitter to GND. Connect pump positive to 5 V external supply. Add the flyback diode across the pump terminals (cathode toward positive). Connect the power supply GND to Arduino GND.
  3. Write the control logic: Read moisture every 30 seconds. If reading > dry_threshold (say 700), turn on pin 7 for 3 seconds to water. Log the event timestamp. Include a minimum interval between waterings (e.g. 15 minutes) to prevent over-watering.
  4. Add display: Show moisture percentage (mapped 1023=0% to 300=100%) and last watering time on the OLED.
  5. Test on a plant: Insert sensor 5–8 cm into soil. Run system for 48 hours and adjust threshold and pump duration based on how the plant responds.

Safety Notes

  • Keep all electronics away from the water reservoir — use waterproof connectors or mount electronics above the water level.
  • The flyback diode is essential with an inductive load (the pump motor) — omitting it will damage the transistor and possibly the Arduino.

Tips & Troubleshooting

  • Different plants need different thresholds — succulents want much drier soil than ferns.
  • If pump doesn’t activate, verify the external 5 V supply GND is shared with the Arduino GND.
  • For multi-plant setups, add more sensors and pumps, each on their own transistor and Arduino pin.

Leave a Comment

Your email address will not be published. Required fields are marked *