Go Down

Topic: 3 wire solenoid (Read 25636 times) previous topic - next topic



I have a 3-wire solenoid (for irrigating - 9Vdc Solenoid).

it has 1 ground cable and 2 on/off cables. so one of them turns the solenoid on and the other turns in off.

I've been searching the web and all I can find is a 2 way solenoid sketch. (which works great, but not suitable for me)

does anyone has any ideas?

here is the sketch I based my sketch on, and what I tried to do (with not so much success, as it sometimes wont work, and sometimes it does, for some reason..)
my design

what I based my design on.


Your first diagram details the solenoid coils wired as 'common emitter' mode which means the maximum voltage across the coils will be 4.3 volts  (arduino output minus 0.7)

The second diagram shows common 'collector mode' and the solenoid coil will receive the full supply voltage minus 0.7

So to operate a twin-triggered solenoid you should reconfigure the first circuit to the common collector mode


I would first try and find out if your '3-wire' solenoid is a latching relay or not. If it is, it's designed to just pulse the on or off coil and not keep current continuously applied to either coil. This reduces heat and current consumption a lot and makes possible solar powered or battery power. So first determining if it's a latching relay or not should determine the best way to interface it to an arduino.



the solenoid only requires a short pulse in order to switch, so i guess the right term is a latch relay,

about the voltages, thanks, and you are right, that is the problem,

but I didn't understand your solution. remember that the solenoid has 1 ground and 2 vdd inputs, so I cant just put them in a paralleled connection, because they either both work or both dont work.


The common connection (the one you call ground) goes to VCC and the two flying leads go to the collectors of the respective transistors.  The snubbing (or flywheel) diodes (2 required) are connected as Anodes to VCC end of solenoids (the common wire) and cathodes to each of the other solenoid connections


Jul 13, 2012, 12:03 pm Last Edit: Jul 13, 2012, 12:10 pm by majenko Reason: 1
Your solenoid is akin to "common cathode" LED arrays.

The ground connection goes to ground (the cathode) and the two positive connections (anodes) get switched on and off.

This is known as "high side switching" and should really be done using PNP transistors, not NPN as you have.

Using PNP you basically end up with the original source schematic, but upside-down.  Also, note that the switching is also inverted - writing a "HIGH" will turn off the transistor, and a "LOW" will turn it on.

I usually couple an NPN with each PNP to act as an inverter (in fact, I usually use MOSFETs, not BJTs, but that's just me).


Great scheme, I will use it as soon as I get the new transistors, thanks...

Right now I am using TIP 120, can you recommend me on a good TIP-120 alike PNP bipolar transistor?

As I am familiar with the theory (finishing 2nd year in electrical engineering) I am not familiar with the actual modems.. :)


The TIP-120 isn't a plain transistor - it is a darlington pair - two NPN transistors tied together to give a much higher current gain.

Unless your solenoid takes massive currents this is not really necessary.

Any general purpose PNP transistor would do the job as long as the collector current capability is large enough for the job.

Incidentally, there is type of transistor, similar to the darlington pair, called the Sziklai Pair, which has an NPN driving a PNP - very similar to the schematic I have drawn.


btw, you use mosfet instead of Q1?

and what is the resistances of the resistors?


you have been very helpful. majenko.

I just order 20 pnp transistors. I hope they'd work..


R1 4K7
But not critical


I tend to use MOSFETs interchangeably with BJTs at random ;)

Q1 I would use either MOSFET or BJT depending on what else I was using in the circuit (economies of scale), or what I had lying around.

Q2 I would use a MOSFET if the voltage drop of Rdson * Ids is less than the fixed voltage drop of the PNP transistor.

The resistors are just current limiting / pullup resistors, 10K for R2 is reasonable, and somewhere around 2K for R1 is a normal kind of value - the values aren't too critical - too low and you'll get excess current draw, wasting power, and too high and you won't switch properly.


If you tie the "Common" lead of the solenoid to Vsupply and each remaining solenoid wire to the Collector of an NPN Transistor, Emitter to ground... With Back Emf Diodes. Vsupply can be ANY voltage. The base drive voltage can be as low as a volt (with suitable base resistor such that Ib > Ic/Beta (transistor current gain) and the solenoid coil will have Vsupply - Vcesat across it... no Fet or PNP transistor need be used or needed. As a side note those are solenoids I used for many years for Irrigation control, they "Latch" because there is a small "bias" magnet internal to the solenoid that causes the solenoid to 'stick' or latch until the Bias is reversed by activating the reversed winding of the 'unlatch' lead of the solenoid.

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


I am not sure I understand you 100%, can you please upload a simple scheme of what you mean?


I am not sure I understand you 100%, can you please upload a simple scheme of what you mean?

Turn my schematic upside down and use NPN instead of PNP, and use your solenoid backwards.

Go Up