Sprinkler Controller
Gerry Duprey -- email gerry 'at' rgbled 'dot' org

10 Zone Controller

27 Zone Controller w/pump control

Downloadables
Project Files (source, CAD, docs) (tgz format)
Project Change Log
Serial Control Protocol Descripton
View Project Parts List
Java Sprinkler Configurator
xPL4Java Sprinkler Module


Summary
The Sprinkler controller iwas designed to act as a interface and controller for managing sprinkler system valves (also called zones).  It needs to be used with some sort of automation controller (like HomeVision, StarGate, Ocelot, Crestron, etc) to provide requests for watering at certain times.  What it does is queue up all those requests and then make sure they all happen as expected and protect against anything going wrong.

That may not seem like a lot, but there are very few ways to interface a sprinkler system to any sort of home automation system.  Those that exist either use what I consider to be unreliable protocols (X10), have a very limited number of valves (like 6 or 8), aren't opto-isolated (i.e. just relays, pratically guaranteed to send huge transients into your automation system) or are just expensive (like $250 for 8 zones).

The goals I had in mind when creating this controller were:

What it is
The controller can be built for 1 zone up to 27.  You can choose to include control for a irrigation pump or not as needed.  You can place the controller near where all your sprinkler system wiring is and just run a simple 2 or 3 wire control line from the automation controller to the sprinkler controller.  Your automation controller can choose to just send commands/requests to the sprinkler controller and not read any reports or it can be tightly integrated with the controllers status via queryable reports and automatically triggered reports from the controller.

The controller can be built on a perfboard with wirewrap (for the control/logic portions -- use heavier 16 or 14 gauge wire for the SSR to Valve outputs).  Build only as many valves as you need (maybe add a few for the future).  I was able to assemble my 10 zone controller in about an hour.  The 27 zone controller took almost 3 (it was much denser), but connection is pretty straight-forward from the supplied schematics (in the CAD directory of the distribution).

There are 8 queues available on the controller.  For most simple watering, only a single queue will be open.  For more complex setups or when multiple valves/zones need to be open at the same time, queues are useful.  Each queue has a set of requests and opens and closes valves for those requests independent of the other queues (there are ways to synchronize them, if needed).  This means you can have up to 8 valves open at the same time, if needed.  Again, most folks won't need more than one queue.

The controller firmware is very easy to use via it's fully documented serial protocol.  It's a simple text based protocol at 9600 baud (8 data bits, 1 stop, no parity, no software or hardware flow control).  It provides the ability to send requests to the controller, delete requests, re-order requests within a queue, alter requests (change the # of minutes for a request), pause and resume queues, etc.  If you just want to send requests to the controller and do not need reporting and all the advanced feature, there is a single, simple command (queue a request) to send.

The controller has numerous safeguards to prevent it from ever leaving a valve open due to a controller bug or glitch.  To start with, the code that manages the valves is as short/tight as possible to make it easy to review for bugs (less code == less places for a bug).  There is also a hardware "watchdog" timer that reboots the controller (closing all valves) if the firmware stops talking to it (in case a firmware bug locks it up).  There is also a seperate valve supervisro program that is complete independent of the main queue/valve manager.  It is very short and starts a timer for each valve when open and stops the timer when closed.  If any valve stays open more than a predetermined time (90 minutes, by default, but that is configurable to between 1 and 255 minutes), the supervisor will reboot the controller. There is also a power quality monitor.  If the power becomes unstable, the controller will reboot and stay rebooted until the power returns to normal (some controllers can do funky/bad things in low-voltage conditions  like opening valves and such).

There are timers in the controller to prevent damaging the pump (if there is a pump, many configurations will not need one) or from overloading the valve power supply.   By default, when the last valve closes and the pump stops, a 2 minutes (120 second) timer starts.  If  any request for watering comes in before that 2 minutes is up, it is held until the 2 minutes is over.  This prevents short-cycling the pump (turning it rapidly on and off).  The actual time delay is configurable between 0 and 255 seconds. 

There is also a timer that is used to sequence multiple, simultaneous attemps to open valves.  When using more than one queue, it's possible that two valves (or more) will try to open at the same time.  Opening the valves can take a lot of power and several valves opening at the same time could overload the valve powersupply.  By default, once a valve opens, no other valve will open for 3 seconds.  If 5 valves wanted to open all at the same time, the first would open and the others would hold.  3 seconds later, the second would open and the rest would continue to hold.  3 more seconds later, the thrid would open and the remainder continue to hold and so on. The actual inter-valve delay is configurable with any value between 0 and 255 seconds.

What this is NOT
This is not a "time of day" based controller (i.e. not like a normal sprinkler timer).  Your automation system must provide the actual scheduling of when to water and what to water.  It then sends requests down to the sprinkler controller which manages each request in turn.

Whats Available
Included in the download is the source code for the sprinkler controller firmware as well as precompiled, ready to flash firmware, the CAD files with the schematics, an optional Java based API for managing the controller, a Java based GUI tool for configuring the controller and experimenting with it and an xPL gateway allowing access to the sprinkler controller from anywhere on the local area network (all software includes source).

Support
All support for this project is exclusively provided on the forums at this site.  Please don't sent me email -- I won't respond to it (or will just respond with a form letter directing you to the forums).  Even for things in the store, the amount of margin is almost nil -- covers the product and some of my time.  I could not hope to support folks on a one-on-one basis, but with a forum, many people can help each other out and there is a searchable history of things that can help you solve your own issues quickly.  Beyond providing the forum, I offer absolutely no guarantee you're request for help will be answered.  It probably will be by someone, but it may take a few days or go unanswered.  I'd strongly suggest searching the forums throroughly first and then asking you question in a pleasant and detailed manor.  Posting questions that have been answered before or posting demanding questions will probably get you ignored -- remember you are "borrowing a cup of sugar" -- folks are helping each other out by their own good graces.

Support forums are available at http://www.rgbled.org/forums

Last updated June 13, 2006