Automated Irrigation System – Take 1

May, 2011

When I had the house built, I immediately ran into a maintenance problem with the front lawn – the slope of the hill was so steep that I nearly rolled the mower.  So, I killed off all the grass and planted a bunch of English Ivy.  It looks great, but dry summers threaten their life each year.  I attempted to build a make-shift automated sprinkler system using off-the-shelf timers and valves.  It worked well for a while, but we often forgot to turn off the water after/during a rain.  In an effort to further reduce the maintenance requirement, I decided to try to integrate the irrigation control into Watchdog.  There are 3 main parts to this project:  The control software, The soil moisture sensor,  and the water valve control.  This was quite an elaborate electronics project that certainly stretched my skills.

Control Software:

Rather than put additional burden on the Watchdog module, I created a new Irrigation Control module to manage the irrigation system.  This software interfaced with the Arduino over a Serial port connection to get soil moisture readings and used the existing X10 control table I built to control the water valves.  It also leveraged an RSS feed to get information about the temperature and forecasted chance of precipitation.  If there was a chance of precipitation, then the irrigation cycle was automatically cancelled.  Also, if the low temperature was too low, it cancelled the irrigation cycle automatically.  I wrote the software to allow me to easily adjust the start time of the irrigation cycle and the run time of each valve.

Soil Moisture Sensor:

Using what I learned from a Hack-a-Day post, I built a bunch of inexpensive soil moisture probes using Plaster of Paris and a pair of galvanized nails – brilliant!   I ran long wires through the foundation of the house and out into the yard at various points.  I connected the long wires to a custom Arduino platform that I built.  Using the Sparkfun Arduino Prototype shield, I created an opto-isolated control circuit for up to 8 probes.  Opto-isolation was a requirement, because I have had frequent lightning hits by my house and did not want to fry my Watchdog servers.  The relays controlled sending 12V DC power to the sensors one at a time and determining the presence of moisture in the soil by the amount of return current.

Valve Control:

I purchased a Rain8 II – 8-zone irrigation controller that uses X10 to control the open/close of the water valves.  However, I had trouble finding valves that worked with common garden hoses and met the specs of those supported by the Rain8 II device.  So, I gave up on this option.

Next, I purchased some off-the-shelf water timer from Home Depot:  The Orbit 1-Port Single Digital Timer, and the Meinor Automatic 1-Outlet Hose timer.  I cracked the cases and figured out how the circuits inside worked.  For the Orbit, I was able to solder wires onto the leads of the buttons and use a relay to control the device remotely.  For the Meinor, I was able to just cut the wires controlling the water valve and remotely provide the voltage needed to turn on/off the valve.  Both worked well in the lab, but in practice, the Meinor was unreliable.

In order to control these valves, I got another Arduino and another Sparkfun Arduino Prototype shield.  Sparkfun has a nice H-Bridge chip that I was able to use to control the Meinor so I could easily flip the polarity of the current flow to open/close the valve.  I used a small solid state Panasonic 5V relay to control the Orbit valve.  I used JST connectors to let me quickly connect/disconnect the connections to the valves so I could easily bring them in during the winter.


I’ve since replaced the valve control unit from this project, but continue to use the moisture sensor system.  Here is a link to the updated valve control system:  link


227886_224263644267534_2119569_n  The Watchdog module for controling the interface with the soil moisture sensors and water valves.

227955_224263497600882_3715404_n  The Arduino-based soil moisture sensor module.

230317_224263527600879_6571296_n  Top view of the soil moisture sensor module – shows the LED to tell when the power is on, and the screw terms for the sensors.

230489_224263557600876_5403001_n  It’s a tight fit to squeeze in all the wires.

249815_224263597600872_7410876_n  Finished product fully assembled and ready to test.

230287_224263610934204_2236281_n Plaster of Paris soil moisture sensors

225442_224263634267535_2458793_n  Leaving the sensors buried in the soil for 1 year results in erosion, so the probes must be replaced periodically.

DSCN0001  The water valve control interface.

DSCN0002  Custom circuitry to control 2 types of valves in different ways.

DSCN0025  The finished look – I fed the wire through a small hole drilled in the foundation of the house.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s