Which transistor to control 12V (350mA) Solenoid Valve?

Hi.

I have 12V Solenoid Valves which draws 350mA when it is activated. I am thinking of using transistors to control them. Which transistor should i use?

Regards

http://www.onsemi.com/pub_link/Collateral/2N2222A-D.PDF

?

Also remember to add a diode across the solenoid to stop feedback voltage spikes that could get through the transistor and damage it/and your MCU.

The criteria you need to consider:

the transistor has to be able to carry a current of 350 mA on a continuous basis.

when the circuit is "on", the voltage drop across the transistor needs to be small enough that the solenoid coil gets enough voltage across it.

you need to be able to drive the transistor base or gate from the arduino voltage level. In particular, you want to limit the arduino output current to a few mA, so a transistor with a low current gain may be a limiting issue for you.

You will normally want to configure your circuit with one end of the solenoid coil connected to the +12 V and the transistor between the other end of the coil , and the ground. This will normally mean that you need an NPN transistor or N type mosfet.

If you look at the websites of online vendors, they mostly have a webpage where you can sort the products according to your criteria, which are not very onerous. Some of the criteria, like bandwith for high frequency operations, you can ignore.

Now if you look at the datasheet in reply #1, here is a couple of the thing you can check:

collector voltage limits 50 and 70 volts - you are not going to exceed that, that is OK.

maximum base-emitter voltage 6 V - you are not going to exceed that with your arduino.

continuous collector current 800 mA OK

At 350 mA and 25 C, the current gain is more than 100. That means that the current coming out of your arduino would be less than 3.5 mA, which is OK.

At 350 mA and 25 C, the base saturation voltage is less than a volt, which is good, it means that you can turn the transistor fully "on" with your arduino, which is not the case with all transistors. Actually, it is too good ! Your arduino will try to pull the base of the transistor higher than one volt, and will produce too much current. You will need to put a resistor in series with the base of the transistor to limit the current.

At 350 mA and 25C, the collector-emitter voltage is about 0.2 volts. Thats good, it means in your 12 V circuit, the solenoid will get about 11.8 volts.

The fifth graph is showing you that the transistor will be saturated with a base current of about 3 mA, c ollector current of about 350 mA, and a collector-emitter voltage of about 0.3 volts.

The capacitance you don't need to worry about.

michinyon: The fifth graph is showing you that the transistor will be saturated with a base current of about 3 mA, c ollector current of about 350 mA, and a collector-emitter voltage of about 0.3 volts.

No it doesn't it shows about 10mA base current for Vsat 0.3V Ic=300mA. And that's a "typical values" graph. The worse case Vsat ratings show 0.3V for Ic = 150mA, Ib = 15mA, in other words Ib = Ic/10 for good saturation.

Select 20 to 25mA base current.

Thank you for all the answers and info even though i couldn’t understand some of the technical details :slight_smile:

I have 6 x 12V / 350mA solenoid valves.
I will use 1K resistor, 2N2222A transistor and 1N4007 diode.

2N2222A datasheet: http://www.onsemi.com/pub_link/Collateral/2N2222A-D.PDF
1N4007 datasheet: http://www.diodes.com/datasheets/ds28002.pdf

Do you think my schematic is ok?

Thanks in advance.

At the first glance the circuit seems OK. Attention to the power supply (6x0,350A = 2,1A) it must be able to provide, at least, 12V and 2,1A.

Ok, thank you luisilva.

Definitely use a 220 ohm base resistor, 1k is rather too large - see my analysis above for why.

By the way - a 1N4007 is overkill - not a problem at all if that happens to be the cheapest or most readily available, but since you are using it for a 12V circuit, a 1N4004 (400V) will be just fine. In fact, a 1N4001 (50V) would be just as good but I doubt they even manufacture them any more as inventory is simpler just making 1N4004 and 1N4007.

the 1N4007 isn't really an overkill. It is used as free-wheeling diode and it should protect against the inductive current when switching off the power on the coil. The current that is produced in this moment is much higher then the original source current. Here you can have 100 - 200 V for a very short moment. That's why it is always a good idea to use a 1N4007 for that purpose.

Hi,

maximum base-emitter voltage 6 V - you are not going to exceed that with your arduino.

The parameter on the spec sheet is Vebo, not Vbeo. Vebo is voltage at the emitter with respect to the base, with collector open Vebo is the reverse biased maximum voltage on the base-emitter junction.

Vbeo is the forward biased voltage which is determined by the diode junction volt drop.

Tom..... :)

Listen to MarkT, use 220 ohm resistors on the transistor base. Never rely on the small signal gain to determine the base current in a saturated transistor.

I tend to use 1N4007 simply because it is cheaper to buy a huge bag of 1N4007 rather than have a bunch of diodes of different PIV ratings.

Indeed, I was pretty much asking for it. :D

mgcss: the 1N4007 isn't really an overkill. It is used as free-wheeling diode and it should protect against the inductive current when switching off the power on the coil. The current that is produced in this moment is much higher then the original source current. Here you can have 100 - 200 V for a very short moment. That's why it is always a good idea to use a 1N4007 for that purpose.

You, my friend, are very confused and befuddled about electronics and electrical theory.

Firstly, the current that the diode conducts, is the current that the inductor was passing immediately before the control device switched off. It it the potential collapse - that is reduction - of this current that has the ability to generate an EMF. The current will decrease, not increase.

Secondly, the diode never experiences the "back EMF" because it conducts to carry the collapsing current. The back EMF would rise to considerable values if the diode was not present. With the diode in place, the back EMF is limited to the 0.7V or so forward drop of the diode. All the diode is required to withstand in reverse, is the supply voltage which drives the relay coil.

Incidentally, the Wikipedia article on the 1N4001 series diodes mentions that they are very slow diodes. It may not be generally understood that this refers to their ability to turn off, virtually all diodes turn on immediately.

mgcss: the 1N4007 isn't really an overkill. It is used as free-wheeling diode and it should protect against the inductive current when switching off the power on the coil. The current that is produced in this moment is much higher then the original source current. Here you can have 100 - 200 V for a very short moment. That's why it is always a good idea to use a 1N4007 for that purpose.

No, the current at that point is exactly the original source current, since inductances resist change in current. The voltage is generated to maintain the current, should there be no easy route for the current the voltage will force a route.

The important property of the diode is fast turn-on. Most diodes are reasonably fast at turn on (turn off is another matter), but larger diodes are slower, so 1N4001 is probably better than 1N4007. For 350mA you could even use a 1N4148 which has a repetitive peak forward current rating of 450mA (although that's rather close for comfort). Even a fairly slow diode is likely to limit the voltage spike to 10V rather than 1000V, so in general they just work.

Thank you everyone.

This is the final schematic (attached).

(I couldn’t find the Ohm symbol in ExpressSCH :slight_smile: )