Darlington transistor as a switch for solenoid control valve

Hi there,

Extremely new to electronics and am getting confused with information online about this.

I am using the Arduino Mega 2560 as a controller to turn on/off a 5/2 way air solenoid valve. The solenoid is rated for 24V DC, 0.8W, so I believe current should be limited to 0.8/24 = 33.3mA. Now, the mega pins are rated to 20mA output current, so I am thinking about using an npn darlington transistor to switch the solenoid on/off. First question: is there any benefit to using a transistor here other than for amplifying current? ie. if the valve only needed 10mA of current, would it still be better to use a transistor instead of directly connecting it to an I/O pin?

Next, I had originally been doing calculations to see what current limiting resistor I needed at the 5V output pint form the controller to make sure that the amplified current from the collector would be around 33mA. My calculations were as follows: need 33mA current at collector (Ic). Using a transistor (this one https://www.digikey.ca/en/products/detail/nexperia-usa-inc/BST51-115/1155103) that has gain of 1000 (depending on Vce and Ic?) and has high enough voltage rating (60V Vce and Vcb). Ib = Ic/1000 = 0.033mA. I bumped this to 0.165mA to ensure we have enough current. So at the 5V output pin on the controller, I need a resistor Rb = (5-1.3)/0.165mA = 25.5kOhm. I used 1.3V as the assumed voltage drop of the transistor. Now, I am talking to a friend who said that I'm operating in the saturation region so current won't be amplified at a linear rate like my assumed 1000. How am I in the saturation region? I've attached a photo of my schematic for reference (note that CV1 and CV2 are the pinouts for the solenoid control valve):

If anyone has any recommendations for how I should choose different transistors, or any recommendations/explanations on how to use a switching transistor, it would be hugely appreciated.

Thanks in advance!

FYI

Most here will recommend you use a MOSFET.

Thanks for the references. How do I make sure that the MOSFET doesn't apply too much current? Will the current be limited by the valve?

Not sure what you mean by too much current, but when driven by the right voltage Ugs for that MOSFET, it will have a RDS of about 0.01 - 1 Ohm, so the current Id will be the one that your load requires by that voltage.. There will be no gate-current.. (well... almost no current)

All good! If you calculate a collector-emitter current that's more than you can actually get, with the current limited by the solenoid's resistance you are in the saturation range. And that's what you want. But saturation isn't exactly like a light switch and I'd probably "slam it harder" with maybe 10mA into the base of the transistor.

There the Arduino is rated for an absolute maximum of 40mA or 20mA "recommended maximum" and there's no need to push that to the limits. There should also be maximum rating for the transistor's bas-emitter current and you wouldn't want to push that either. Otherwise you generally want to fully-saturate the transistor. The "harder" it's saturated the lower the voltage drop/loss across the transistor, which means the transistor will run cooler and more voltage will be delivered to the solenoid.

With a valve resistance of 720 Ohm a voltage of 7.2 V is required for 10mA. That's too much voltage for an Arduino output. With 5V (Vcc) only 7 mA can flow through the valve, so you need a transistor even for only 10 mA.

The maximum load current is mostly determined by the supply voltage and the Load’s resistance.

The voltage drop, at saturation, across the BJT is usually less than 1v.

Eg:
Assume supply voltage is 12v, VCE(sat) = 1v, load resistance = 4 Ω.
I(load) = (supply voltage - VCE(sat) )/ 4 Ω = (12 -1) / 4 = 11/4= 2.75Amps.


Transistors do not pull current from a supply.

The voltage drop across the load divide by the load resistance gives the load current.


MOSFETs have a low internal resistance if they are fully turned on, mΩ, resulting low voltage across the MOSFET; resulting in most of the voltage dropping across the load.

As mentioned, V(load) / R(load) = Load current.

A common NPN BJT would be fine for 24volt/0.33mA (~1-3mA base current).
A darlington would drop unnecessary voltage, and there is no real benefit using a mosfet.

I see two valves. If there are more, then I would have used an 8-channel power shift register, like the TPIC6B595 or TPIC6C596. No transistors, no diodes. Just a 100n decoupling cap for it's supply. No Mega needed either.
Leo..

FWIW, Darlingtons as such do not saturate.

That is why you have the obligatory voltage drop.

OK, I take that back. :grin: You can saturate a Darlington by driving it with one-twentieth of its collector current, in which case the first transistor is not amplifying since its collector voltage is now lower than its emitter.

If this solenoid indeed requires only 80 mA, then a general-purpose NPN transistor rated at 48 V with a base resistor of 560 Ohms to provide 8 mA to the base will work perfectly well, as long as you have that diode across the solenoid.

You do not need a FET, but a logic-level FET would be a very appropriate choice in this century!

Great Job!

That is a great explanation of the shortcoming of the Darlington transistor circuit! It is caused by the collectors being connected together. If the driver transistor collector is connected to its own load resistor, the output transistor could saturate.

What would result in a 4-legged transistor with further circuitry required. The Darlington trick allows for the typical transistor cases as a plug-in replacement for ordinary transistors, IMO its biggest benefit.

I think the greatest benefit of a Darlington transistor is its very high DC current gain. But, it does have drawbacks, which must be considered. If you want a switching transistor for high current or one that pulls down below 0.5 volts, then it probably is not a good choice.

Thanks for this explanation! I think I had it completely wrong before... Okay so (for a Darlington/BJT), the calculated collector current is just how much current would be allowed to flow from the collector to the emitter. But what is actually limiting the current is the amount that control valve will draw (ie. if the collector current allows 10mA and the CV (control valve) wants 33mA, then the CV will only get 10mA BUT if the collector current is switched on to allow 100mA, the CV will still only draw 33mA, right? it won't force 100mA through the CV?)

Now, if I instead decide to use a MOSFET, can I still use it as a switch? :
image
ie, if I hit the gate with 5V from the Arduino, then the max current that'll flow from drain to source (with 24V supply to the CV) is 5/0.035 = 143mA and the CV will still only draw its 33mA from the supply. So the benefit will be not having the Vce voltage drop that I get with the Darlington?

Is my logic sound?

Lastly, why does your MOSFET diagram need a pulldown resistor?
image

"But what is actually limiting the current . . ."

If you have sufficient base current, the answer to the above is the collector current is set by the voltage across the LOAD divided by the Load Resistance.

i.e. the load resistance sets the current in that situation.


A Logic Level MOSFET will still have a small V(DS) voltage drop but not as large as the BJT VCE(sat) drop.


"Lastly, why does your MOSFET diagram need a pulldown resistor?"

When the Arduino first powers up, the I/O pins are floating i.e. at a HIGH impedance state.
We add a pull down/up resistor to make sure the MOSFET is OFF when the I/O pin is floating at power up time.


EDIT
0ec38703ae499aa533be8a6dcb01a078f71954e9

The RDSon is ~.035 ohms at stated 16Amp load.

If your load current was 1A (V(load) / R(load) ) and the MOSFET RDSon was 35m ohms, the expected VDS would be
~ .035R * 1A = .035V

I think that's right, but then none of the collector current passing through the first transistor is real load current, and is therefore wasted. That's assuming you're switching the low side and the last emitter is at ground.

Hi,
If you like a bit of maths..
https://www.elprocus.com/darlington-transistor-working-with-applications/

Tom... :smiley: :+1: :coffee: :australia:

I called it the (collector) load resistor because that is its name in the common emitter configuration. In this case it functions as the (only) current limiter in its circuit. The collector current through it is not wasted but is the major portion of the base current of the output transistor (just like in the Darlington configuration). The advantage is that the driver Vce is not affected by the collector current of the output transistor. What I did not mention is that the collector voltage source of the driver transistor can be the same as the source for the output load.

And where do you think the collector current of the drive transistor comes from...
Leo..

Oooh, we are having fun here. :grin:

If the collector of the fist transistor is separated from the second, then it is connected to VCC via a resistor and does not come from the load.