Skip to content

COD nationwide · Isb & Rwp delivery Rs 400

akCircuit
BeginnerHome & safety 2 hours Arduino Uno

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
Automatic plant watering: Your plants will water themselves
From our reel · 6 Dec 2026

Parts list

Everything you need for the automatic plant watering

Every part below is in our catalogue at today's price, so the total is what you pay. Required parts are ticked; optional upgrades are not.

Required parts are ticked. Untick anything you already have; the total updates as you go.

Main parts

Power

Wiring & mounting

Optional upgrades

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
  1. Step 1: The parts

    1The parts

  2. Step 2: Thirsty plant, busy owner

    2Thirsty plant, busy owner

  3. Step 3: Soil sensor in the pot

    3Soil sensor in the pot

  4. Step 4: Connect it to Arduino

    4Connect it to Arduino

  5. Step 5: Add the relay

    5Add the relay

  6. Step 6: Mini pump in water

    6Mini pump in water

  7. Step 7: Tube to the pot

    7Tube to the pot

  8. Step 8: Upload the code

    8Upload the code

  9. Step 9: Dry soil? Relay ON

    9Dry soil? Relay ON

  10. Step 10: Automatic watering!

    10Automatic watering!

  11. Step 11: Plant back to life

    11Plant back to life

  12. Step 12: Never forget watering again

    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

Switch the power off while you wire, and connect every GND together unless the table says otherwise.

Sensor and relay

FromToNote
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)

FromToNote
Battery pack + (red)→ Relay COM
Relay NO→ Pump + (red)
Pump − (black)→ Battery pack − (black)

The code

Ready-to-upload Arduino code

Copy it into the Arduino IDE, change the settings at the top if your build needs it, and upload.
Automatic plant wateringBoard: Arduino Uno
plant_watering.ino
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. 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. 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. 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. 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. 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.

Ask on WhatsApp

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

More projects to build

All projects