Transistor Switch Voltage Drop

ian field

Joined Oct 27, 2012
6,536
The valves each need 300mA; so that would make the base current need to be 30mA, which is high. So if I were to get MOSFETs for the job, is there a certain kind that would work best in this scenario? I would get NMOS type but I mean chip number
You generally need to include a safety margin - for 0.3A loads a transistor rated at that is obviously working on its limit.

A transistor rated at 1A would do the job without breaking a sweat.

You also need to make sure your micro is giving enough base current, take the lowest figure in the gain spread quoted and divide your load current by it - your micro must drive *AT LEAST* the figure arrived at. Once again a safety margin is worth having - if its under driven, it won't fully saturate - it'll drop voltage and dissipate wasted energy as heat.

A good choice for MOSFETs would be from the IRF5xx family - you'll most likely need the logic level type, which I believe have an IRL prefix.

The regulator MOSFETs on old PC motherboards are usually equivalent to logic level - but most only have Vds of 30V, some are as low as 20V. So you'd have to protect them from the solenoid back emf.
 

crutschow

Joined Mar 14, 2008
34,002
According to the data sheet, a 2N7000 MOSFET has 5.3Ω maximum on-resistance at a Vgs of 4.5v.
This gives a 1.59V maximum drop at a Vgs of 5V and 300ma drain current.

I thus suggest that you look for a logic-level type N-MOSFET that has a lower on-resistance at a Vgs of 5V (say less than an ohm).
Look at Digkey or other suppliers and look for low priced versions that fit your on-resistance and package needs (be sure the on-resistance is rated at 5V or less and generally avoid surface mount packages).
 

shteii01

Joined Feb 19, 2010
4,644
You generally need to include a safety margin - for 0.3A loads a transistor rated at that is obviously working on its limit.

A transistor rated at 1A would do the job without breaking a sweat.

You also need to make sure your micro is giving enough base current, take the lowest figure in the gain spread quoted and divide your load current by it - your micro must drive *AT LEAST* the figure arrived at. Once again a safety margin is worth having - if its under driven, it won't fully saturate - it'll drop voltage and dissipate wasted energy as heat.

A good choice for MOSFETs would be from the IRF5xx family - you'll most likely need the logic level type, which I believe have an IRL prefix.

The regulator MOSFETs on old PC motherboards are usually equivalent to logic level - but most only have Vds of 30V, some are as low as 20V. So you'd have to protect them from the solenoid back emf.
2N2222 is rated for 50 mA Ib and 500 mA Ic in saturation. OP is expected 30 mA Ib and 300 mA Ic in saturation. Well within the 2N2222 spec.
 

AnalogKid

Joined Aug 1, 2013
10,943
I am looking at the 2N2222 datasheet.
When transistor is the switch, it either Off or On. When it is On, it is in saturation.
No, it isn't. With a 2.2K base resistor and a 300 mA load current, the transistor is *not* saturated. Operating a transistor as a saturated switch does not happen automatically. It takes datasheet values and calculation to assure that the circuit performs as intended. If the Arduino output can make 5 V, then decreasing the base resistors to 330 or 470 ohms should confirm that the transistors were not in saturation before. If the voltage across the valve increases, that was the problem.

Separate from that, another output driver option is to replace the 7 output transistors with a ULN2003 transistor array. It has 7 darlington transistors rated for 1/2 amp each, can be driven directly from the Arduino without overloading it, and has the base resistors and output transient protection diodes built in. It was designed to do exactly what you are doing.

If you want to switch to MOSFETs, again it pays to read the datasheets. You will need what is called a logic level MOSFET, one designed to fully enhance ("saturate") with a 5 V gate signal instead of the usual 10 to 20 V. Also, not all MOSFETs have a super-low on resistance. You know your load current. Decide how much voltage you can stand to drop across the drive transistor and use that to calculate the maximum Rdson (MOSFET "on" resistance) you can tolerate. Then shop for parts that are available to you, meet your budget, and meet your requirements.

ak

EDIT: late to the thread, didn't see the 2nd page of posts. Wally already covered on resistance calcs.
 

shteii01

Joined Feb 19, 2010
4,644
No, it isn't. With a 2.2K base resistor and a 300 mA load current, the transistor is *not* saturated. Operating a transistor as a saturated switch does not happen automatically. It takes datasheet values and calculation to assure that the circuit performs as intended. If the Arduino output can make 5 V, then decreasing the base resistors to 330 or 470 ohms should confirm that the transistors were not in saturation before. If the voltage across the valve increases, that was the problem.

Separate from that, another output driver option is to replace the 7 output transistors with a ULN2003 transistor array. It has 7 darlington transistors rated for 1/2 amp each, can be driven directly from the Arduino without overloading it, and has the base resistors and output transient protection diodes built in. It was designed to do exactly what you are doing.

If you want to switch to MOSFETs, again it pays to read the datasheets. You will need what is called a logic level MOSFET, one designed to fully enhance ("saturate") with a 5 V gate signal instead of the usual 10 to 20 V. Also, not all MOSFETs have a super-low on resistance. You know your load current. Decide how much voltage you can stand to drop across the drive transistor and use that to calculate the maximum Rdson (MOSFET "on" resistance) you can tolerate. Then shop for parts that are available to you, meet your budget, and meet your requirements.

ak

EDIT: late to the thread, didn't see the 2nd page of posts. Wally already covered on resistance calcs.
You are right, I forgot Vbe(on). I assumed that transistor was working in saturation and acting as a switch based on OP saying that he did hear the valve activating.

I am setting Vbe(on) to 0.7 V. Arduino Uno is 5 V system. So.
5-.7=4.3 V
4.3 V/ 30 mA=143.3 Ohm
They would need 143.3 Ohm or a little less to make sure that 2N2222 gets 0.7 volts to turn On.

And yes, 2.2 kOhm resistor on the Base is huge in this application.
 

crutschow

Joined Mar 14, 2008
34,002
................
Separate from that, another output driver option is to replace the 7 output transistors with a ULN2003 transistor array. ..................
That device has a maximum saturation voltage of 1.6V@350mA so that's not acceptable either.
I think a logic-level N-MOSFET is likely the best solution.
 

absf

Joined Dec 29, 2010
1,968
Separate from that, another output driver option is to replace the 7 output transistors with a ULN2003 transistor array. It has 7 darlington transistors rated for 1/2 amp each, can be driven directly from the Arduino without overloading it, and has the base resistors and output transient protection diodes built in. It was designed to do exactly what you are doing.
Besides what crutschow has said....

Though each pin can sink 500mA, the max current for the package is also 500mA. So if there are more than 2 valves in operation at the same time, the chip will be smoking.

Allen
 

Attachments

AnalogKid

Joined Aug 1, 2013
10,943
That device has a maximum saturation voltage of 1.6V@350mA so that's not acceptable either.
I think a logic-level N-MOSFET is likely the best solution.
I agree that that is on the datasheet, but my experience with the part is that it is way better than that. And I usually shy away from FETs as drivers for something like this. Personal preference and some early bad experiences.

ak
 

AnalogKid

Joined Aug 1, 2013
10,943
You are right, I forgot Vbe(on). I assumed that transistor was working in saturation and acting as a switch based on OP saying that he did hear the valve activating.

I am setting Vbe(on) to 0.7 V. Arduino Uno is 5 V system. So.
5-.7=4.3 V
4.3 V/ 30 mA=143.3 Ohm
They would need 143.3 Ohm or a little less to make sure that 2N2222 gets 0.7 volts to turn On.
Note that if an Arduino is anything like a PIC, the output cam make the rated current but not at a voltage of Vcc. At 30 mA I'd expect to lose a volt or two of output compliance.

ak
 

shteii01

Joined Feb 19, 2010
4,644
Note that if an Arduino is anything like a PIC, the output cam make the rated current but not at a voltage of Vcc. At 30 mA I'd expect to lose a volt or two of output compliance.

ak
Too true. Probably would have to do some practical investigation, take the measurements to see what the actual device does. It might just stay at its rated 20 mA and not get anywhere close to the 30 mA.
 

AnalogKid

Joined Aug 1, 2013
10,943
2N2222 is rated for 50 mA Ib and 500 mA Ic in saturation. OP is expected 30 mA Ib and 300 mA Ic in saturation. Well within the 2N2222 spec.
Not really.; two things -

first, there is an industry-wide general practice that says electronic components should not be operated at greater than 1/2 of their ratings for a reason. For companies like IBM and Raytheon this is a hard rule. Capacitor voltage and ripple current, resistor power dissipation, and just about every transistor and diode spec, 1/2, 1/2, 1/2... Nothing affects long term reliability more than heat, and almost every device specification affects its internal power dissipation in some way. The single most expensive electronic component in the world is a $0.001 resistor with a systemic power dissipation problem, located in 100 million cell phones.

Second, the idea that you need a base current of 1/10th the collector current for hard saturation is an old rule of thumb often mis-applied, and not supported by the actual performance of contemporary small signal devices. For a 2N3055 pulling 15 A, sure. But for a 2222/4401, the difference in Vcesat between Ic/Ib=10 and =20 is trivial, and it cuts the base-emitter diode power dissipation by over 50%. The 2222 datasheet may support 50 mA base currents (although those tests are pulsed, not continuous), but I wouldn't run it at over 10 mA continuous. 5 mA is my standard design limit; anything above that and I have to justify it to myself. And yes, it is possible to lose an argument with yourself.

ak
 

Thread Starter

mhinkamp

Joined Jan 30, 2016
8
Thanks for all the comments; I have saved this info for when I come across more problems. I would like some opinions on this circuit I tried. I had a 5V/89mA relay and decided to try that as the switch instead. On the left, I plugged in the Arduino 5V across the relay coils protected by a diode. On the right, I used the Normally Closed pin connected to 12V and then the COM pin connected to my valve and free wheeling diode. I thought Normally Open was the correct configuration for wanting the applied 5V to activate the relay and connect the 12V to my valve, but that worked backwards, so I'm using NO. I didn't experience any voltage drop on the valve in this circuit. The Arduino can suuply the 89mA in this case since I'm using the 5V and GND pins (200mA rating) as opposed to the I/O pins (40mA). I would assume I can find a relay with higher coil resistance (lower current) so I can safely drive it with I/O pins. I would just like some feedback on the idea of doing it this way as opposed to with a transistor. Thanks

Relay.JPG
 

shteii01

Joined Feb 19, 2010
4,644
Thanks for all the comments; I have saved this info for when I come across more problems. I would like some opinions on this circuit I tried. I had a 5V/89mA relay and decided to try that as the switch instead. On the left, I plugged in the Arduino 5V across the relay coils protected by a diode. On the right, I used the Normally Closed pin connected to 12V and then the COM pin connected to my valve and free wheeling diode. I thought Normally Open was the correct configuration for wanting the applied 5V to activate the relay and connect the 12V to my valve, but that worked backwards, so I'm using NO. I didn't experience any voltage drop on the valve in this circuit. The Arduino can suuply the 89mA in this case since I'm using the 5V and GND pins (200mA rating) as opposed to the I/O pins (40mA). I would assume I can find a relay with higher coil resistance (lower current) so I can safely drive it with I/O pins. I would just like some feedback on the idea of doing it this way as opposed to with a transistor. Thanks

View attachment 99811
Can you actually control the 5 V pin on Uno? I thought it was always On.
 

Thread Starter

mhinkamp

Joined Jan 30, 2016
8
Can you actually control the 5 V pin on Uno? I thought it was always On.
You are correct, I just placed a switch between it and the board to manually control it for testing purposes. When the final project is finished, I will have to use I/O pins to automatically control outputs
 

shteii01

Joined Feb 19, 2010
4,644
I don't know where you live, but you can get this FET at Mouser.
http://www.mouser.com/ds/2/149/FQU13N10L-244077.pdf
Is Figure 3 what we should be looking at?
The Vgs=5 volt graph?
It looks like the graph starts at 1 A and at that point the Rds(on) is something like 0.17-0.18 Ohm. The graph also looks "flat".

And the table says Rds(on) for Vgs=5 V, Id= 5 A is 0.158 to 0.2 Ohm. Worst case scenario then 300 mA*0.2 Ohm=0.06 V, 12-0.06=11.94 V across the valve.
 

ronv

Joined Nov 12, 2008
3,770
Is Figure 3 what we should be looking at?
The Vgs=5 volt graph?
It looks like the graph starts at 1 A and at that point the Rds(on) is something like 0.17-0.18 Ohm. The graph also looks "flat".

And the table says Rds(on) for Vgs=5 V, Id= 5 A is 0.158 to 0.2 Ohm. Worst case scenario then 300 mA*0.2 Ohm=0.06 V, 12-0.06=11.94 V across the valve.
Right you are. They were nice to give those curves. The thing to look for as a starting point is that it is a logic level FET. That means it is made to turn on fully at 5 volts.
You can also look at Fig. 1 to get an idea.
Compare it to this one.
http://www.mouser.com/ds/2/427/sihf510-105610.pdf
 
Top