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