Automatic garden watering system BY arduino, LCD, Buttons, EEPROM, solenoid valve, Motor and underground sprinkler


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

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

int timer = 900000;
int solid[] = { A0, A1, A2, A3 }; int pinCount = 4;

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

for (int thisPin = 0; thisPin < pinCount; thisPin++) { digitalWrite(solid[thisPin], HIGH); delay(timer); digitalWrite(solid[thisPin], LOW);

} } void loop() { }

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

[code]
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); }

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

void loop() { if(digitalRead(sw[0]) == LOW) { for (int thisPin = 0; thisPin < pinCount; thisPin++) { digitalWrite(solid[thisPin], HIGH); delay(timer); digitalWrite(solid[thisPin], LOW);

} } }

[/code]

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

[code]
#include

#include

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); }

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(); } }

[/code]

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




Comments

Add a Comment

Sign in to comment.