tutorials
Automated Soil Moisture Sensing & Plant Watering System with Arduino
Keep potted plants thriving with an automated closed-loop drip irrigation system using capacitive soil moisture sensing and a 5V submersible water pump.
Kunal (Founder & Owner) 1 min read11 Oct 2026

Automated Soil Moisture Sensing & Plant Watering System with Arduino
Under-watering causes wilting; over-watering leads to root rot. This automated drip irrigation system samples capacitive soil moisture levels every hour, activates a miniature submersible 5V water pump when soil falls below dry thresholds, and shuts off automatically once the target saturation is achieved.
1. Parts List
- 1× Arduino Nano / UNO
- 1× Capacitive Soil Moisture Sensor v1.2 (corrosion-resistant)
- 1× 5V Submersible Water Pump with Silicon Tubing
- 1× 5V Relay Module or TIP120 Darlington Transistor
- 1× 1N4007 Flyback Diode (absorbs pump kickback)
- 1× Water reservoir container
2. Arduino Code
cppconst int SENSOR_PIN = A0; const int PUMP_PIN = 7; // Calibrate these values with dry air vs wet soil const int DRY_THRESHOLD = 650; const int WET_THRESHOLD = 380; void setup() { Serial.begin(9600); pinMode(PUMP_PIN, OUTPUT); digitalWrite(PUMP_PIN, HIGH); // Relay off } void loop() { int moisture = analogRead(SENSOR_PIN); Serial.print("Soil Moisture Value: "); Serial.println(moisture); if (moisture > DRY_THRESHOLD) { Serial.println("Soil is Dry! Pumping water..."); digitalWrite(PUMP_PIN, LOW); // Relay ON delay(3000); // Pump for 3 seconds digitalWrite(PUMP_PIN, HIGH);// Relay OFF delay(10000); // Wait for water to seep through } else { Serial.println("Soil moisture is optimal."); delay(5000); } }
Parts used in this tutorial
Buy them in one click — ships from Pune across India.
- Arduino NanoMicrocontrollers₹235.23+ GST
- Relay Module 5V 10A (1-channel)Power & Components₹45.53+ GST
- Solderless 800-pin BreadboardConnectors & Wires₹59.19+ GST
Approx. total ₹339.95 (before GST)Add all to cart
#automation#sensors#gardening#arduino
Found this useful? Tell us what you'd like to read next via our RFQ form.