Garduino – Automatic plant watering system

garduino-automatic-plant-watering-system

During summers, most people are too lazy to water the potted plants every day and plants will eventually wither if people go out on vacation. Here is a simple Automatic plant watering system that can water plants in your absence. It is an Arduino based automatic plant water-feeder system that uses a soil moisture sensor.

This project is about building up a Automatic plant watering system using Arduino to water the plants whenever the soil is dry and pumps ample water to plants.

OBJECTIVE:

  • Senses the water content- by using moisture sensor
  • Activates the motor or pump upon sensing low moisture level(dry) of soil
  • Motor should be on until the moisture sensor gives wet as feedback.and message is sent using GSM module.
  • Stop the motor i.e., OFF after watering plants after getting soil wet.

COMPONENTS REQUIRED:

  1. Arduino
  2. GSM module
  3. Water pumps
  4. Moisture sensors
  5. LCD screen
  6. 2N2222 Transistor
  7. Resistor as Required

SCHEMATIC DIAGRAM OF AUTOMATIC PLANT WATERING SYSTEM:

plant-watering-system-schematic-diagram-arduino

WORKING EXPLANATION:

Moisture sensor  senses the volumetric water content in soil. After inserting a probe into soil for approximately 60 seconds, it starts feeding the controller with some live moisture data. Code was written in such a way that Arduino decides the cutoff level of Dry soil and Wet soil using the data provided by the the sensor.

Once Arduino decides whether the soil was in Wet or Dry condition it will decide either to activate the water pump. If the sensor reading indicates that the soil is dry it will activate a simple DC motor which will pump the water to soil. By this way the moisture in the soil will be maintained indefinitely. A little help, here is an Intructable to build your own water pump using a simple DC motor.

For those who are really worried about your plants. Here is a feature that might delight you. I have added a GSM module which is intended to notify users upon the motor and plat care status. When the moisture sensor senses low moisture content, the motor gets on and the message displays on lcd screen. In addition this message will also be sent to user number which is programmed in the Arduino code.

PROJECT SETUP:

  • Different soils retain moisture level differently so i suggest you to test your soil nature and set the moisture value accordingly.
  • Upload the below code into your Arduino.
  • Fix the moisture sensor into the dry soil where your plants are planted
  • Turn the system ON, you will see the soil moisture in LCD.
  • In my project i have taken 50 as cutoff value for dry soil but if you feel differently about your soil you can change the this cutoff value after testing it.
  • This will be helpful in case if you feel that this automatic plant watering system is feeding plants more/less frequently. Changing the value in line 22 will customize this project as per your requirements

CODE:

#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
float temp;
int SENSE= A0; // Soil Sensor input at Analog PIN A0
int value= 0;
void setup() 
{
Serial.begin(9600);
lcd.begin(16,2);
pinMode(7, OUTPUT);     
Serial.println("SOIL MOISTURE SENSOR");
Serial.println("-----------------------------");
}
void loop() 
{
value= analogRead(A0);
value= value/10;
lcd.setCursor(2,1);
lcd.print(value);
Serial.println(value);
   
if(value>50)
{
digitalWrite(7,HIGH);      
lcd.setCursor(0,0);
lcd.print("motor on");
void SendMessage();
delay(1000);
}
   
else
{       
digitalWrite(7,LOW);     
lcd.setCursor(0,0);
lcd.print("motor off");
void SendMessage2();
}
delay(1000);  
}
 
void SendMessage()
{
Serial.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode 
delay(1000);  // Delay of 1000 milli seconds or 1 second
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("motor on");// The SMS text you want to send
delay(100);
Serial.println((char)26);// ASCII code of CTRL+Z
delay(1000);
}

void SendMessage2()

{
Serial.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode 
delay(1000);  // Delay of 1000 milli seconds or 1 second
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("motor off");// The SMS text you want to send
delay(100);
Serial.println((char)26);// ASCII code of CTRL+Z
delay(1000);
}

GARDUINO AT WORK:
garduino-working-demo

WORKING VIDEO:

 

NOTE:

  • Always take care while powering your project from a battery, it might kill the battery from excess current draw.
  • Consider the current consumption of your project and always have an estimation that how long your project can be powered by your battery.

MAKERS:

inventor-icon

  1. Subrahmanya Harish
  2. Phaninder Reddy
  3. Mahima

 


7 Comments

  1. Godrick

    Thanks sir

    Reply
    1. Frank DonaldFrank Donald

      Welcome hope it helps. Post your observations here for any further help.

      Reply
  2. Godrick

    Not receiving sms from the system

    Reply
    1. Frank DonaldFrank Donald

      Godrick,
      Test the GSM module by sending AT commands to it and check their response via serial terminal. You have to modify the above to code to see their response. Try this below code and see if you are getting response messages from GSM module

      string GSMresponse = 0; // for incoming serial data

      void setup() {
      Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
      }

      void loop() {
      Serial.println(“AT+CMGF=1”); //Sets the GSM Module in Text Mode
      delay(1000);
      if (Serial.available() > 0) {
      // read the incoming byte:
      string GSMresponse = Serial.read();
      Serial.println(GSMresponse);
      while(1);
      }

      Reply
  3. sohom chatterjee

    I couldn,t understand the circuit diagram

    Reply
    1. Frank DonaldFrank Donald

      which part of circuit you are having trouble with ?

      Reply
  4. Soumaya

    Pour le gsm j’utilise le sim900a je ne recevois aucun message

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *