Choosing the right solenoid

As they are opto-isolated I don't think it actually matters as long as polarity is correct.

I use 1N4004 as a general purpose diode as it handles more current/voltage because I have more of those in my 'stock' box (but it will handle more current/voltage) - look at Maximum Ratings. You can use any of that series, but the higher then number, the more 'rugged' and the larger it is.

1 Like

If you use the Hunter latching solenoid and they need a 9V plus to change from open to close or close to open. They have low power consumption, as you don't need the energize the solenoid all the time.

Sorry to just chirp in.

1 Like

Yes, two 9V battery, 3xvalve(solenoid) + control station (two time per day(morning and evening, all valves) = 2years battery duration :sunglasses:

1 Like

Hi guys,
Why can't life be simple once and a while :pleading_face:

Drove this morning with my father to our water-stuff shop, where I buy all my water related stuff.
They sell valves from the brand RPE, which have a (white) solenoid:


Now it seems that you need to buy those with a 24V AC solenoid included. If you need 24V DC, you need to buy the extra DC solenoid for 22 euro, and throw away the AC solenoid. Which would be kind of ridiculousness...

So I arrived at home now with some valves that have a 24 VAC solenoid :roll_eyes:

Did a quick search now and found here this diagram:

I have multiple valves that I would like to power with a single 24V AC power supply. Can I just add those in parallel and connect them to the AC power supply. Or is there other stuff required?

Sorry for the abrupt switchg from a DC to an AC setup.
This is not what I had planned ...

You would need to be able to switch AC and so my choices would be a Relay, or a Solid State Relay (SSR). Input would need to be 'driveable' by the output from the RPi and the output side in the case of the SSR, able to switch 24V AC. (Relays can usually cope with this sort of voltage easily)

Not sure what those items are, normal relays or SSRs, but they look Opto Isolated as well. Do you have a reference we can look at?

EDIT: Looks it could be similar to this. Do you have these, or open to options?

A suitable opto isolated SSR would be my first option, as they don't normally need flyback diodes/capacitors to protect against back emf spikes, because they don't turn off in the middle of an AC cycle.

Better reliability + no moving parts to break!

1 Like

What would I do in gods name without my electronic friends here in this community...
All help is much appreciated!!

Until now I have always used LinkFreely optcouplers. They work fine, and they are connected directly to the gpio's of my Raspberry. And they allowed me to remove all capacitors and resistors that I had in my first setup. Now it is all nice din-rail, so a very clean setup. I really like them. I use them for a lot of stuff.

Although I currently only buy them from the official LinkFreely shop on Aliexpress, because I had already ordered by accident some clones from other dealers: they look exactly the same but I had to throw them away because they simply don't work...

Until now I have only used the DC optocouplers from LinkFreely (MRI-...), but for AC I would like to use those:

Apologies. I should have been more clear. I had just copied that image from the web to explain my question. I don't use the blue relays, only the green optocouplers from LinkFreely.

Hey Paul, that sounds interesting. Could you explain that a bit more?
Would be nice if I could the LinkFreely stuff without extra discrete components, to keep my setup simple...

Have a look at which explains it better than me!


The ones shown in your link are 230V 2A output, which is ample for what you need. Looks as though they also have Zero Crossing detection, so I would say that they are fine for what you need from the information we have here (note the distancing from any responsibility!! :lol).

|Model Number|MRA-23D2|
|Output Current|2A|
|Output Voltage Range|24-264VAC|
|Input Voltage Range|3-32VDC|
|Input Current|≤15mA|
|Max.Voltage Drop|≤1.2V|

Nope, I have now thousands of witnesses that you told me this :wink:

Now I need to have patience for a couple of weeks, when my optocouplers arrive...

1 Like


I learn a lot from you and many others on this Forum and appreciate the time and effort that has been put in. I guess, what I am trying to say is that 'what goes around, comes around' and I hope that the information I have given here goes a little way in paying towards my debt.

If you need any other information...

Good luck!
Colin J


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.