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.
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.
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
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.
It’s a tight fit to squeeze in all the wires.
Custom circuitry to control 2 types of valves in different ways.