# 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?

## 8 Answers

Summarised Solution:

• The two configurations are close to equivalent.

• Either would work equally well in almost all cases.

• In a situation where one was better than the other the design would be excessively marginal for real world use (as anything so crucial to make the two differ substantially means the operation is "right on the edge"). .

• $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.

• A secondary effect in bipolar transistors (which I have alluded to in my answer) means that R2 and R4 may be needed to sink Icb reverse bias leakage current. If this is not 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.

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, and usually will not turn the transistor ON, but it just might in extreme cases - so 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).

Here is as an example where a very short "blip" due to a pin floating was of major consequence: A very long time ago, I had a circuit controlling an 8 track open reel data tape drive. When the system was first turned on the tape would run backwards at high speed and despool. This was "very very very annoying". The code was checked and no fault was found. It turned out that the port drive went open circuit as the port initialized and this allowed the floating line to be pulled high by the tape deck which put a rewind code on the tape port. It rewound! The initialisation code did not explicitly command the tape to stop as it was assumed that it was already stopped and would not start by itself. Adding an explicit stop command meant that the tape would twitch but not despool.(Counts on fingers of the brain - hmmm 34 years ago. (That was at the very start of 1978 - now almost 38 years ago as I edit this answer). 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 practical purposes 99.8% of the time, 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}}$

$I_{base \ desired} >> \frac{Ic}{\beta}$ - where $\beta$ = current gain.

If $\beta_{nominal} = 400$ (eg BC337-40 where $\beta =$ 250 to 600) then design for $\beta \leq 100$ unless there are special reasons not to.

For instance, if $\beta_{nominal} = 400$ then $\beta_{design} = 100$.

If $Ic_{max} = 250mA$ and $V_{in} = 24V$ then

$$I_b = \frac{I_c}{\beta} = \frac{250}{100} = 2.5mA$$ $$R_b = \frac{V}{I} = \frac{24V}{2.5mA} = 9.6k \Omega$$

We could use 10k, as beta is conservative but 8.2k or even 4.7k is ok.

$$Pr_{4.7k} = \frac{V^2}{R} = \frac{24^2}{4.7k} = 123mW$$

This would be ok with a $\frac{1}{4}W$ resistor but 123mW may not be totally trivial so one may wish to use the 10k resistor instead.

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. Murphy says that without the pull-down it will accidentally fire the potato cannon into the crowd just before the main act, but that a 10k to 100k pull-down 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} = \frac{V}{R} = \frac{V_{in}-V{be}}{R1}$$
$$I_{R2} = \frac{V_{be}}{R_2}$$

So the fraction that R2 will "steal" is

$$\frac{I_{R2}}{I_{R1}} = \frac{\frac{V_{be}}{R_2}} { \frac{V_{in}-V_{be}}{R_1}}$$
$$\frac{I_{R2}}{I_{R1}} = \frac{R_1}{R_2} \times \frac{V_{be}}{V_{in}-V_{be}}$$

If $R_1 = 1k$, $R2 = 10K$ then $$\frac{R_1}{R_2} = 0.1$$
and if $V_{be} = 0.6V$, $V_{in} = 3.6V$ (to make sums clearer) then $$\frac{V_{be}}{V_{in}-V_{be}} = \frac{0.6}{3.0} = 0.2$$ So overall fraction of drive lost is $0.1 \times 0.2 = 0.02 = 2\%$
i.e 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 (or less) then every % of safety margin is a bite out of our 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.

ADDED

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 base-emitter 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.

• I am interested in the corner cases where it would make a difference. -- update: ah there it is :) – Stefan Paul Noack 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

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

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? – Stefan Paul Noack 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. – Stefan Paul Noack 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
• @Telaclavo - The way you behaved in comments to another answer I guess I shouldn't even answer this, but anyway. In my previous comment I said I don't use pull-downs. As far as the function of R4 goes, it does pull the base to ground. You may be able to measure the difference between it being there or not. I never said the transistor will conduct when not driven. On the contrary: "transistors don't start conducting if no voltage is applied to the base". – stevenvh Apr 16 '12 at 12:00

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.

• 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
• @OlinLathrop The 1 mV is the max voltage created across R3 or R6, due to Icb leakage. See my comments to my own answer. – Telaclavo Apr 16 '12 at 13:46

Real-world results:

A green LED was partially lit by reverse-biased CB leakage current on a 2N3904 when the base was disconnected (or 3-stated during reset). Adding a path to ground shunts the CB leakage current out of the base region, and the LED was now completely dark.

Not an issue with an LED, but had it been say a motor, there could be undesirable results from an uncontrolled run-away after reset, even for a short amount of time.

The resistor R2 | R4 also serve to help remove charge from the base region, so that switching from saturation to cutoff is faster. In this case, the lower resistance of the topology on the left (resistor R2 between base and ground) is better.

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

If it were a critical application where you need more noise immunity with a programmable device (uC or CPLD) being used to drive the signal, one must consider that the power-on reset condition defines such pins as inputs before active outputs. So I would then include a pull down resistor to avoid stray noise triggering situations in the presence of high EMI.

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.

• @Telaclavo - I didn't down-vote your answer BUT you appear to be unaware of 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. – Russell McMahon Apr 16 '12 at 11:34
• Of course I know about that effect, but it only needs attention with Darlington transistors, for which the current gain is so high that Icb can cause some noticeable contribution towards Ice. The BC337 is not a Darlington BJT. – Telaclavo Apr 16 '12 at 11:40
• @Telaclavo - most of we guys like to work on the basis of truth and applied reality most of the time. This doesn't always happen in every single case but its the norm, and during a discussion you can depend on the overwhelming majority of comment being reasonably solidly factually based. | I have personally seen circuits conduct undesirably using small non-darlington bipolar transistors when R2 equivalent was omitted and the input was O/C and have seen the problem cured when R2 was added. I agree that R2 is not always essential . But it is always good design to add it if the input can be O/C. – Russell McMahon Apr 16 '12 at 12:07
• @Telaclavo - Proper circuit design depends on using ALL worst case parameters and not making assumptions when data is sparse. For example, deciding that Icbo will be 10 times smaller if Vcc is reduced by 10 times is a dangerous assumption and in fact tends not to be correct. Whether a trickle of collector current matters depends very much on application. A designer may legitimately decide to "live dangerously" and go without R2 in many cases. It will often work. For those who cannot or do not check such things in every case, adding R2 is a good way of keeping Murphy at bay. – Russell McMahon Apr 16 '12 at 12:10
• I think that everyone is overthinking this. The pulldown resistor certainly won't HURT anything, and if you're on a particularly noisy application (underneath a large solenoid, etc.) it can prevent problems. A large (kiloamp) SCR is not easy to fire either, but in an industrial environment it's downright easy to misfire, and with disastrous consequences. – akohlsmith Apr 16 '12 at 13:11