# Which configuration is better for pulling down an NPN transistor's base?

I was discussing on pull down resistors with a colleague of mine. Here are the two configurations for transistor as a switch.

The input signal can either come from a microcontroller or an another digital output to drive a load, or from an analogue signal to give a buffered output from the collector of the transistor to the microcontroller.

On the left, with Q1, is my colleague's configuration. He states that:

• A 10K resistor is needed directly in the base to prevent the Q1 from switching ON unintentionally. If the configuration on the right, with Q1, is used, then the resistance will be too weak to pull the base down.
• R2 also protects $V_{BE}$ from over-voltage and give stability in case of temperature changes.
• R1 protects from over-current to the Q1's base, and will be a bigger value resistor in case the voltage from "uC-out" is high (in example +24V). There is going to be a voltage divider formed, but that doesn't matter as the input voltage is high enough, already.

On the right, with Q2, is my configuration. I think that:

• Since an NPN transistor's base is not a high impedance point like a MOSFET or a JFET, and the $H_{FE}$ of the transistor is less than 500, and at least 0.6V is needed to turn the transistor ON, a pull-down resistor is not critical, and in most cases is not even needed.
• If a pull-down resistor is going to be put in the board, then the value of exact 10K is a myth. It depends on your power budget. A 12K would do fine as well as a 1K.
• If the configuration on the left, with Q1, is used, then a voltage divider is created and may create problems if the input signal, that is used to switch the transistor ON, is low.

So, to clarify things, my questions are:

1. Is 10K pull-down resistor a rule-of-thumb that I should apply everytime? What are the things to consider when determining a pull-down resistor's value?
2. Is the pull-down resistor really needed in every application? In what cases the pull-down resistor is needed?
3. Which configuration would you prefer and why? If none, what would be a better configuration?

-

Summarised Solution:

• The two configurations are close to equivalent.

• Either would work equally well in almost all cases.

• In a situation where one wass better than the other the design would be excessively marginal for real world use.

• $R_{2}$ or $R_{4}$ are needed only when $V_{in}$ can be open circuit, which in that case they are a good idea. Values up to about 100K are probably OK in most cases. 10k is a good safe value in most cases.

Left hand case:

• Drive voltage is decreased by $\frac{10}{11}$, which means 9% less.
• Base sees 10K to ground, if input is open circuit.
• If input is LOW, then base sees about 1K to ground. Actually 1K//10K = essentially the same.

Right hand case:

• Drive = 100% of $V_{in}$ is applied via 1K.
• Base sees 10K to ground if $V_{in}$ is open circuit. (as opposed to 11K).
• If the input is LOW, base sees 1K, which is essentially the same.

R2 and R4 act to shunt the base leakage current to ground. For low power or small signal jellybean transistors, up to several Watts rating, this current is very small, usually will not turn the transistor ON, but may as well, and say 100K would usually be enough to keep the base LOW.

This only applies if $V_{in}$ is open circuit. If $V_{in}$ is grounded, which means it is LOW, then R1 or R5 are from base to ground and R2 or R4 are not needed. Good design includes these resistors if $V_{in}$ may ever be open circuit (e.g. a processor pin during startup may be open circuit or undefined).

Very long time ago, I had a circuit controlling an 8 track open reel data tape drive. Turn it on and the tape would depoll backwards. Turned out the port drive went open circuit as the port initialized and this put a rewind code on the port. It did. Initialisation that did not explicitly commend the tape failed to stop the rewind. Sending an explict stop meant the tape would twitch but not despool.(Counts on fingers of the brain - hmmm 34 years ago. Yes, we had microprocessors back then. Just :-).

Specifics:

A 10K resistor is needed directly in the base to prevent the Q1 from switching ON unintentionally. If the configuration on the right, with Q1, is used, then the resistance will be too weak to pull the base down.

No!

10K = 11K for 99.9% most of this reality and even 100k would work in most cases.

R2 also protects VBE from over-voltage and give stability in case of temperature changes.

No practical difference in either case.

R1 protects from over-current to the Q1's base, and will be a bigger value resistor in case the voltage from "uC-out" is high (in example +24V). There is going to be a voltage divider formed, but that doesn't matter as the input voltage is high enough, already.

Some merit.

R1 is dimensioned to provide desired base drive current so yes.

$R_{1} = \dfrac{V}{I} = \dfrac{(Vin - Vbe)}{I{desired\, base\, drive}}$

As $V_{BE}$ low and you design for more than enough current, then:

$R_{1} \cong \dfrac{Vin}{Ib_{desired}}$

Ibase_desired >> Ic/Beta - where Beta = current gain.
If Beta = 400 nominal (eg BC337-40 = 250 to 600 Beta) design for 100 Beta or less unless there are special reasons not to.
eg If Bet nominal = 400 the Beta design = 100.
If IC_max = 250 mA say then Ib = Ic/Beta = 250 / 100 = 2.5 mA.
If Vin = 24V then Rb = V/I = 24/0.0025 = 9600 ohm.
Could use 10k as beta is conservative but 8l2 or even 4k7 is OK.
Power in R at 4k7 = V^2/R = 24^2 /4700 = 123 mW/ This would be OK with a 1/4 W resistor BUT 123 mW may not be totally trivial so one MAY wish tp use 10k.
Note that switched collector power = V x I = 24 x 250 = 6 Watts.

On the right, with Q2, is my configuration. I think that:

Since an NPN transistor's base is not a high impedance point like a MOSFET or a JFET, and the HFE of the transistor is less than 500, and at least 0.6V is needed to turn the transistor ON, a pull-down resistor is not critical, and in most cases is not even needed.

As above - sort of, yes, BUT. ie base leakage will bite you sometimes. Muphy say that it will fire the potato cannon into the crowd just before tha main act and that a 10k to 100k will save you.

If a pull-down resistor is going to be put in the board, then the value of exact 10K is a myth. It depends on your power budget. A 12K would do fine as well as a 1K.

Yes!
10k = 12k = 33k. 100k MAY be getting a bit high.
Note that all this applies only if Vin can go open circuit.
If Vin is either high or low or anywhere in between then the path through R1 or R5 will dominate.

If the configuration on the left, with Q1, is used, then a voltage divider is created and may create problems if the input signal, that is used to switch the transistor ON, is low.

Only in very very very very extreme cases as shown.
I_R1 = V/R = (Vin-Vbe)/ R1.
I_R2 = Vbe / R2.
So the fraction that R2 will "steal" is Ir2/Ir1 =
(Vbe/R2) / ((Vin-Vbe)/R1)
= R1/R2 x Vbe/(Vin-Vbe)
If R1 = 1k, R2 = 10K then R1/R2 = 0.1
and if Vbe = 0.6V, Vin = 3.6V (to make sums clearer)
then Vbe/(Vin-Vbe) = 0.6/3.0 = 0.2 so overall fraction of drive lost = 0.1 x 0.2 = 0.02 = 2%.
ie even with 1k/10k the loss of drive is minimal.

If you can judge Beta and more so closely that 2% drive loss matters then you should be in the space program.

• Orbital launchers work with safety margins in the 1% - 2% range in some key areas. When your payload to orbit is 3% to 10% of your launch mass 9or less) then every % of safety margin is a bite out of uour lunch. The latest North Korean orbital launch attempt used an actual safety margin of -1% to -2% somewhere critical, apparently, and "summat gang aglae". They are in good company - the US and USSR lost many many many launchers in the early 1960s. I knew a man who used to build atlas missiles early on. What fun they had. One Russian system NEVER produced a successful launch - too complex.) UK launched one satellite ever FWIW.

It has been suggested in comments that

R2 and R4 are never needed, becase an NPN is a CURRENT-controlled device. R2 and R4 would only make sense for VOLTAGE-controlled devices, like MOSFETs

and

How can a pull-down be needed when the MCU output is hi-Z, and the transistor is controlled by current? You didn't say the "who". Ok. You don't want to say the "why", either?

There is an important secondary effect in bipolar transistors which results in R2 and R4 having a useful and sometimes essential role. I'll discuss the R2 version as it is the same as the R4 version but slightly "purer" for this case (ie R1 becomes irrelevant).

If Vin is open circuit then R2 is connected from base to ground. R1 has no effect. base APPEARS to be grounded with no signal source.
However, the CB junction is effectively a reverse biased silicon diode. Reverse leakage current will flow through the CB diode into the base. If no external path to ground is provided this current will then flow via the forward biased be diode to ground. This current will notionally result in a collector current of Beta x Icb leakage but at such low currents you need to look at the underlying equations and/or published device data. A BC337 - datasheet here has a Icb cutoff of about 0.1 uA with Vbe = 0.
Ice0 = collector base current is about 200 nA in this case.
Vc is 40V in that example but the current approximately doubles per 10 degrees C rise and that spec is at 25C and the effect is relatively voltage independent. . The two are closely related. At around 55c you may get 1 uA - not much. If usual Ic is 1 mA then 1 uA is irrelevant. Probably.
I have seen real world circuits where omission of R2 caused spurious turn on problems.
With R2 = say 100k then 1 uA will produce 0.1V voltage rise and all is well.

In most circuits 200 Na

impedance path is provided

a secondary effect in bipolar transistors (which I have alluded to in my answer) which means that R2 and R4 may be needed to sink Icb reverse bias leakage current. If this is nit done then it will be carried by the be junction and can cause device turn on. This is a genuine real world effect which is well known and well documented but not always well taught in courses. See my answer addition.

-
I am interested in the corner cases where it would make a difference. -- update: ah there it is :) –  noah1989 Apr 16 '12 at 10:15
@noah1989 - the corner cases are so finely judged that you are using all the road and both verges, drifting the corners, and using clutchless gear shifts - ie so close to not working that you don't design that way. –  Russell McMahon Apr 16 '12 at 10:18
"R2 or R4 are needed only when Vin can be open circuit". Not true. R2 and R4 are never needed, becase an NPN is a CURRENT-controlled device. R2 and R4 would only make sense for VOLTAGE-controlled devices, like MOSFETs. –  Telaclavo Apr 16 '12 at 11:20
I am going to edit the hell out of this answer, damn it was so hard to read, Russell :) –  abdullah kahraman Apr 16 '12 at 11:58
Ah, I give up, too hard to edit :D. Thanks for the detailed answer though, Russell –  abdullah kahraman Apr 16 '12 at 12:19
show 1 more comment

The left one looks like it provides a voltage divider to lower the base voltage, but that isn't true: the base voltage is just $V_{BE}$, or around 0.65V for low currents. R2 will only cause a slightly higher current from the microcontroller's output, but at 65$\mu$A it's nothing to worry about. And yes, R2 will pull the base down if the microcontroller's pin is Hi-Z. Add it if it eases your mind, though transistors don't start conducting if no voltage is applied to the base.
With R2 present changes in $V_{BE}$ will cause less change in $I_B$ than when R2 is not there, but the effect is negligible.

In the right one R4 only causes an unnecessary current path from the output pin to ground. This will be higher than R2 will see, if the microcontroller runs at 5V it will be 500$\mu$A. R4 only has a function if the microcontroller's pin is Hi-Z.

Because of the larger current for R4 than for R2 I would prefer the left solution. If I would place R2/R4 in the first place. Which I probably wouldn't.

-
"transistors don't start conducting if no voltage is applied to the base" -- But if the µC output is tri-stated, couldn't just touching the PCB or electromagnetic interference cause voltage to be applied to the transistor base? –  noah1989 Apr 16 '12 at 10:24
@noah1989 - You shouldn't tri-state the output! But if you intend to do so the pull-downs may be useful. –  stevenvh Apr 16 '12 at 10:37
Most µCs automatically tri-state the outputs when a reset condition becomes active or during in-system programming. –  noah1989 Apr 16 '12 at 10:39
@noah1989 - But most programs will initialize I/O as the first thing they do, within milliseconds. But like I said, place the pull-downs if it puts your mind at ease. I never do (saves me money) and I have never experienced problems because of that. –  stevenvh Apr 16 '12 at 10:46
"R4 only has a function if the microcontroller's pin is Hi-Z". That is not true. R4 does not have any function, because an NPN is a CURRENT controlled device. There is no need to pull down, because when the MCU output is hi-Z, the NPN is guaranteed to be off. –  Telaclavo Apr 16 '12 at 11:17

As Steven and Russel have pointed out, both your two cases are close to equivalent. However, for a normal digital logic output that drives both high and low you don't need a pulldown at all. This is what I think Telaclavo was trying to say, but later made me not so sure in his comments. In any case, he didn't qualify his answer very well and didn't give much background.

Typical CMOS digital logic outputs have transistors that drive the line actively both high and low. In that case a single series resistor is fine. It becomes a pulldown when the digital output is low since the output will be effectively tied to ground by the resistance of the low side FET when it is on. This also helps turn the NPN transistor off more quickly since current will actually flow in reverse thru the base resistor for a short time to drain some charge from the base. This charge would otherwise be "used up" in causing significantly more charge to flow thru the collector and emitter.

You still need the pulldown resistor in some cases. If the digital output could ever go high impedance, then having something positively drive the base on or off is a good idea. Note that most microcontroller outputs start out at high impedance after powerup. Depending on the micro and how you have it configured, it could be 10s of ms before the firmware can initialize the port to drive one way or the other. If it matters that the transistor must not come on during this powerup time due to glitches or whatever, then you still need a pulldown.

That all said, let's keep in perspective what a base pulldown (or pullup for PNP) resistor really does for a bipolar transistor. These devices work on current, not voltage. There has to be current thru a floating base to turn on the transistor. Capacitive coupling to stray signals can cause significant voltage changes on high impedance nodes, but the current is usually quite small. Unless the transistor is biased on the edge of conduction and whatever is downstream has high gain, stray capacitive pickup on the base is not likely to turn the transistor on. Of course you can come up with situations where it does, but this is nowhere near the problem it is with the high impedance gates of a MOSFET.

Unless you are really really space or budget constrained, somehow make sure that the transistor base is not left floating when it matters whether the transistor is on or not. But if a situation comes up where the extra pulldown is a issue, think about it carefully and decide whether it's really needed, keeping in mind the likelyhood of stray signals putting enough current thru the base to turn the transistor on and the consequences of that turnon.

Just always using a 10 kΩ pulldown for relgious reasons or because you heard it was a good idea is silly.

-
"You still need the pulldown resistor in some cases." Hola, careful! Telaclavo has killed before! :-) –  stevenvh Apr 16 '12 at 12:42
Right. Thanks, Steven. So, Olin, tell me. What has to happen for that 1 mV across R3 or R6 to turn into something dangerous or, in other words, what makes that 1 mV more dangerous than just noise picked up there? –  Telaclavo Apr 16 '12 at 12:54
@Telaclavo: Huh? What 1 mV? I looked over what I wrote forward, backward, and upside down, and no millivolts were abused in the making of that answer. –  Olin Lathrop Apr 16 '12 at 13:01
So, what do you think of a suitable range of pull-down resistor values? –  abdullah kahraman Apr 16 '12 at 13:13
@OlinLathrop - note that (1) I said: "R2 or R4 are needed only when Vin can be open circuit" and (2) Mr T said: "Not true. R2 and R4 are never needed, becase an NPN is a CURRENT-controlled device. R2 and R4 would only make sense for VOLTAGE-controlled devices, like MOSFETs." ie he is definitely saying the pulldown is never ever needed. See his detailed responses to my comments. –  Russell McMahon Apr 16 '12 at 13:46
show 1 more comment

At the risk of throwing fuel on the fire of such a highly contentious issue, I will add my two groats worth.

The OP mentions "another digital output" or an "analogue signal" as a possible driving signal. At the risk of stating the obvious, the resistor values should be chosen so that the driving source is guaranteed to turn the transistor on and off under worst case conditions. If the $V_{OL(MAX)}$ of the source is greater than 0.6V, R4 will indeed be needed. This could be the case for example, if the driving source is an op-amp without a rail-to-rail output, or a digital transistor output with a high saturation voltage. Similarly, R1 and R2 should be chosen so that the transistor's base current is sufficient to turn the transistor on with the source at $V_{OH(MIN)}$.

As ever, consult the appropriate data sheets and design accordingly.

-
+1. This is the first argument I read here that COULD justify the use of a pull down, with a BC337, IN CASE the source had a V_OL_max insufficiently low. However, the key thing is that the OP does not give any number for V_OL_max, and without that number, it is impossible to judge neither of the two configurations. The values for the resistors shown in the schematics are of no use, if that parameter is not known, but we know that it may be clearly greater than zero. –  Telaclavo Apr 16 '12 at 21:12

If the source to the circuit will be a digital output that will always pull cleanly high or low, then there is no need for a pull-down resistor, since any resistor sized to pass through enough current to turn on the transistor satisfactorily even when using five-volt logic (meaning it's dropping 4.3 volts) will have no trouble passing through any remotely-reasonable amount of collector-base leakage.

If the source to the circuit will be a digital output that switches between high and floating, and if floating is supposed to translate to "off", the first configuration would be generally superior in circumstances involving "normal" BJT's and logic levels, though when using other types of transistors or logic levels there are cases where the second would be better. The advantage of the first configuration is that if the "turn off" resistor is sized to drop 0.5 volts at the transistor's collector-base leakage current, the amount of current that's wasted going through it will increase only 40% when the transistor is supposed to be turned on. By contrast, in the latter configuration, using the same 0.5-volt assumption, if one is using e.g. a 3.3 volt output, the current through that resistor would have to increase almost seven-fold.

The only time the second configuration really works out better than the first is when the voltage of a "high" logic output is barely adequate to turn on the transistor. In that scenario, the second circuit makes the full voltage output by the logic available to turn on the transistor. By contrast, the first circuit would drop the voltage somewhat. With bipolar junction transistors, there's usually so much voltage margin that a slight voltage drop won't matter. With MOSFETs, however, sometimes one needs all the voltage one can get. Further, when driving MOFSETs, one can get away with a larger series resistor than one would use with bipolar junction transistors; further, depending upon what one is driving, one may be able to size the resistors in the second circuit such that even if the transistor fails with a drain-gate short it will not expose the processor pin to excessive voltage. The first circuit would not offer such protection.

-
How will the second circuit offer an over-voltage protection in a drain-gate shortage? It will divide the voltage at the drain by an amount of only $\frac{10}{11}$ –  abdullah kahraman Apr 16 '12 at 16:12
@abdullahkahraman: With the resistor values given, that is true. On the other hand, if using MOSFETs and one is more interested in the protection than in in minimizing power consumption when turning the transistor "on", one might be able to swap the two resistors. That would add an extra 3mA of wasted current when turning the transistor on, but would protect the CPU from voltages up to 36 volts. –  supercat Apr 16 '12 at 17:14
That is a great idea then, also adding tiny SMT resistors will act like a fuse as I have read somewhere. –  abdullah kahraman Apr 16 '12 at 17:44
@abdullahkahraman: Such techniques can be useful when used along with zener diodes. In the scenario I described, if the supply for the thing driven by the MOSFET is e.g. 24 volts, no fusing would be necessary because, even if a drain-gate short occurs, nothing in the drive circuitry would be driven beyond specification. –  supercat Apr 16 '12 at 18:00

None of them. Forget about the pull-down resistor. In both of your two cases, the Thevenin equivalent of what the base of the NPN sees, to its left, is a voltage source and a series resistor. So, use only a resistor in series with the base, and choose it so that the current through the base is the one you want.

-
Who voted this down? Could you say your name? –  Telaclavo Apr 16 '12 at 10:41
You don't want to know who downvoted, but rather why he did. Who is irrelevant. –  stevenvh Apr 16 '12 at 11:19
So, whoever did it, why? This turns out to be the only correct answer here. –  Telaclavo Apr 16 '12 at 11:21
Whoa, easy! Everybody thinks he's got the right answer. In my experience user votes are quite relevant, and after some time the best answer often will have the highest score as well –  stevenvh Apr 16 '12 at 11:26
Ok, at least I know who it was. So, why don't you rebate the comment I left in your answer? Tell me. How can a pull-down be needed when the MCU output is hi-Z, and the transistor is controlled by current? You didn't say the "who". Ok. You don't want to say the "why", either? –  Telaclavo Apr 16 '12 at 11:33