As evidenced by several previous questions of mine, I'm working a project to design a sprinkler controller. This involves driving one of 16 solenoids (well, probably only one at a time...) based on a schedule. I have the microcontroller sorted out, and the software is just about finished up.

As reference, the solenoids I'm driving are generally between 300mA and 500mA inrush current, and 200mA and 400mA holding current. They're driven at 24VAC.

My initial hardware design involved a set of SSRs, of this Sharp variety. They're non-zero-crossing type optoisolated triac-output SSRs. I've tested the solenoids with these, and they seem to work well. The datasheet shows a protection diode (which is probably overkill) and a snubber circuit (to be used especially when driving inductive loads), but I gleefully ignored that advice, and I haven't seen any ill effects yet.

Because I'm curious, I took a peek inside a couple of commercial controllers. Inside, I saw nothing that looked to me like my SSRs. One of them had what seemed to be a set of TO-220 size triacs. I couldn't see what other componentry surrounded the triacs.

My question is, what would a professional use to drive these solenoids? Are the SSRs overkill in this application? Would it be simpler and cheaper to just use logic-level triacs directly? Is my lack of a snubber circuit going to come back and bite me eventually by destroying the SSR, the solenoid, the MCU, or my entire neighborhood in a flaming fireball of death?


To all those suggesting DC solenoids, please don't. Commercial sprinkler systems use AC solenoids. That's just the way it is. I will not be using DC solenoids, because Home Depot, Lowes, and others don't sell DC sprinkler valves. Such a thing (to my knowledge) doesn't exist, at least not in markets where the average home user would be.

To be absolutely clear

I'm not asking for a list of possible ways to drive solenoids. I can imagine a lot, and there are lots more available out there. I'm asking how this sort of thing is done professionaly, i.e. how it's done when designing for cost, robustness, and mass-producability.

  • \$\begingroup\$ I think comercial units avoid SSR for the very reason you stated.. its cheaper.. producing thousands at a cheaper price.. but keeping the same market price = more profit. But- I like your SSR much better because it seems like it is not prone to failure.. and some times people prefer brand power associated with quality rather than cheap generic Chinese stuff for a few dollars cheaper. I bet you could gurantee your device easily for 2-4 years! Others wont. \$\endgroup\$ – Piotr Kula Apr 17 '12 at 16:07
  • \$\begingroup\$ @ppumkin is there a valid reason to go with the SSR? What benefit does it provide? At the end of the day, it's the same TRIAC, just driven via an LED (that can fade and fail) instead of directly. \$\endgroup\$ – Mark Apr 17 '12 at 16:09
  • \$\begingroup\$ Yea I suppose you are correct, there is no benefit in your application. In my opinion SSR just seem better to use with AC switching but they are really used for high speed switching. I suppose a TRIAC is fine as it is commercially proven to work well with AC controlling \$\endgroup\$ – Piotr Kula Apr 17 '12 at 16:19
  • 1
    \$\begingroup\$ @ppumkin I agree completely on the SSR, and that's why I used it initially. In this application, however, I wonder whether it's overkill, especially when the devices are significantly larger and 3-4 times more expensive. \$\endgroup\$ – Mark Apr 17 '12 at 16:22
  • \$\begingroup\$ If a solenoid works for AC, it also works for DC. The only difference is how it is specified. The steady DC voltages to actuate and hold the solenoid will be lower than for AC, but these levels do exist. \$\endgroup\$ – Olin Lathrop Jun 15 '12 at 11:49

Several comments:

  • If you don't need isolation, then (obviously) you don't need any device that includes isolation, such as a SSR. If you do need isolation, you probably don't need it for each channel. A single isolation gap, for all 16 channels, should be enough. All this could save you money.
  • Snubbers don't protect the switches (the SSRs, in your case). They just reduce the probability of false triggering. False triggering is not a harm for your switches (they are there to be triggered, even continuosly). The false firings are an inconvenience (or an obstacle), if your application is such that the load should never be powered when you don't want it to (e.g., you have an electric saw, there's been an accident, and you need to switch it off right away).
  • Since the 24 V are AC, if you use unidirectional switches (such as MOSFETs, or BJTs), you will need two switches per channel.

EDIT: a MOSFET is unidirectional, because it conducts in both directions, but it blocks in only one direction. For instance, a normal silicon NMOSFET cannot block current from S to D, due to the parasitic diode it has. Since that diode is there, if you want to use MOSFETs for AC, you CAN, but you need to put two in anti-series (with their sources tied together, and their gates tied together), or otherwise you won't be able to block in one of the two directions. GaAs MOSFETs don't have that parasitic diode, so one device would be enough, for AC.

  • I would go for a cheap TRIAC per channel (probably, without any snubber, because 24 VAC is such a low voltage, that you probably won't hit any dV/dt limit).
  • A cheap TRIAC like this one would work.
  • \$\begingroup\$ Excellent information, thank you. Does the snubber mainly protect against false re-triggering, where the load fails to shut off? \$\endgroup\$ – Mark Apr 17 '12 at 15:11
  • \$\begingroup\$ (First, I didn't understand you, due to my English.) Yes, that is the problem about unwanted triggerings, and they reason why snubbers exist. \$\endgroup\$ – Telaclavo Apr 17 '12 at 15:19
  • \$\begingroup\$ Power MOSFETs have a diode in parallel to their channel, so you can't use pairs of them (I guess you mean an N-channel + a P-channel) in parallel. \$\endgroup\$ – Federico Russo Apr 17 '12 at 15:33
  • \$\begingroup\$ @FedericoRusso No, I meant two (for instance) NMOSFETs in anti-series (with their sources tied together). And yes, I can use them in pairs, that way. In fact, that S-to-D diode is the reason why I need two. Otherwise, one would be perfectly fine for AC. \$\endgroup\$ – Telaclavo Apr 17 '12 at 15:46

Use an MOC3010 triac output optocoupler. Easily driven directly off a microcontroller and provides isolation. This can either directly drive a solenoid or it can drive a bigger triac to drive a solenoid. Look at the specs to see what you need to do. Easy, cheap. My final answer.


I've driven sprinkler valves before. I'd just use a MOSFET. Make sure you use some protection diodes and maybe a self-resetting fuse to prevent damage due to bad things (ESD, shorts, close but not direct lightning strikes, etc.).

  • \$\begingroup\$ With MOSFETs (unidirectional), he will need two per channel, in anti-series. Or rectify the 24 VAC, for all the channels. \$\endgroup\$ – Telaclavo Apr 17 '12 at 14:53
  • 2
    \$\begingroup\$ These solenoids are AC, which I have heard is to prevent magnetization of the plunger. Because they're driven for long periods of time (hours per week), AC is more suitable, or so I've heard. Sprinkler systems are ALL AC, I've never seen a DC one. \$\endgroup\$ – Mark Apr 17 '12 at 14:54
  • \$\begingroup\$ @Mark & Telaclavo Sorry, I forgot to mention that you can drive these valves with DC. 12v DC is "usually enough", although 18 to 24v is what you should use. I've never had an issue with magnetization of the plunger. I'm not saying that magnetization isn't a problem, only that it hasn't been a problem for me. \$\endgroup\$ – user3624 Apr 17 '12 at 14:58
  • 1
    \$\begingroup\$ Sorry, I'm not interested in driving them via DC. There's probably a reason why all the sprinkler systems out there are 24VAC. \$\endgroup\$ – Mark Apr 17 '12 at 14:59
  • 1
    \$\begingroup\$ They all drive the same solenoids, however, and they're all AC (that I've seen). \$\endgroup\$ – Mark Apr 17 '12 at 15:31

I would prefer 24V DC solenoids, lower cost and power. I concur with ULN2803 driver. Although the latching solenoids use less power, that's your choice if you have backup battery or not. Your AM radio might pick up the switch noise from a long cable, you could add a Cap to reduce induced E fields. Preferred for MOSFET, but not necessary for Bipolar driver.

But that is optional, even if most people are sleeping when the sprinklers go on and your alarm sensors shouldn't pick it up switching noise and nor pulses from near lightning strikes. EMI testers won't notice these non repetitive events on their scanners.

A PTC current limiter is a good idea too. These are not expensive. (self-resetting fuse or polyfuse). I concur with David. So use a bipolar hex driver with decoupling ceramic Cap on DC solenoid, clamp diode, and PTC polyfuse and LED indicator with optional Ferrite beads.

Otherwise if using AC solenoids use SCR's, try to use 60/50Hz gated pulses from controller to make them zero crossing switch functions. Some guys use relays.

  • 1
    \$\begingroup\$ Sprinkler valves are available for $10, including the 24VAC solenoid. They are not available with DC solenoids. \$\endgroup\$ – Mark Apr 17 '12 at 15:02
  • \$\begingroup\$ @Mark: No, it's only that the DC operating parameters are not specified. However, they do exist. They have to from the basic physics of solenoids. \$\endgroup\$ – Olin Lathrop Jun 15 '12 at 11:52

Most door bells use 24Vac xfmr's, but the solenoids cost a bit more on AC vs dc not much, so I concur with David to use Mosfet switch for low power loss with bridge.

I see huge variety of SSR's now since 20 yrs ago, for less than a buck. No reason to use discrete switches and better for reliability in case of failure on driver to protect microcontroller. Pick one here http://search.digikey.com/us/en/cat/relays/solid-state/1048664/page/2?k=solid%20ssr&quantity=100&ColumnSort=1000011 and use suggested noise snubber.

I dont know your load current. For example PR39MF21NSZF RELAY SSR 240VAC .9A ZC 8-DIP $0.88 @1k SHARP Micro might be my choice if 500mA was not enough. Several AC ratings PR2xx,PR3xx also Zero crossing avail PR29MF1xNSZ Series $0.75@1k

Sharp make the best opto isolators in my mind on several specs. Heed warning on app. note snubbers.

And that's my final answer.

You know if you push the envelope, you are still stationary!..

If this answer seems perfect then score accordingly, otherwise if just an "also ran", ignore it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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