Tools / Transistor base resistor
How to work out a transistor base resistor
A small base current switches a big collector current. Here is how to size the resistor so the transistor turns fully on.
Rb = (Vin − Vbe) ÷ (k × Ic ÷ hFE)
Result
- Base resistor
- 860 Ω
- Standard resistor
- 820 Ω
- Base current
- 5.24 mA
- Minimum base current
- 1 mA
Step by step
The working with your numbers
- Find the smallest base current that could work
Ib(min) = Ic ÷ hFE = 100 mA ÷ 100 = 1 mA - Give it extra so it switches fully on
Ib = 5 × 1 mA = 5 mAhFE varies from part to part and drops when the transistor is fully on (saturated), so switches use 3 to 10 times the minimum. - Find the voltage across the base resistor
V_Rb = Vin − Vbe = 5 − 0.7 = 4.3 V - Use Ohm's law
Rb = V_Rb ÷ Ib = 4.3 ÷ 0.005 A = 860 Ω
Does the answer make sense?
- OK: Base current is 5 times the minimum, so the transistor saturates and stays cool (Vce about 0.2 V).
- OK: 5 mA is a safe current for a microcontroller pin.
Pick a real part
- Go down to the next standard (E12) value, 820 Ω, so the base gets a little more current, not less.
- With 820 Ω: Ib = 4.3 ÷ 820 = 5.24 mA.
- Add a diode across a relay or motor coil, or the switch-off spike can kill the transistor.
Common mistakes
- Using Ib = Ic ÷ hFE with no extra. The transistor ends up half on and hot. Give it 3 to 10 times more.
- Forgetting the 0.7 V Vbe. The resistor only sees Vin − 0.7 V.
- Using a datasheet's typical hFE. Use the minimum, because your part could be the weakest one.
Learn it, try it, build it
Calculated, not measured. Check the exact part datasheet and your real circuit before powering anything.
Just need the number? Use the transistor base resistor calculator on Geekobot.
Common questions
How do you work out a transistor base resistor?
Divide the load current by the transistor's minimum hFE, multiply by 3 to 10 so it switches fully on, then use Ohm's law: Rb = (Vin − 0.7) ÷ Ib. For 100 mA, hFE 100 and 5 V drive: Ib = 5 mA, Rb = 4.3 ÷ 0.005 = 860 Ω, so use 820 Ω.
Why give the transistor more base current than Ic ÷ hFE?
hFE varies between parts and falls when the transistor is saturated. Extra base current makes sure it is fully on, so it drops only about 0.2 V and stays cool.
