My irrigation system control box just died and I'd like to replace it with a smart controller based on a Spark Core programmable board, so I can monitor temperature, soil moisture, humidity, and other parameters and use them to intelligently turn on the sprinklers.

My main issue is power supply. The existing system ran off an old-style bulky transformer putting out 24V AC. This voltage was used to operate the solenoid valves (one at a time) and was also used to power the old control board, through some kind of rectifier and voltage regulator circuit which I haven't really dissected.

Most interesting, the old board used an array of triacs to switch the 24V AC current through the solenoid valves, one triac per valve. They used a GPIO pin straight off the MCU, amplified through a transistor, to trigger the gate of each triac. I'm not sure, but I think this would only work if there's a specific relationship between the DC circuit's GND and the incoming AC.

As far as I can see, my options are:

  1. Develop a similar setup, reusing the old bulky transformer and triacs, building my own rectifier and voltage regulator to power my MCU board. This is a bit beyond my skill level and the risk of blowing stuff up would be non trivial. I also see it as power inefficient, unless I use a switching regulator, otherwise I would be dissipating the drop from 24V to 5V, which for 500mA would amount to 10W.

  2. Keep the old transformer, but use a pre-made switching regulator board to pull 5V DC out of the 24V AC; then use transistors + relays to feed 24V AC to each solenoid valve as needed. This is well within my skill level and quite safe, but would still keep the bulky transformer around.

  3. Find out the right DC voltage for the solenoid valves and run everything on DC at that voltage. Suppose it's 9V, I would only need to drop that to 5V to power my MCU board. Everything would share GND so I could use a simple transistor to switch the 9V to the valves.

I would go with option 3. but I'm wondering whether there are other reasons why an irrigation system would power its valves from AC. Specifically, I know AC is used in wet circuits to avoid corrosion, including "cat whiskers" building up between electrodes. The valves are a closed circuit, so electric corrosion shouldn't be an issue, even if they operate in a moist environment. Can I safely power them from DC?

What do you recommend?


1 Answer 1


#3 is right out. The solenoids are designed for and expect 24VAC. Powering them from DC will probably burn the windings open in short order.

I'd go with #2, and as far as triggering the triacs go, use an optocoupler designed for triggerring triacs. There are many out there, you can even get them in zero-crossing or non-zero crossing varieties. Depending on the load, you might get away with just an opto-coupler triac, without it driving a larger one, but I don't know what kind of load your solenoids are. Vishay makes the VO2223, which is rated for up to 900mA on the load side.

  • \$\begingroup\$ Are you sure? In that other answer they agreed that the only important thing is to choose the right DC voltage. I just made a test and 9V DC seems to be needed (and enough) to make all the solenoids pick up. That's 38% of 24V AC, so it's consistent with what was said there. Unfortunately I don't have an AC Ammeter so I can't compare the two current consumptions. At 9V DC the current is 270mA. They are common irrigation valves, small things. \$\endgroup\$
    – Tobia
    May 11, 2015 at 17:00
  • 1
    \$\begingroup\$ It might work, but generally a solenoid coil is designed to function in one way. It is possible that your solenoids have a diode in them, perhaps, but industrially a DC coil needs DC, and an AC coil needs AC, or they burn out. For that matter, either coil can also burn out if the plunger doesn't actually seat in the coil when energized, but that is more common with AC coils. \$\endgroup\$
    – R Drast
    May 11, 2015 at 17:31

Your Answer

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

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