Automatic Garden Watering System BY Arduino, LCD, Buttons, EEPROM, Solenoid Valve, Motor and Underground Sprinkler

About: I love electronics .Arduino automation

Now we are making automatic watering plant

I use .5 KW motor which can operate only one sprinkler at a time

so i use this method

which give me positive result

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Hardware Required

for automation you can add different things i choose Solinoid valve

In this project you will control solidnoid by mobile .

WE will also make it Automatic by timing

if mobile is not present you can also operate with keypad

I also add lcd in the project to see the the present status of Solidnoid switches

hardware required in this project

Android Mobile jumper cables

16 * 2 LCD display

HC-06 Bluetooth Module

Arduino uno or MEGA

Bread Board

10k ohm varible for LCD

Relay Module

For making own relay

Module Relay

Transister Resisters

PCB board

Step 2: Software Required

https://play.google.com/store/apps/details?id=com....

Download this app for automation

it can control 8 relay at a time

Its also have a timer.

To program on arduino use Arduino IDE which is available on

https://www.arduino.cc/en/Main/Software

Step 3: Piping Design

Attach all the solinoid with the pipe in parallel

and attach underground sprinkle in series with solidnoid valve

This digram will help you in pipeing

Step 4: Loading Program Witharduino and Relay Module

in this we only use relay module and arduino

I have 15 minin you can also change

in arduino 1 second is equal to 1000

1 min is equal to 60000

change it according to requirement

<p>int timer = 900000;          <br>int solid[] = { A0, A1, A2, A3 };      
int pinCount = 4;           </p><p>void setup() {
  for (int thisPin = 0; thisPin < pinCount; thisPin++) {
    pinMode(solid[thisPin], OUTPUT);
  }</p><p>for (int thisPin = 0; thisPin < pinCount; thisPin++) {
   
    digitalWrite(solid[thisPin], HIGH);
    delay(timer);
    digitalWrite(solid[thisPin], LOW);</p><p>  }
}
void loop() {
 }</p>

Step 5: Now Adding Start Botton in Arduino

when you press button machine will start at that time

Change the timer setting according to your requirement

1min is equal to 60000 in arduino

change setting according to this

<p>[code]<br>int timer = 5000;          
int solid[] = { A0, A1, A2, A3 };      
int pinCount = 4;           
int sw[]={6};
void setup() {
 
    
for (int thisPin = 0; thisPin < pinCount; thisPin++) {
    pinMode(solid[thisPin], OUTPUT);
  }</p><p> 
  pinMode(sw[0], INPUT);
  digitalWrite(sw[0], HIGH);
  
 }</p><p>void loop() {
  if(digitalRead(sw[0]) == LOW) {
  for (int thisPin = 0; thisPin < pinCount; thisPin++) {
   
    digitalWrite(solid[thisPin], HIGH);
    delay(timer);
    digitalWrite(solid[thisPin], LOW);</p><p>  }  
  }
  }</p><p>[/code]</p>

Step 6: Adding LCD in the Project

NOw i add lcd in the project to see the status of solenoid valve

[code]
#include

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int timer = 1000; int solid[] = { A0, A1, A2, A3 }; int pinCount = 4; int sw[]={6};

void setup() { lcd.begin(16, 2); for (int thisPin = 0; thisPin < pinCount; thisPin++) { pinMode(solid[thisPin], OUTPUT); }

pinMode(sw[0], INPUT); digitalWrite(sw[0], HIGH); }

void loop() { lcd.setCursor(0, 0); lcd.print("M1 OFF"); lcd.setCursor(8, 0); lcd.print("M2 OFF"); lcd.setCursor(0, 1); lcd.print("M3 OFF"); lcd.setCursor(8, 1); lcd.print("M4 OFF"); if(digitalRead(sw[0]) == LOW) { lcd.setCursor(0, 0); lcd.print("M1 ON"); digitalWrite(solid[0], HIGH); delay(timer); digitalWrite(solid[0], LOW); lcd.setCursor(0, 0); lcd.print("M1 OFF"); lcd.setCursor(8, 0); lcd.print("M2 ON"); digitalWrite(solid[1], HIGH); delay(timer); digitalWrite(solid[1], LOW); lcd.setCursor(8, 0); lcd.print("M2 OFF"); lcd.setCursor(0, 1); lcd.print("M3 ON"); digitalWrite(solid[2], HIGH); delay(timer); digitalWrite(solid[2], LOW); lcd.setCursor(0, 1); lcd.print("M3 OFF"); lcd.setCursor(8, 1); lcd.print("M4 ON"); digitalWrite(solid[3], HIGH); delay(timer); digitalWrite(solid[3], LOW); lcd.setCursor(8, 1); lcd.print("M4 OFF"); } }

[/code]

Step 7: Set Time by Using Two Button and EEPROM

Now i add two button to set time

now you can set time by button LCD is present

one button is for time up and is for time down


#include  <LiquidCrystal.h>

#include <EEPROM.h> 

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
         
int solid[] = { A0, A1, A2, A3 };      
int pinCount = 4; 
int sw[]={6};
int st = EEPROM.read(1);           
int swt[] ={7,8};
void setup() {
lcd.begin(16, 2); 
       
for (int thisPin = 0; thisPin < pinCount; thisPin++) {
    pinMode(solid[thisPin], OUTPUT);
  }</p><p> pinMode(sw[0], INPUT);
  digitalWrite(sw[0], HIGH);
  pinMode(swt[0], INPUT);
  digitalWrite(swt[0], HIGH);
   pinMode(swt[1], INPUT);
  digitalWrite(swt[1], HIGH);
  
 }

void loop() {
  int timer = EEPROM.read(1) * 60000;
  lcd.setCursor(0, 0);
    lcd.print("SET Time");
    lcd.setCursor(0, 1);
    lcd.print(st);
    lcd.setCursor(4, 1);
    lcd.print("MINUTES");
    if(digitalRead(swt[0]) == LOW) {
      EEPROM.write(1, st++);
      delay(1000);
      lcd.clear();
    }
    
    if(digitalRead(swt[1]) == LOW) {
      EEPROM.write(1, st--);
      delay(1000);
      lcd.clear();
    }
   
    
    
  if(digitalRead(sw[0]) == LOW) {
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("M1  ON");
    lcd.setCursor(8, 0);
    lcd.print("M2 OFF");
    lcd.setCursor(0, 1);
    lcd.print("M3 OFF");
    lcd.setCursor(8, 1);
    lcd.print("M4 OFF");
   
    digitalWrite(solid[0], HIGH);
    delay(timer);
    digitalWrite(solid[0], LOW);
     lcd.setCursor(0, 0);
    lcd.print("M1 OFF");
     lcd.setCursor(8, 0);
    lcd.print("M2  ON");
    digitalWrite(solid[1], HIGH);
    delay(timer);
    digitalWrite(solid[1], LOW);
    lcd.setCursor(8, 0);
    lcd.print("M2 OFF");
     lcd.setCursor(0, 1);
    lcd.print("M3  ON");
    digitalWrite(solid[2], HIGH);
    delay(timer);
    digitalWrite(solid[2], LOW);
    lcd.setCursor(0, 1);
    lcd.print("M3 OFF");
     lcd.setCursor(8, 1);
    lcd.print("M4  ON");
    digitalWrite(solid[3], HIGH);
    delay(timer);
    digitalWrite(solid[3], LOW);
    lcd.setCursor(8, 1);
    lcd.print("M4 OFF");
    lcd.clear();
  }
}

Step 8: Troubleshooting and Feedback

IF any problem arises contact me through inbox

Kindly give me feed back i like when some one give feedback

Automation Contest 2016

Participated in the
Automation Contest 2016

Outside Contest 2016

Participated in the
Outside Contest 2016

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    14 Discussions

    None
    nico61

    9 months ago

    Grazie a tutti per il vostro aiuto

    None
    nico61

    9 months ago

    sorry, I'm a beginner of Arduino, oh mounted the circuit and loaded the sketch, but gives me the following error, how do I solve it?

    </p><p> pinMode(sw[0], INPUT);


    Immagine.jpg
    None
    ZámbóJ

    1 year ago

    Hi!

    Respekt for this project!!! I intereseting and i trying make this projekt.

    I have one question for you, please help me:

    When i copy the last commands (set time commands) to the ardunio program software, i have one fault: exit status 1: Can't translate for Ardunio/Genuino board.

    What's cause the problem?

    Thank you very much and best regards:

    Zámbó János

    1 reply
    None
    awaiskhawarZámbóJ

    Reply 1 year ago

    in lcd library i use "," instead of "."

    i have corrected kindly check

    Thanks for feed back

    None
    Kenny RobertsonT

    3 years ago

    is this possible that i will use 12v pump because my source is 12v from solar energy. for farmers doesnt have electricity

    2 replies

    Kenny, certainly it is possible to use a 12 VDC pump, but not with those sprinklers. I'm running a similar project with Arduino, but I use drip pipes which require low pressure, thus allowing me to use a 12 VDC pump which provides low pressure.

    None
    Droxz

    3 years ago

    nice instructable, keep up the good work ;)

    1 reply
    None
    jcaroca

    3 years ago

    thanks a lot!!! good work, I was looking long time for this!!!

    Greetings

    1 reply