Irrigation System with Arduino

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

I have available to this project:

About everything that you'd need.

What do you need help with?

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).

That link you provided has some code that will get you started. It also says this however:

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

Thank you for reply guys.
I was thinking in use the library Arduino Playground - 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:

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 Arduino Playground - Time

Luthius