I have a fairly extensive sprinkler system in which I have used all of the available wires. I've added new landscaping that requires irrigation, but without available wires to use for the valve control, I need to come up with a creative solution (I don't want to dig another 100' of trench). My control box has plenty of available zones, it's just a matter of moving the electrons out to the valves. One thing working in my favor is that these systems only ever power one "zone" at a time.

There are some expensive solutions for multiplexing that use one wire pair (http://www.smarthome.com/3139/DuWa-8ZEXT-Irrigander-8-2-Pro-Irrigation-Sprinkler-System-Zone-Expander/p.aspx) but I think something simpler will work for me.

I want to make a little box that sits on the end of the existing pair of wires and toggles between two or more solenoids each time power is applied to the wire. This will work since the solenoids are normally closed, and only stay open while power is applied. I'll program the controller to hit the same zone twice (or more) to toggle the power to each solenoid in turn.

So, to the electronics question: What do I need to think about to make this work. I'm a rank amateur. I think I need:

  • Some kind of "memory" to know which solenoid to turn on next
  • Relays to route the 24VAC to the right solenoid
  • Parasitic power for whatever logic is needed
  • Copious use of diodes to prevent magic smoke escaping

I'm doing well to get an MSP430 to light LEDs, so some tips on how to make this work would be very greatly appreciated.


6 Answers 6


This isn't too hard to implement. I can see the box and controller getting out of sync, but if the controller hits the zone twice and it doesn't matter what order the two sub-zones come on in, then that seems fine.

You are right in that you need some kind of memory. Since the unit will have no power to it between uses, that memory needs to be non-volatile. A microcontroller with built in EEPROM would do fine. EEPROMs are only good for a finite number of writes, but that's 100s of 1000s at least so no issue there.

When the power to the switch box turns on, all it really does is run the micro. The micro then turns on one of N relays to route the power to one of the sub-zones. It also writes the new state to its EEPROM so that it will power the next sub-zone in sequence next time.

A tiny micro running at slow clock speed can easily handle this. The 5V current will be small so a linear regulator will do well enough and be simple. Get relays that can run directly from the full wave rectified AC so there are no power conversion issues. 24V AC after full wave bridge with filter cap should be around 30-32 Volts. "24V" DC relays would work but get a little warm. Genuine 30V relays may be harder to find, so you could get 24V relays and put a resistor in series with the coil. A reverse catch diode accross the coil and a NPN transistor with base resistor to the micro is all you need per sub-zone output.

Another thing to consider is that the micro needs to see one power up each time the main controller turns on the zone. This should be as simple as putting a little low pass filtering on the micro's reset input so that it doesn't start running until a 100 ms or so after power is applied. By that time glitches and switching transients should be over.

The main controller also needs to leave some off time between powering this zone so that it toggles to the next sub-zone. It will take some time for the voltage to drop before the micro loses power or is shut down by the reset circuit. It could be a second or two depending on what values are chosen.

The more I think about it, the more I'm realizing the trickiest part of this is the reset circuit. You want to make sure the micro runs cleanly once per power up, and that it goes into reset cleanly once on power down and not too long after power down. This is all quite doable, but something that needs to be considered.

  • \$\begingroup\$ Thanks for the food for thought. Reset could be a little tricky, but if I need to make it hit a completely different zone between hits to the multiplexed zone it isn't a big deal. There are 48 zones right now, so interleaving would be okay. On the other hand, tinkering with reset code/conditions is my kind of fun... I'm not 100% clear on the issue with the relays, so clearly I have some research to do there. \$\endgroup\$
    – Lee
    Jul 12, 2011 at 18:38

If your MSP430 experience is C based, you should easily be able to switch to another series. I'm saying this because AVR controllers have EEPROM (the memory you need) on-chip. The EEPROM of the AVR-Tiny13 has 100 000 erase/write cycles, that should be enough for a 100 years. If you use MSP430 you'll have to add the EEPROM externally. This one even has 1 000 000 erase/write cycles.

There's nothing to it, really. Upon power-on the controller checks which valve was last used, selects the next one, stores this and shuts down.

You don't have to worry about the power the controller requires, that's peanuts. The relays will need more.
You have to rectify the 24V AC and use a voltage regulator to get the DC voltage the microcontroller requires. The LM2936 can handle the high input voltage, The 50mA are more than enough for what we need (Feeding a controller and driving a transistor.
The rectified AC voltage will also be used to power the relays. This voltage will be 32V, and there are 36V relays which will operate guaranteed at 32V, but they're rare. Use a power-economical relay like this one. There's a 24V which can handle voltages up to 50V.

I don't see a need for diodes, except as flyback on the relay coils.

Olin rightly points out that the reset circuit needs special attention. If it resets more than once you would skip a sprinkler, so that's not disastrous, but it can be avoided. One way would be to use a low-pass RC filter with a rather long RC time, but microcontrollers often insist on a minimum dV/dT on their reset pin, so that may need something extra. This could be a reset controller like the MAX809. (Use this one from OnSemi, not Maxim's). This will give a nice reset pulse.

  • 1
    \$\begingroup\$ Lots of PICs have built-in EEPROM too. A small 12F can do this job easily. \$\endgroup\$ Jul 12, 2011 at 18:29
  • \$\begingroup\$ I didn't know that about AVRs, I'll have a look (I have more experience in C than I care to remember). What's the best way to get the logic power from the AC? Is there a chip for that? \$\endgroup\$
    – Lee
    Jul 12, 2011 at 18:29
  • \$\begingroup\$ it's pretty simple, just wait a few seconds befrore writing the eeprom, if the power up is a bit flaky it'll be ignored. \$\endgroup\$ Nov 3, 2018 at 9:08

One extreme idea occurs to me...

You have 2 wires going from the controller to the solenoids, yes? Power and ground.

Ok, so you leave the power on all the time - that provides 24v to the remote end.

Then you regulate that down (see 24VAC/5VDC power supply design ) at the remote end. This can then power a µC based circuit at the solenoid end.

Then - and here's the tricky, but interesting bit - you superimpose over the top of the 24VDC power an amplitude modulated serial control signal.

This, when suitably separated out from the 24VDC offset, can be used to send commands from the central control unit to any number of remote units you like - down the same pair of wires. One remote unit could control many local sprinklers, and the wires continue on to another remote unit for more sprinklers...

Not the simplest solution by any means, but certainly in my mind an interesting proposition, and one that would give you effectively an unlimited number of possibilities with your sprinklers.

  • \$\begingroup\$ I think this is what the product ($167) I mention in the question does. Very nifty, but more than I want to spend and/or build. \$\endgroup\$
    – Lee
    Jul 13, 2011 at 0:35
  • \$\begingroup\$ It's more than likely this or some similar system it uses, yes. It would be a fun project, but not for the feint of heart... \$\endgroup\$
    – Majenko
    Jul 13, 2011 at 8:20

If I understand the question you have N wires and more than N zones. If you use one common return, with N wires you can power N-1 zones.

If you divide the wires into go and return wires and connect solenoids between the pairs you can get more zones with no extra wires. Gain depends on wires available.

For say N wires, if you break them up into two groups of M wires and (N-M) wires then you can operate M x (N-M) zones = MN - M^2. The most gain is achieved when you can divide a group into 2 equal parts.

eg With 8 wires you initially get 8-1 = 7 zones.

Dividing 4 + 4 YOU GET 4 X 4 = 16 zones.

Results with various wires =

Wires Old result / New Result

  • With 2 and 3 wires you get no gain.

  • 4 wires: 3 / 4 Gain of 1 = +33%

  • 5 wires: 4 / 6 Gain of 2 = +50%

  • 6 wires: 5 / 6 Gain of 1

  • 7 wires: 6 / 12 = gain of 6 = + 100%

  • 8 wires: 7 / 16 = gain of 9 =~ + 130%

  • 10 wires: 9 / 25 ! ...


  • 20 wires: 19 / 100 !!!

Does this achieve what you are wanting?

Added 17 July 2011:


You say that the solenoids are AC powered. An AC solenoid will be able to be operated by a lower DC voltage, maybe 12 or 15 Volts DC. The manufacturer may provide a DC rating but in any case it will be possible to establish that voltage is appropriate.

When operated on DC two solenoids may be operated via a single wire pair by placing a diode in series with each solenoid so that one will operate when the wires are driven +/- polarity and the other for -/+ polarity. The correct voltage may be achieved by either rectifying and regulating the system AC voltage or by equipping a bridge rectifier and series resistor per driving circuit. The change could be invisible to the controller if desired - the controller may operate N circuits but the solenoids are fed via as few as N/2 pairs. Cost is low and implementation can be quick and easy.

  • \$\begingroup\$ Interesting, but I want to leave the controller end of the system "as is" (other than changing the program to hit the same zone multiple times). \$\endgroup\$
    – Lee
    Jul 12, 2011 at 18:31
  • \$\begingroup\$ The only change at the controller end would be to rearrange what power is connected to - eg just a wiring change. How many wires or pairs do you have now? \$\endgroup\$
    – Russell McMahon
    Jul 12, 2011 at 18:54
  • \$\begingroup\$ it's tricky to multiplex AC devices like this - diodes don't do anything useful. \$\endgroup\$ Nov 3, 2018 at 8:45
  • \$\begingroup\$ @Jasen My matrix multiplication system does not need diodes for AC use. With say 8 wires driving a 4 x 4 X-Y matrix of coils, 4 coils have their "A" side connected to say X1 X2 X3 X4 and all "B" sides connect tp Y1. The next 4 again have connections to X1 X2 X3 X4 but all B sides to Y2, and so on. No diodes. \$\endgroup\$
    – Russell McMahon
    Nov 4, 2018 at 10:45

The DC approach works well. I used two 24VAC DPST relays driven by the two zones I want to control on one wire. The small relays are mounted inside the timer with a remote DC supply. The relays reverse the polarity on the one control wire depending on the zone. The solenoids each have a diode in series to select the solenoid. I found that 12 volts was marginal so I am now using 19 volts. 12 volts will hold the solenoid in but not always pull it in. I may put a resistor in series with each diode to drop the voltage at the solenoid to about 12 volts and then place a capacitor across the resistor to increase the pull in voltage.


So you want a 24VAC alternate acting relay - these are avaialable off the shelf.

eg: https://www.grainger.com/product/DAYTON-Alternating-Relay-6C051


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.