key steps to calculate Transistor values - Page 1
Forum section: electronics / beginners

author: phaseform
author_rank: Regular Contributor
timestamp: September 01, 2019, 02:23:27 am
content: My understanding when calculating values for a NPN BJT as a switch are:BJT needs to be able to handle Icthen need a value Rb such that the BJT will be saturated, but not Vb must be not too highI am so confused at to the actual steps to choose and correctly wire a transistor...!!I have a TIP122 with datasheetherefrom Jaycar.In my case I will be using this transistor to switch on a 12v load using a 5v arduino. Worst case may be 2A load. (possibly unsuitable transistor?)I am a little confused by the datasheet , it says "base-Emitter On voltage" max 2.5 VDC, this is the max voltage through base-emitter? If I understand correctly Vbe = 0.7v for saturation as a usual number? SO the only thing I need to do for this transistor is calculate Rb?Where 5v - IbRb - 0.7 = 0What will determine Ib?Again looking at the datasheet I get hFE Min = 1000. dont really understand this, current gain is at least 1000x? hFE is irrelevant for switching, where I should just use 20-40 as a current gain number? max for Atmel 328p is 40mA, *40 = Ic = 1.6A. I will be powering a 12v-5v car USB adapter between 12v and collector, which I think has max current ~2.2A (at 5v) soperhapsIb = 40mA will be fine...??

author: Ian.M
author_rank: Super Contributor
timestamp: September 01, 2019, 03:19:35 am
content: Its a Darlington pair so is two transistors integrated in a single package - see fig 2 on datasheet page 2. The 2.5V Vbe is worst case when passing 3A. See the left hand fig. 10 graph, line Vbe(sat) @ Ic/Ib = 250, which indicates that for Ic=2A and Ib=8mA (by definition from the ratio), you can expect Vbe to be about 1.7V. At 8mA output current the Arduino output will be a bit above 4.7V (see fig. 33-24 in the full ATmega328P datasheet), so the base resistor will be dropping about 3V while passing 8mA, which gives 375 ohms. 330 ohms is the next lower E12 preferred value, which will give a bit under 10mA Ib, plenty for saturation with a 2A load, and not too much for the Arduino I/O pin (unless you have too many pins driving the same type of circuit).However Fig. 10 also shows you that the Vce(sat) @ 2A will be about 1V, (a penalty of using a Darlington) so with a 12V supply your load will only get 11V. Also the transistor will be dissipating 2W, so will need heatsinking. If you need to drop less voltage or want to avoid the need for a heatsink, you'll need to use a N-MOSFET, and to make sure it turns on properly, select one with a Vgs threshold <2.5V.

author: phaseform
author_rank: Regular Contributor
timestamp: September 01, 2019, 04:31:14 am
content: Awesome thank you, saved a bunch of frustration. Could you recommend a common N-MOSFET for this role?

author: Zero999
author_rank: Super Contributor
timestamp: September 01, 2019, 08:18:55 am
content: The IRL540 springs to mind, but no doubt there are far superior modern parts.http://www.vishay.com/docs/91300/sihl540.pdf

author: phaseform
author_rank: Regular Contributor
timestamp: September 01, 2019, 10:22:13 am
content: I found a great videoexplaining MOSFETs.I stumbled upon the exact recommended part IRF540N on Jaycarhere. seems to have similar specs to the one in the video, so shouldn't require a heatsink or waste too much energy. This part has Vgs Min 2, Max 4. So this is the voltage required to be fully saturated, and will tolerate 5V directly from the arduino if I understand correctly..?

author: Ian.M
author_rank: Super Contributor
timestamp: September 01, 2019, 12:08:37 pm
content: No. The gate threshold voltage is when the MOSFET *JUST* starts to pass current, in this case for the IRF540N, a pissy little trickle of 250uA. As a rough rule of thumb you need double the max. gate threshold voltage to guarantee its turned on hard enough for practical switching applications, and may need more for it to get right down to its specified Rds(on). As the min. Vgs threshold is only 2V, *SOME* IRF540N MOSFETs will turn on hard enough to be useful with only a 5V logic level on the gate, but dont count on it as you may well get a whole reel with all of them with that parameter towards the upper end of its specified range, that barely turn on with 5V on the gate.TLDR: That 'L' in the part number is an absolutely critical difference!It looks like Jaycar don't have any power N-MOSFETs with a sub 2.5V max Vgs threshold.Your choices are (in decreasing order of merit):Find one at a different supplier.Add a level shifting driver circuit to put a full 0-12V signal on the gate.For a *one-off* prototype, select on test to find one that turns on hard enough for your application with only 4.5V on the gate, and hope you don't have to go through too many to find one!

author: rstofer
author_rank: Super Contributor
timestamp: September 01, 2019, 09:28:25 pm
content: There's a world of difference between the IRF540N and the IRL540N. The IRL version is designed for logic level switching.IRL: See figure 3 here:http://www.redrok.com/MOSFET_IRL540N_100V_36A_44mO_Vth2.0_TO-220.pdfIRF: See figure 7 here:https://media.digikey.com/pdf/Data%20Sheets/Fairchild%20PDFs/IRF540N.pdfThe IRL version might be adequate. I have used it in similar applications and it seemed that I got it passing enough current with a 5V logic signal. One problem, if PWM is contemplated, is the fact that the rising and falling edges of the drain current are quite wide (lots of capacitance) and this is the area where heating occurs. The device is neither on nor off, it's transitioning, and the extra voltage drop causes heating. The current waveform will look like a trapezoid instead of a square wave.That's why they invented MOSFET driver chips. These gadgets dump AMPS into the gate but that takes a lot more design than simply trying the IRL version.In this application, I doubt that there will be a problem

author: phaseform
author_rank: Regular Contributor
timestamp: September 01, 2019, 11:53:10 pm
content: Ahh thats super helpful, starting to clarify in my mind. I made an order on eBay for10 IRL540Nparts. So arduino Digital output is well within Vgs Max, so simply this will be a switch, with no gate resistor required. Very low Rds, so little loss and no need for a heatsink. And can handle all the way up to 36A (!!!) Wish I knew about these long ago, been playing around with BJTs, trying to crunch numbers on getting them to work.. seemingly unnecessarily... yay

author: David Hess
author_rank: Super Contributor
timestamp: September 02, 2019, 01:19:41 am
content: Quote from: phaseform on September 01, 2019, 02:23:27 amThat is true however hfe (current gain) drops at high collector current so usually the transistor is selected for sufficient gain at the operating current at which point the Ic will be more than high enough.Also, the Vce needs to be high enough to withstand the collector voltage when off.QuoteReally it is the base current which is selected which is a function of the drive voltage and series resistance. The base current needs to be high enough to fully saturate the transistor under worst case conditions. For small signal transistors, this is typically somewhere between 1/20th and 1/50th of the collector current but for power transistors, this might be only 1/10th or sometimes lower.

author: Circlotron
author_rank: Super Contributor
timestamp: September 02, 2019, 01:48:24 am
content: Quote from: phaseform on September 01, 2019, 11:53:10 pmNext time you order on ebay, sort by price + postage, lowest first.https://www.ebay.com.au/itm/10Pcs-New-IRL540-IRL540N-power-MOSFET-TO-220-DD/352774546961?hash=item5223006611:g:qzAAAOSwnKlcSr04&frcectupt=true

author: Audioguru again
author_rank: Regular Contributor
timestamp: September 02, 2019, 01:59:55 am
content: Quote from: Circlotron on September 02, 2019, 01:48:24 amThen you will probably get fake or defective ones.The ebay photo shows IR which is International Rectifier Company but the text says "Unbranded" which might be garbage.

author: Circlotron
author_rank: Super Contributor
timestamp: September 02, 2019, 02:59:07 am
content: FWIW both mine and the OP's link both say "unbranded". But yeah, you're right. Cheapest price is least likely to be genuine or brand new goods.