
Automatic plant watering
Your plants will water themselves
A soil moisture sensor tells an Arduino when the pot is dry, and a relay switches on a mini water pump for a few seconds. Perfect for travel, busy weeks and school science fairs.
Every required part
Rs 2,237
Parts list
12 items
- Every required part in stock
- Wiring and code included
- Cash on delivery
From our reel · 6 Dec 2026Parts list
Everything you need for the automatic plant watering
Required parts are ticked. Untick anything you already have; the total updates as you go.
Main parts
- Rs 190RequiredCapacitive Soil Moisture Sensor Corrosion Resistant Wide Voltage Wire Analog V2.0
Has no bare metal in the soil, so it does not rust like the cheaper fork-type sensors.
1Rs 190 each - Rs 169Required1 Channel Relay Module
The electronic switch that turns the pump on and off.
1Rs 169 each - Rs 289RequiredBest Mini 5v DC Water Pump/Submersible Pump For Arduino
Sits in a bottle or bucket of water; up to 120 litres an hour.
1Rs 289 each
Power
- Rs 80Required4xaa Battery Holder
Powers the pump separately, so its motor never resets the Arduino.
1Rs 80 each - Rs 240Required1.5V Non Rechargeable Cell AA Cell Camera Cell AA Clock Cell
The pump runs only seconds a day, so they last for months.
4Rs 60 each
Wiring & mounting
- Rs 130RequiredUSB Cable For Arduino Uno Arduino Mega
Uploads the code, then powers the Arduino from a phone charger.
1Rs 130 each - Rs 150Required10cm Pin To Hole Jumper Wire Dupont Line 40 Pin Male To Female Arduino Jumper Wires
Arduino to the relay module.
1Rs 150 each - Rs 150Required10cm Pin To Pin Jumper Wire Dupont Line 40 Pin Male To Male Arduino Jumper Wires
Sensor cable to the Arduino.
1Rs 150 each - Rs 110Optional115mm x 90mm x 53mm ABS Electronics Enclosures Box Project Box
Keeps splashes off the Arduino and relay.
1Rs 110 each
Optional upgrades
- Rs 70OptionalWater Level Sensor Liquid Depth Measuring Module for Arduino
Warn before the water bottle runs dry.
1Rs 70 each
You also need (most homes have these)
- A bottle or bucket of water for the pump
- Phone charger (USB, 5 V)Powers the Arduino all day.
Not in our shop yet
- Silicone or aquarium tube (about 1 m, 5–7 mm inside)Fits the pump outlet and carries water to the pot.
Order on WhatsApp and we will add these to your parcel, or get them from any local shop.
9 items
Rs 2,237
From our reel
Watch it come together in 12 steps
The reel of this build goes live on 6 Dec 2026, 7 pm. Follow us to watch it:
YouTube Instagram Facebook
1The parts

2Thirsty plant, busy owner

3Soil sensor in the pot

4Connect it to Arduino

5Add the relay

6Mini pump in water

7Tube to the pot

8Upload the code

9Dry soil? Relay ON

10Automatic watering!

11Plant back to life

12Never forget watering again
How it works
What each part does
The capacitive sensor in the soil gives a higher number on the Arduino's A0 pin when the soil is dry and a lower one when it is wet.
When the reading goes above the “dry” level you set, the Arduino switches the relay on for 3 seconds. The relay connects the AA battery pack to the pump, which pushes water through the tube into the pot. Then the code waits a minute for the water to soak in before checking again.
Wiring
Connect it pin by pin
Sensor and relay
| From | To | Note |
|---|---|---|
| Soil sensor VCC | → Arduino 5V | |
| Soil sensor GND | → Arduino GND | |
| Soil sensor AOUT | → Arduino A0 | |
| Relay VCC | → Arduino 5V | |
| Relay GND | → Arduino GND | |
| Relay IN | → Arduino D7 |
Pump circuit (separate from the Arduino)
| From | To | Note |
|---|---|---|
| Battery pack + (red) | → Relay COM | |
| Relay NO | → Pump + (red) | |
| Pump − (black) | → Battery pack − (black) |
The code
Ready-to-upload Arduino code
const int SOIL_PIN = A0;
const int RELAY_PIN = 7;
const int RELAY_ON = LOW; // most relay modules switch on with LOW; use HIGH if yours is the opposite
const int RELAY_OFF = !RELAY_ON;
const int DRY = 480; // above this reading the soil counts as dry: calibrate it!
const unsigned long PUMP_MS = 3000; // water for 3 seconds
const unsigned long SOAK_MS = 60000; // then wait 1 minute for the water to soak in
void setup() {
digitalWrite(RELAY_PIN, RELAY_OFF); // keep the pump off while starting
pinMode(RELAY_PIN, OUTPUT);
Serial.begin(9600);
}
void loop() {
int moisture = analogRead(SOIL_PIN);
Serial.println(moisture); // watch these numbers in the Serial Monitor
if (moisture > DRY) {
digitalWrite(RELAY_PIN, RELAY_ON);
delay(PUMP_MS);
digitalWrite(RELAY_PIN, RELAY_OFF);
delay(SOAK_MS);
}
delay(1000);
}Step by step
Build it
- 1
Calibrate the sensor first
Wire only the sensor, upload the code and open the Serial Monitor. Note the reading in dry air (often 500 to 600) and in a glass of water (often 250 to 300). Set DRY halfway between them.
- 2
Wire the relay
Connect the relay's VCC, GND and IN pins as in the table. When the code switches it, you will hear a click and its LED will light.
- 3
Build the pump circuit
Run the AA pack's red wire through the relay's COM and NO screw terminals to the pump's red wire, and join the two black wires. The pump never touches the Arduino's power.
- 4
Fit the tube
Push the tube onto the pump outlet, put the pump in the water bottle, and fix the other end of the tube on the pot's soil.
- 5
Test with dry soil
Push the sensor into dry soil up to its line. The relay should click and the pump should run for 3 seconds, then wait a minute.
Tips & troubleshooting
- If the pump runs when the soil is wet and stops when it is dry, change RELAY_ON from LOW to HIGH.
- Never let the pump run dry: keep it fully under water.
- Keep the sensor's electronics (the top part) out of the soil and away from splashes.
- Start with a short PUMP_MS. You can always water more; you cannot take water back.
Stuck on wiring or code?
Send us a photo of your build on WhatsApp. We are makers too, and we will help you get it working.
FAQ
Questions people ask
Can it water several pots?+
Yes. Split the tube with a T-joint, or add one sensor, relay and pump per pot: the Arduino has six analog inputs.
Can I run the pump from the Arduino's 5 V pin?+
It works for short tests, but the pump's motor can reset the Arduino. The separate AA pack is far more reliable.
Can I use it in a garden with a big pump?+
The same code can switch a bigger 12 V pump through the relay. A mains pump needs a properly rated relay or contactor, fitted by an electrician.
Read next
- Arduino Kya Hai? Arduino Meaning in Urdu, Kaunsa Board Lein aur Pehla ProjectArduino kya hai, is se kya ban sakta hai, Uno, Nano ya Mega mein se kaunsa lein, shuru ke parts aur pehla LED blink project: aasaan Roman Urdu mein, Pakistan ki live qeematon ke sath.
- Arduino Price in Pakistan: Uno, Nano, Mega and Which Version to BuyCurrent Arduino prices in Pakistan for the Uno R3 (SMD and DIP), Uno R4, Nano, Pro Mini, Mega 2560, Leonardo and Due, what the differences mean, and which board to buy for your project.
More projects to build
All projects




















