Pull down Resitor vaule for npn transistor

Thread Starter

Topad

Joined Nov 30, 2021
15
Hello, I have a npn transitor configured as a switch 0v to 5v gpio pin with base resitor 2k and a 50k pull down resitor in a volatge divider configuration. I wanted to know if this pull down resitor will be okay with Ic current about 20-30ma or I need to decrease it more as the rule of thumb 10x bigger then base resistor. The pull down will be based on the transitor cureent leakage, but will 50k work okay for constant switching leds. Thank you.
 

Irving

Joined Jan 30, 2016
4,005
You don't really need a pull-down resistor with an NPN BJT, that's more common with an n-channel MOSFET to counteract/dissipate any gate charge when GPIO is floating/input mode after power-on. A BJT, being current driven, doesn't suffer from that issue. A typical BJT for LED driving - 2N3904, 2N2222, BC547, etc with Ic @ 20mA needs an Ib of 2mA ie assumed Hfe of 10 as rule of thumb so a base series resistor of (5-0.6)/2 kOhm = 2.2k is fine (but in practice anything between 2 and 20k will work, I tend to use 10k for Ic < 50mA as Hfe is typicaly nearer 100 for such devices and I prefer to be more energy efficient).
 

Thread Starter

Topad

Joined Nov 30, 2021
15
@Irving thank you sir for your help and sharing. This is thr npn transitor PMBT2222A, and I had a resistor at the base of 5.10K and a 100k pull down, with Ic current of 35-45ma. So Ib was about 0.84ma and the based on the 1/10 rule this was not right maybe eventually make the transitor fail, and the transitor will not be in complete saturation but acting as a switch in the active region, I went and measured Vce and at the highest was 0.160V, and doing some power still was below the max power of 250mw, of course varies with temp. Now, coming more close to the 1/10 with a lower based resitor like 2k and with 50k as a pull down (like you mention this might not be needed). Others claim to have it for the leakage current. Does it hurt have it on my circuit? besides lowering my gpio 5v a bit. Just looking for a good Rb values 2k or other that will be good overall
 

BobTPH

Joined Jun 5, 2013
9,182
The use of a pulldown on the base dates to when transistors were germanium and had high leakage currents when the base was open. Silicon transistors solved this problem. I have never used a pulldown on a silicon transistor. The leakage current is negligible for most applications.
 

Ian0

Joined Aug 7, 2020
10,076
One time I found it necessary: A certain brand of Microcontroller defaults to GPIO configured as inputs with pullups.
Without a pull-down there is enough current through the internal pullup to switch the transistor on, and that happens during the startup phase before the software can configure the GPIO.
 

Thread Starter

Topad

Joined Nov 30, 2021
15
Thank you guys, so based on Irvings for current less than 50ma in practice a 10k will even be okay. Like in my first configuration I had 5.10k and 100k pull down, in parallel this will be around 4.8k. And the transitor will still work like a switch since it doesn't wildly get even close to the max power rating and not fail overtime?. Now to make things even better we need to use 1/10 rule so a resistor of 2k or 2.2k will make things better for current 35-45ma, less vce volatge. And based on Ian and bob the pull down will not be needed at all unles mcu pin at start up with input pull ups, but if I decide to leave there it won't affect my circuit function, besides lowering my rb resistance and 5v input to maybe 4.8v of course the resistor need to be 10x or more than rb.?
 

MrChips

Joined Oct 2, 2009
30,986
In future, note that circuit schematics is the language of electronics. We can communicate better if there is a circuit schematic shown with proper component IDs and values. Here is an example.

1713059681709.png
 
Top