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
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
Module Relay
Transister Resisters
PCB board
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
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>
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>
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]
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(); } }
IF any problem arises contact me through inbox
Kindly give me feed back i like when some one give feedback