Automatic Plant Watering System Using Arduino

by Thilak B in Circuits > Arduino

682 Views, 6 Favorites, 0 Comments

Automatic Plant Watering System Using Arduino

Automatic-Plant-watering.jpg

Hi Friends,

I Know Many people loves watering plants and maintaining the gardens. but, one of the top concerns for many new or novice gardeners is how often to water their plants and how much and they end up over or under watering the plants. some of them may leave the plants unattended or forget to watering. This project solves that problem by automatically watering plants when needed.

Components Required

arduino.jpg
single channel relay.jpg
soil moisture sensor.jpg
  1. Arduino Uno
  2. Breadboard
  3. NPN transistor
  4. DC motor
  5. Water tube
  6. soil moisture sensor
  7. Water pump
  8. Wires
  9. 5V power supply

Physical Setup

Connect the VCC of the soil moisture sensor to 5V of the Arduino and GND of the sensor to GND of the Arduino and A0 of the soil moisture sensor to A0 of the Arduino. Connect the DC motor to the Arduino and also connect the NPN transistor in between to prevent the board damage. After, place the soil moisture sensor into the soil near your plant. Arduino pin 12 (named as pumpPin in code) is used to turn on and off the transistor. Glue or tape the relay module and the Arduino to a nearby wall prevent corrosion. Place the water container in an accessible place. It should be close enough to the Arduino and relay so the wires can connect to it and also should be easily to refill. Fill the container with water. Put the pump in the water with the inlet facing down. Attach the tube to the outlet and put it facing the plant. With that, the physical setup is done.

Arduino Sketch

arduino.png

int dry = 280;

int pumpPin = 12;

int soilSensor = 8;

void setup()

{

pinMode(12,OUTPUT);

pinMode(8,INPUT);

Serial.begin(9600);

digitalWrite(pumpPin, HIGH);

delay(10000);

}

void loop()

{

int moisture = analogRead(soilSensor);

Serial.println(moisture);

delay(5000);

if (moisture >= dry)

{

Serial.println("Watering starts now..moisture is " + String(moisture));

digitalWrite(pumpPin, LOW);

delay(5000);

digitalWrite(pumpPin, HIGH);

Serial.println("Done watering.");

}

else

{

Serial.println("Moisture is adequate. No watering needed " + String(moisture));

}

}

Working

The soil moisture sensor consists of two leads that are used to measure volume of water content in soil. These leads allow the current to pass through the soil and in return calculates the resistance value to measure the moisture level. If there is more water in soil then soil will conduct more electricity, means less resistance value along with high level of moisture. In the same manner if there is less water in soil then soil will conduct less electricity, means high resistance value along with low level of moisture.

The program in the Arduino reads the moisture value from the sensor every 10 seconds. If the value reaches the threshold value, then it starts the motor pump to supply water to the plant for a fixed period of time whose moisture level is less than the predetermined/ threshold level. then It stops the water pump.

Hope You liked my Instructable and Thank You for Reading

Happy Learning!!!