Introduction: Automatic Garden Watering System BY Arduino, LCD, Buttons, EEPROM, Solenoid Valve, Motor and Underground Sprinkler
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
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
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>
Attachments
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>
Attachments
Step 6: Adding LCD in the Project
NOw i add lcd in the project to see the status of solenoid valve
[code]
#includeLiquidCrystal 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]
Attachments
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

Participated in the
Automation Contest 2016

Participated in the
Outside Contest 2016
20 Comments
1 year ago
Hi !!!
Can you share with us what sprinklers/sprayers you use for this project ???
Question 1 year ago on Step 8
What's your sketch language ?
Question 1 year ago on Step 2
It seems a wrong on wiring diagram between relay and motor
How motor get commands?
Question 2 years ago on Introduction
Hi, thank you for this nice project. I am trying to do it but the app on google is not there anymore. Any ideas where we can get it ?
Also, do you know how to adjust the project if we cannot use wifi but want to plug the Arduino straight through ethernet connection.
Thank you
4 years ago
</p><p> pinMode(sw[0], INPUT);
Reply 2 years ago
}</p><p> pinMode(sw[0], INPUT);
with this :
}
pinMode(sw[0], INPUT);
3 years ago
I am thinking of doing your project but would like to add a small modification. Can you help me?
How could I make the relays activate in sequence? For example, I'd like relay 1 to turn on for one minute and then turn off, so relay 2 would automatically turn on for another minute and then shut down and so on. Thank you.
Question 3 years ago on Step 2
This app is no longer available or the link is broken. Is there another?
Edit: I found the app, it is here:
https://play.google.com/store/apps/details?id=com.smartboardjbr
4 years ago
Grazie a tutti per il vostro aiuto
5 years 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
Reply 5 years ago
in lcd library i use "," instead of "."
i have corrected kindly check
Thanks for feed back
6 years ago
keep it up man voted
Reply 6 years ago
Thanks man
6 years ago
is this possible that i will use 12v pump because my source is 12v from solar energy. for farmers doesnt have electricity
Reply 6 years ago
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.
Reply 6 years ago
Yes possible.
Relays are attached
You can use 12 to 220 v pump as you need
6 years ago
nice instructable, keep up the good work ;)
Reply 6 years ago
Thanks for feedback
6 years ago
thanks a lot!!! good work, I was looking long time for this!!!
Greetings
Reply 6 years ago
Thanks for feedback
I will more try to upgrade