Introduction: Automatic Plant Watering

Automatic watering station: module will check the humidity of the soil and water the plants when soil is too dry.

For this project you need:

- Arduino (I used Arduino Nano, but any arduino will do)

- Soil humidity sensor + amplifier

- Relay module

- Low pressure water pump (I used one made for aquariums)

- Power sources (5v for arduino + 12v for water pump)

- Cables (to connect everything together)

Step 1: Connect Soil Humidity Sensor to Amplifier

Connect "+" and "-" pins of the amplifier to the pins on the humidity sensor

Step 2: Connect Humidity Sensor Amplifier to Arduino

Connect the pins of the soil humidity sensor amplifier to Arduino:

- Amplifier pin "AO" to Arduino pin "D4"

- Amplifier pin "GND" to Arduino pin "GND"

- Amplifier pin "VCC" to Arduino pin "3v3"

Step 3: Connect 12v Power Source to Water Pump With Relay

Connect the 12v Power source to the water pump through the relay:

- Power source "minus" to "minus" of Water Pump

- Power source "plus" to "COM" on Relay

- Relay "NO" to "plus" of Water Pump

Step 4: Connect Relay to Arduino

Connect Relay pins to Arduino pins:

- Relay pin "+" to Arduino pin "5v"

- Relay pin "-" to Arduino pin "GND"

- Relay pin "s" to Arduino pin "D4"

Step 5: Upload Code to Arduino

- Connect your Arduino to your computer using the USB cable.

- Open Arduino IDE (if you do not have this installed yet, you can download it at:

- Upload code:

void setup() {
 Serial.begin(9600);      // initializes serial communication at 9600 bits per second
  pinMode(4, OUTPUT);      // sets pin for relay in output mode
void loop() {                        
  int sensorValue = analogRead(A0);    // read value of humidity sensor
  Serial.println(sensorValue);         // prints value to serial
  if(sensorValue > 700){               // checks if value is below treshold, treshold is set at 700, but should be costumized for your plants need
    digitalWrite(4, HIGH);             // turns relay on
    delay(1000);                       // waits for 1sec
    digitalWrite(4, LOW);              // turns relay off
    delay(1000);                       // waits for 1sec

Step 6: Test the System

Hook up the power sources for Arduino and Water Pump

- When putting the soil humidity sensor in water: water pump should turn off

- When removing the soil humidity sensor from water: water pump should turn on

Step 7: Install the System in Plant Pot

Plant the soil humidity sensor in the soil and set the incomming end of the Water pump in the water reservoir (big pot) and the outgoing end in the soil.

Enjoy your plants without having to think about watering them again!

Arduino Contest 2019

Participated in the
Arduino Contest 2019