Pages: [1]   Go Down
Author Topic: Irrigation System with Arduino  (Read 1074 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good  morning

I am a newbie with arduino and I would like your help to develop my programming
I want to water my lawn every night at 09:00PM, but in case if during the day has rained or it is raining at night, my moisture sensor will give signal to Arduino to not switch on my solenoid valves to water my lawn.

One more thing is, I want to use ethernet shield to control manually my system, as an additional feature of this programming where using a cell phone I can switch on/off the irrigation system.

I have available to this project:

01 Arduino Mega
01 Ethernet Shield
02 Soil Moisture Sensors
01 Relay Shield (8 relays)
01 Pump

The moisture sensor is one like this
http://seeedstudio.com/wiki/Grove_-_Moisture_Sensor

Ps.: I bought Arduino Mega and 8 relays shield and Ethernet shield  because I want to automate a lot of things in my house (Lamps, garage door, etc.)
Thank you for your help guys.
Luthius
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 46026
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have available to this project:
About everything that you'd need.

What do you need help with?
Logged

Offline Offline
Edison Member
*
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You'll need an RTC (real time clock). I have used a DS1307 module from sparkfun, together with the excellent Time library (look for it in Playground).

The "start irrigation" and "end irrigation" events can be scheduled with the TimeAlarms companion library (mentioned in Time documentation). Otherwise you can just compare hour() and minute() with the values you provide.

My 2 cents.

PS: since you're using an ethernet module you can also use an NTP server as time source (also mentioned in Time examples).
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 48
Posts: 3402
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That link you provided has some code that will get you started. It also says this however:
Quote
Note:This sensor isn't hardened against contamination or exposure of the control circuitry to water and may be prone to electrolytic corrosion across the probes, so it isn't well suited to being left in place or used outdoors
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for reply guys.
I was thinking in use the library http://playground.arduino.cc/Code/Time where I don’t need an external hardware for the clock and I can use the internet time.

My outputs are:

3 Solenoid Valves  (3 different zones to water)
01 pump (which provides water to my system)

My simplified sketch is something like this:



Code:

myWateringTime=09:00PM
IF ActualTime= myWateringTime  and myMoistureValue<=100 then

Switch On myPUMP
Switch On myZone01
Count 3 minutes

Switch On myZone02
Switch Off myZone01
Count 3 minutes

Switch On myZone03
Switch Off myZone02
Count 3 minutes

Switch Off myPUMP
Switch Off myZone03
ELSE
END IF


How can I develop this my sketch with the proper code using ethernet and the library http://playground.arduino.cc/Code/Time

Luthius
« Last Edit: February 18, 2013, 12:39:21 pm by Luthius » Logged

Pages: [1]   Go Up
Jump to: