tony_osp: (Default)
Sunday, October 12th, 2014 07:18 pm
Finally I was able to get back to my Sprinklers project. Over the last few weeks I added Sensors reading capability, as well as got watering logging to pretty much complete stage.

(Sensors_avr is the version of the code I'm working on - it is derived from Sprinklers_pi, but runs on Arduino Mega and has several improvements/extensions I added).

Sensors support in the Sprinklers_avr allows recording various sensors information (temperature, pressure, humidity, waterflow etc) to SD card. Sensors information is stored in CSV files, making it directly usable in Excel and other programs - pretty much any kind of the data processing application can take CSV.

Currently I wired in BMP180 sensor, which monitors temperature and humidity. Once I receive DHT21 sensor I have on order I will add it in. But adding more sensors is relatively easy, since the infrastructure is in place now.

Having sensors telemetry infrastructure allows me to start monitoring soil condition, local weather, actual water consumption etc - making it a lot more useful device.

Also I finished up the work on the logging sub-system, and enabled original Sprinklers_pi watering Graph visualizer. This required some work, since in the original Sprinklers_pi data is stored in SQLite, while in my Arduino Mega version logs data is stored in CSV files on the SD card. Certain things that are done by SQLite (e.g. summaries, grouping etc) had to be done in the code now. But it is all working now:-)

In the process of doing it I fixed few bugs, and now I would consider the code v0.9 - Beta quality. Pretty much all of the intended functionality is in, and it seems to work correctly.

This is my Sprinklers controller:



This is a "dev" version, with only 4 channels of relays attached. For the actual daily use I'm planning to put together a separate box using slightly different hardware.

Updated code is at Github, as usual.


Next steps:

Next major step would be to create "remote" version of the device that would be able to act as wireless (RF) extension of the Sprinklers controller. It is useful for both sensors monitoring, and for operating groups of sprinklers at a far end of the property.

I'm planning to use Xbee RF modules from Digi (already on order), and a simplified low/resource version of Arduino for remote station. There is actually pretty cool board called RBOARD from iteadstudio.com, it is essentially Arduino Uno with 4 relays and Xbee socket onboard. I ordered one of these boards, it seems like a good candidate for remote station.

I was hesitating a bit which RF modules to use. There are cheap options available (e.g. nrf24l01), but if you want decent range (and I need decent range to reach far side of the property) there are not that many options available. And Xbee has big advantage of being (to some degree) future-proof - it uses 802.15.4 wireless protocol and it can work with other 802.15.4 devices. Main drawback of Xbee is the cost, but for a few devices I'm making as a hobby project it is not that big of a deal.

However I will try to write the code in a way to allow any packet-based radio to work.

Just don't know how long would it take me to finish the remote station - right now I'm able to spend maybe one day per month on this hobby project. But on the other hand I'm not in a hurry:-)


tony_osp: (Default)
Tuesday, September 16th, 2014 04:41 pm
I was able to spend a bit more time on this project, and I got my local UI working on Sprinklers_pi code base.

The UI itself is inspired by the OpenSprinkler UI - home screen is identical and animation there is the same. However implementation is rather different, also Local UI functionality changed a lot - now you can use Local UI to control valves etc, in a way somewhat similar to the typical Orbit sprinkler timer. The UI can work with both 3 and 4 buttons.

Also I implemented logging sub-system for Sprinklers_pi on AVR/Arduino. It uses SD card for logs, stores information in CSV files (allowing easy download to Excel), but it is also compatible with the built-in Sprinklers_pi Log view.

The code seems to work (Alpha quality), but was not tested much. The code is available here.

Next steps: Logging sub-system is laying foundation for sensor data collection. I'm planning to add Waterflow, Temperature and Humidity sensors to my setup - this will be the next step.

tony_osp: (Default)
Monday, August 25th, 2014 08:23 pm
As an experiment I ported my local UI to the sprinklers_pi code base.

Sprinklers_pi is an alternative control software, it is intended to run on Rasberry Pi, but it also compiles and runs on the standard Arduino Mega - class hardware. This control software is considerably more sophisticated than the base OpenSprinkler code (at least in comparison with OS 2.0), but unfortunately it does not have any local UI - all display and control is strictly via the WEB browser.

I ported my local UI implementation to the sprinklers_pi code base, and got it working. The code is posted on my Github repository. The base code is indeed pretty good, I like more flexible and comprehensive scheduling capabilities, also the code is self-containing - it does not rely on the rayshobby.net site for HTML. Instead, sprinklers_pi code is serving all necessary pages locally, from an SD card.

Local UI (on the local LCD) makes sprinklers_pi functionally similar, and in many ways a super-set of the original OpenSprinkler code. I'm inclined to stick with sprinklers_pi code as the base since it will be easier to build on.

The only potential problem with the sprinklers_pi code is the license. The code author (Richard Rimmerman) did not include any license with it, but in e-mail conversation he stated that this code is free for personal/non-commercial use, so for my own private experiments it should be fine. But generally I would prefer some form of an OpenSource code and broader contributors base.

I will probably try to write my modules to be fairly independent and portable, to allow easy use of this code on both sprinklers_pi and on OpenSprinkler code base.
tony_osp: (Default)
Sunday, August 17th, 2014 07:38 pm
Finally I was able to get back to work on my OpenSprinkler project.

Just to remind, I'm using a fork of OpenSprinkler 2.0 code, modified to work on the standard Arduino Mega 2560 with the mainstream Ethernet W5100 controller. I did some work/enhancements to that code before, adding SD-based logging and fixing some bugs.

Last weekend I also re-worked local UI in the OpenSprinkler code. The original Open Sprinkler uses fairly basic UI for the local LCD - it is mostly intended to show status and to configure few things (IP address etc). I wanted to add more functional local UI, comparable to the standard Orbit timer controllers - with the ability to start/stop valves, review and modify programs etc. However retrofitting this functionality into the existing OpenSprinkler UI code is rather hard - that code is optimized for space and is not extensible.

To fix it, I re-worked the local UI part of OpenSprinkler code, moving it into a separate class and making it extensible. The work is not fully complete yet, but I have basic local UI working and functional.

The code is available in my Git repository: https://github.com/tony-osp/OpenSprinkler-experiments

Next steps: I need to spend another weekend to finish up Local UI code to implement all features/capabilities I want (e.g. full local config, maybe program review etc) before I can move on to the next major update.

But the next major capability I would like to add is support for monitoring - water metering, temperature and humidity monitoring.

However before I start to work on monitoring, I need to decide whether to continue using existing OpenSprinkler code as the core/base, or maybe to move to the core code by Richard Zimmerman. Richard's code is a totally re-written version of OpenSprinkler designed to work on both Rasberry Pi and on Arduino Mega. Richard's code is much more comprehensive, it has more complete built-in WEB server and slick UI. Big limitation of that code is the lack of the local UI (no support for local LCD and buttons), however now I have this code and I can try to transplant my Local UI into Richard's OS version.

tony_osp: (Default)
Saturday, July 12th, 2014 09:43 pm
Last weekend I got Arduino on 1284p working with Ethernet, SD card (standard W5100 shield) and LCD, this opens the door for moving my experimental Arduino-based OpenSprinkler to 1284p-based hardware, which seriously boosts available RAM.

Getting Ethernet working turned out to be relatively easy thing to do, mostly because I was using Bobuino version of 1284p hardware (from CrossRoads), and Bobuino has pretty good hardware compatibility with the standard Uno. This is important, because Ethernet library is using direct access to AVR ports bypassing pin translation logic, and it is dependent on the correct pin being used for SS.

I had to fix few bugs (one in the Core files and another one in the Ethernet library) to enable it working on 1284p, but it was not too hard.

Once I get complete OpenSprinkler software working on this hardware setup(I just have not tried it yet) I will post updated code on Github.
tony_osp: (Default)
Tuesday, July 8th, 2014 07:55 am
Last weekend I connected another group of 4 zones to the central timer using my voltage converter, and because there was no convenient spot to install the converter right next to the valves I had to use longer cable.

It turned out that Orbit 91592 valve works fine when connected via 45-feet long cable to the voltage converter box. The cable is a standard 18AWG 5-wire irrigation cable, nothing special. Also I found that 18AWG solid copper wires (as used in the sprinkler cable) are quite good for inserting directly into the Orbit valve custom connectors - I just put some electrical tape on the top and it is done.

Resistance of the 18AWG wire for 45 feet is about 0.3 Ohm each way (0.6 ohm total) which is not that high since the voltage I'm using to trigger the valve is 24 volt and there is healthy margin here. It will be interesting to try 100 feet cable, it should work.

This actually increases the appeal of using relays in the irrigation timer instead of thyristors, since these relays can directly drive Orbit DC valves (using the same simple circuit) and in many cases the wire length will be sufficient to directly connect valves to the central timer.
tony_osp: (Default)
Thursday, July 3rd, 2014 07:00 pm
While working on the OpenSprinkler enhancements, I quickly ran into resources limitations of the standard Arduino hardware.
OpenSprinkler has only 4K of RAM (in v2.0, previously it was only 2K!), and even Arduino Mega has only 8K of RAM. It is possible to squeeze in lots of features into this 8K of RAM, but pretty quickly it becomes a struggle for every byte. This is hard, and actually-unnecessary :-)

To raise resources bar on Arduino hardware (first of all - RAM), I started experimenting with AtMega 1284p. 1284p is another chip in the same AtMega family as the rest of Arduino boards, and it is compatible. Although there are no standard/officially blessed 1284p boards, quite a few guys are building 1284p-based Arduino boards and there are updated core files/libraries available.

To try it out I bought a kit from http://www.crossroadsfencing.com/BobuinoRev17/, specifically - this kit:


Arduino on AtMega1284p

It is essentially an Arduino-Uno form-factor board but based on AtMega 1284p. It supports standard Arduino shields, plus it has additional GPIO pins.

I ordered this kit few weeks ago and successfully assembled it yesterday. The board works fine, I can download simple sketches using standard Arduino IDE.

Over the next few weeks I'm planning to experiment more with it, and get OpenSprinkler firmware going on this board. This would require working Ethernet and SD card libraries, as well as LCD and few other standard libs. Let's see how it goes.



An intriguing opportunity is to use standard OpenSprinkler 2.0 hardware with this chip - 1284p is pin-compatible with 644 used in OpenSprinlkler 2.0 hardware. I might experiment with it later on (but right now I don't have original OpenSprinkler hardware).
tony_osp: (Default)
Sunday, June 22nd, 2014 07:13 pm
I successfully mounted all key blocks in a suitable box and have it running. Probably next weekend I will connect it to the sprinkler system and give it a try in a real setup.

My configuration/hardware looks like this:

1. Arduino Mega2560 R3 (sainsmart.com version)
2. Standard Ethernet shield with WizNet5100
3. Large size LCD 1602 (the same as standard 1602 but almost twice bigger - easy to read at a distance)
4. 4-channel Relay module
5. Power supply module (it takes 24VAC and produces adjustable stable DC)
6. Four buttons and power switch
7. Standard 24VAC brick



All this is mounted in a plastic box with clear cover. LCD module is mounted inside the box but is clearly visible through the transparent box cover. All modules are mounted on a piece of FR4 plastic installed inside the box.


Right now I have only one 4-channel relay module installed which allows me to connect 4 zones, however the design allows more channels and the box has space for 3 more relay modules (or a few bigger ones) - it should allow me to have 16 channels controlled by the timer directly.

All together it looks like this:




Some observations/learnings

To my big surprise WizNet 5100 tends to get rather hot when the box is closed. The chip is always quite warm, but in a box it gets rather hot. I ended up gluing small radiator to the chip to ensure it will be stable and reliable on a hot day.

Also I was surprised to see the large-screen 1602 module to draw quite a lot of power - 250 milliamp. When trying to connect it to Arduino Mega onboard power supply it gets pretty hot - this was one of the motivations for installing separate power supply module rather than using common 9V power brick. All this power is required for LCD back-light - spec sheet mentions 240milliamp power. I ended up installing 24VAC->5V DC power module, and I also added resistor to limit LCD back-light current to about 120 milliamp - it produces sufficiently bright back light but is easier on the power supply circuit, to ensure that power module stays cool.

Another big surprise was with control buttons - I installed standard pushbuttons (bought it from Jameco), but then I found out that these buttons are NC (normally closed)! This is quite unusual, I guess I did not check when ordering. Good thing is that I was able to work around it in the code, just changing the button detection logic.

There were also bugs in the firmware (the relay version, obtained here) - the relay control output code was confused with the way how OpenSprinkler handles multiple boards (even inactive extension boards), and with the order of bits vs order of stations. But it was easy to fix.

I was able to run the system for a few days with a basic program configured, and I can see in the log that zones were correctly turned On and Off as programmed.

Next Steps

I'm planning to install this sprinkler timer (together with my 4-channel voltage converter box) to run a section of my irrigation system, to get a feel of how well it works in a real life.

Also I'm planning to enhance firmware a bit - I want to add local (on the device) manual controls, to allow simple on-demand runs (e.g. "start zone 2 and run it for 10min) - this is quite useful for irrigation system tuning/maintenance.

Once this is done I will add more channels to the irrigation timer and install it for daily use.

Future Enhancements/Projects Ideas

I'm planning to put together few enhancements/new things to expand OpenSprinkler capabilities. I would like to add master/slave mode, to allow one OpenSprinkler timer to control several remote modules, connected via RS485 or other suitable link. Also I would like to add sensors (humidity sensor, temperature sensor, water flow counter) to the remote module to track the weather, soil condition and actual water use counters.

Another interesting option to try - I'm planning to experiment with Arduino module based on AtMega 1280p - a more powerful version of MCU, it has less IO than Mega, but RAM is 16KB - double of Mega. This will be helpful in adding all the extra features. Another option to consider is BeagleBone Black.

tony_osp: (Default)
Wednesday, June 18th, 2014 07:16 pm

The next project I’m working on is the OpenSprinkler timer. OpenSprinkler is an open source internet-controlled and internet-connected irrigation timer (http://opensprinkler.com). Initial version of the OpenSprinkler was developed for Arduino; latest versions also support Rasberry Pi and similar controllers.

In the original version OpenSprinkler is controlling irrigation valves using thyristors and 24VAC transformer, this setup should work fine with my voltage converters. Alternative (and quite common) way to implement OpenSprinkler is to use Relay shield – blocks of C type relays with hookup circuitry for direct connection to Arduino or other MCU. I’m actually planning to implement OpenSprinkler this way. Good thing is that when Relay shield is used and irrigation valves are located not too far from the timer, it is possible to implement this circuit directly using the C-type relay in the shield, with no need to have an additional voltage converter (described in my prior post) on the top of it. This could be convenient.

 

OpenSprinkler is an open source hardware and software based on Arduino (Atmel), all schematics and source code is readily available: http://opensprinkler.com. It was designed by Ray Wang and Chris Anderson. You can either build it yourself, or you can purchase a kit (or fully assembled device) from Ray’s online shop.

There is also healthy ecosystem of hobbyists around OpenSprinkler – people are building their own versions, modifying standard firmware, exchanging ideas and help each other. There is good forum at http://rayshobby.net and WiKi.

Hardware Options

There are two main versions of OpenSprinkler available – Arduino and Rasberry Pi. I was hesitating which version to go with, and eventually decided to start with Arduino. Key reason is simplicity of interfacing with all sorts of sensors and other hardware, as well as low power consumption (this will be important for some advanced uses I have in mind). Arduino (especially Mega) has lots of GPIO pins, has mature ecosystem of various sensors etc.
RPi has limited number of GPIO pins so you have to add extra circuitry, pins are low power 3.3V and for some of the hardware (like relay shields) you need to add voltage converters etc OR buy pretty expensive modules. Power consumption of Arduino is also way lower than RPi, and there are lots and lots of shields available – sensors, actuators, relays, low-power wireless etc. – you name it.

Another option could be to use BeagleBone Black – it is a RasberryPi – style micro-machine, but unlike RPi BeagleBone Black has decent set of IO pins and an ecosystem of add-on modules (Capes). However it still consumes way more power than Atmel, and controllers for BeagleBone are much more expensive than Arduino shields. BeagleBone Black may be a good option for the next iteration of my project, but I would like to start with something leaner.

I decided to build my own version of the OpenSprinkler rather than buying a kit. Primary reason is that kits that are being sold are based on Atmega644 which is relatively weak MCU. It is amazing that Ray and Chris managed to squeeze in internet connectivity, web controls and fairly complex processing logic into the tiny controller with only 4 kilobytes of RAM (!), but there is little chance to add any significant new capabilities/features due to the lack of controller resources.

However I would like to add several new things to it, including temperature/humidity sensors, data logger, maybe water flow sensors, weather-based watering control, slave/remote controller boards etc., and I would like to have hardware with sufficient resources to do all that.

Good thing is that it is fairly easy to run OpenSprinkler on a regular off-the-shelf Arduino hardware. For example, this forum thread describes running OpenSprinkler on a standard Arduino Mega hardware, with a standard Ethernet W5100 shield and Freetronics 1602 LCD. It requires firmware modifications, but it is all open sourceJ and updated firmware is readily available.

My Hardware

I started with essentially the same hardware as described in this forum post – Arduino Mega2560 R3, Ethernet W5100 shield and Freetronics 1602 display shield. After one weekend of tinkering I got it all working with almost no modifications – I just moved LCD to a different set of IO pins to enable use of the SD card on the Ethernet shield, and that’s pretty much it.

It is great to see almost 5K RAM left (out of 8K total) available when OpenSprinkler is running – I have plenty of resources to work with. Also Mega has lots of GPIO pins (plus extra serial ports) to connect sensors and devices.

I’m planning to use regular simple Relay shield to control irrigation valves – I can just buy one for a few dollars from Amazon or other shops, and it is way easier than making my own multi-channel thyristors block. Good thing is that due to large number of GPIO on Mega I can connect 16 channels of relays and still will have plenty of IO pins for other uses.

Next Steps

I have basic hardware working. I’m planning to tweak the software a bit (I want to modify basic web server in OpenSprinkler to serve static parts of pages from the SD card), but generally it is good to go. Next step would be to assemble complete OpenSprinkler system in a suitable box with terminal blocks and get it ready for installation.

Update (6-15-14)

Last weekend I was working on the software, and added SD card support for logging and remote (WEB) access to logs. IMO for a system like OpenSprinkler it is essential to be able to have accurate logs to track when watering was happening, and just to ensure that the system is running the way you thought it is running. The code was retrofitted into the original OpenSprinkler (with Freetronics and W5100) and it seems to work OK.

I implemented logging using MicroSD card. The Ethernet shield has MicroSD card slot, and it was just a matter of adding logging functionality to the firmware. I implemented basic text file-based logging using standard SD library, it seems to work OK. In order to retrieve logs remotely I extended OpenSprinkler web server with the ability to produce web listing of log files (basically all files in /logs directory) and the ability to retrieve individual log files. It took some additional space in flash (mostly for SD card library) and it consumes about 1300 bytes of RAM extra – also mostly for SD card library. I still have about 3700 bytes of RAM free and plenty of flash space.

Alternative Firmware

There is also alternative OpenSprinkler firmware from Richard Zimmerman. This firmware is totally different, essentially rewritten from scratch, it is designed to run on RPi or on Arduino Mega. The firmware is much more advanced, with a built-in WEB server (working off MicroSD card) and slick WEB UI.

I got this firmware compiled and working on my setup as well. As the base for future work this firmware has certain advantages – much better code quality, advanced web server, logging, Weather support. However there are also disadvantages – this firmware does not support any local UI (no LCD or keys support) – which IMO is pretty important, also WEB UI in this firmware is designed for small-screen, phone operation and it looks funny on a regular screen.

I can probably rewrite the UI and I can add local LCD/buttons support, but it takes effort, also this firmware version is already kind of low on RAM and I’m afraid with addition of the local UI (LCD/buttons) I will be tight on RAM for adding more features. But it is an option.

I think I will experiment with both firmware versions and will decide which one to go with based on real-life usage experience.

tony_osp: (Default)
Sunday, June 8th, 2014 07:19 pm

The Problem

Setting up comprehensive irrigation system is not easy and could be pretty expensive – you need to dig trenches and run water pipes, run irrigation cables and install control valves. It is not cheap even for a relatively short runs, but when you need to water sections of the property that are 200-300-400 feet away it could become really expensive.

I have a small-size regular irrigation system at my property that covers area near the house – 4 zones with a common timer, however this system is not enough. I wanted to expand the system to add more zones with drip irrigation and few sprinklers, but it would be fairly complicated and expensive – need to dig trenches, run pipes etc. As many others I went with a simplest option and just run few good quality garden hoses to connect drip irrigation sections and sprinklers, and setup Orbit battery-operated timer that connects to a regular garden hose.

The Orbit timer I used is a four-channel model – one timer controls 4 valves, all connected to a regular garden hose. This allows me to run 4 additional irrigation zones using one Orbit timer.

Over time my irrigation system grew in size, and I added few more sections with additional battery-operated Orbit timers, all connected with garden hoses.

This setup works surprisingly well – I’m using it for over 9 years now and it proved to be quite effective. Upfront costs are fairly low – 4 valves + timer + 4-way water splitter costs under $75 (in the local Home Depot), plus some money for good quality garden hoses, plus drip irrigation part and sprinklers. Running costs are also fairly low – every year I need to fix few cracked drip irrigation emitters, sometimes need to change a valve or two, plus hoses eventually wear out – although several of the hoses I bought 9 years ago are still working fine. All-up it turned out to be fairly good and cost-effective way to do watering without breaking the bank.

The only significant problem I noticed over the years is the inconvenience of setting and changing irrigation schedules – since the schedule is individually set on each 4-channel irrigation controller I must walk over to each controller to program it, I must ensure that the clock on each controller is set correctly, and that irrigation schedules don’t overlap – since running more than one zone (set of sprinklers) at a time will not work – not enough water flow.

Also I cannot really change my irrigation schedule depending on weather – it will be too cumbersome to adjust the watering schedule across multiple timers, so usually I don’t bother changing it much – which leads to overwatering and under-watering.

 

Central Timer

While walking around programming my irrigation controllers I was thinking – wouldn’t it be great if I can program all schedules centrally, using common irrigation timer?

I already have regular multi-channel watering timer (the one that drives 4 zones near the house), it will be great if I can connect all my irrigation valves to it and just program it all from one place. It would also allow me to attach rain sensor and/or use other advanced options for automatically adjusting watering times based on weather.

This is essentially what you get with a regular fully wired irrigation system – all valves are controlled from the central timer, lots of advanced options and flexibility etc. However I don’t want to spend big on digging trenches and installing full-blown irrigation system.

 

Voltage Converter Option

In theory it is possible to connect all my irrigation setup to a central timer if I install blocks of regular 24VAC control valves but connect them to a regular irrigation hoses. I looked into this option, but it becomes complicated and cumbersome – regular 24VAC valves are designed for plastic ¾” or 1” pipe connectors, and I will have to install size and thread converters for every connection. Also regular 24VAC valves are designed for underground installation and are relatively big/tall, so I will have to dig holes to install blocks of valves underground to hide them out of sight. Plus I will have to buy all new valves – while I already have Orbit battery-operated valves installed and running.

Another option is to somehow connect these Orbit 91592 valves to a regular 24VAC irrigation timer – in this case I can use all the existing valves and water distribution system I have in place, and can just run irrigation cable from the central timer to these valves. This is the option I ended up implementing.

Orbit 91592 Valve

The Orbit 91592 Valve used with these battery-operated timers is a relatively simple thing – it has two wires and it is operated by DC pulse. This is a latching type of valve – voltage pulse opens it, and opposite polarity pulse closes the valve. Unlike regular 24VAC irrigation valve no current is required to keep the valve in open position.

http://i.ebayimg.com/00/s/NDAwWDM1Mw==/z/kuUAAMXQ1ZhTe3vp/$_35.JPG

I found some information on voltage and DC pulse characteristics for this valve on the internet, I can recommend this excellent blog: http://rayshobby.blogspot.com/2010/06/minty-water-valve-controller.html

Essentially the valve is operated by discharging 2200uF capacitor, charged to 24V. Positive pulse opens the valve, negative pulse closes the valve. Ray (in the article linked above) wanted to control this valve using Arduino MCU running off a battery, and he put together a special circuit for it with step-up voltage converter to get 24V while running on battery, H-bridge etc. My problem is a lot simpler and somewhat different, since I would like to connect this valve to a regular 24VAC irrigation timer that supplies 24VAC to each channel when it wants to open the valve, and removes the voltage to close the valve.

After thinking through it I came up with a simple “low tech” way of doing it – using relay.

Orbit 91592 irrigation valve

The relay is an AC 24V relay – it is directly connected to the irrigation timer. When the relay is triggered, the valve is connected to the 24V DC via capacitor C1, this generates current pulse of charging the capacitor, and this pulse opens the valve. While the relay is energized the capacitor is connected to 24V DC via the irrigation valve and is kept charged. When the relay is turned off, the same capacitor is connected to the ground and discharges through the irrigation valve creating negative voltage pulse, closing the valve.

This circuit is amazingly simple, but effective. It is cheap, easy to put together, and it is also inherently safe with regards to turning off water if power is lost or the irrigation timer fails.

This is actually pretty important – I need to make sure that the water will not be left running if power is lost or something else happens with the control wire/timer. Regular 24VAC irrigation valves don’t have this problem because as soon as the control current disappears the valve closes, but Orbit DC valves are of a latching type and they will stay open until the closing pulse is delivered. The circuit above solves this problem by automatically generating this closing DC pulse as soon as control voltage is removed, mimicking behavior of a regular 24VAC irrigation valve.

The 24V DC power required for this circuit can be readily obtained from the 24VAC available at the irrigation timer using simple rectifier. I also added voltage step-down circuit to limit the voltage to 24V.

Single channel

R1 helps to limit maximum current via LM7824, also it helps to make the current pulse wider. Because current goes through the system only for a brief moment when capacitors are charged and the rest of the time current is zero, no heat sink is required.

I assembled a four-channel version of this circuit in a suitable weatherproof box installed near the irrigation valves. Because on the valve side opening/closing current can be quite substantial (although short), it is preferable to limit the wire length between the voltage converter and the valve. Because of that I mounted the voltage converter closer to the valve rather than on the timer side of the cable. Wire length of 15 feet between the converter and the valve seems to work fine, but I would not want to increase it too much.

The cable between the timer and the converter can be as long as required, the system is actually pretty tolerant to the voltage drop and long cable on that leg because 24VAC relays consume less current than a regular irrigation valve and are tolerant to the long cable resistance. Actual irrigation valves in this design are running off stabilized 24V voltage (and mostly off capacitors), and there is no problem with long cable run from the power source (24VAC).


I’m planning to assemble few more of these converter boxes to replace battery operated timers I have.