NPN Transistor Switch
Load is connected between Vcc and collector. Emitter to GND.
PNP Transistor Switch
Load between collector and GND. Emitter to Vcc.
📐 BJT Switch Design Formulas
Saturation Current
IC_sat = Vcc / RC
(assuming Vce_sat ≈ 0)
Min. Base Current
IB_min = IC_sat / hFE
Base Resistor (NPN)
RB = (Vin − Vbe) / IB
Vbe ≈ 0.7V (Si)
Overdrive
IB = k × IC / hFE
k = 2…5 (overdrive)
Ensures saturation
Collector Power
P = Vce_sat × IC
Vce_sat ≈ 0.2V (sat.)
Check
Is IB × hFE > IC?
→ Yes: saturated ✓
→ No: active region
❓ FAQ
What is saturation in a BJT switch?
Saturation means both junctions are forward biased. The transistor is fully ON with Vce ≈ 0.1–0.3V. To guarantee saturation, the base current must exceed IC/hFE — typically by 2–5× (overdrive factor) to account for hFE variation and ensure fast switching.
Why does hFE vary so much?
hFE (DC current gain) varies with temperature, collector current, and manufacturing. A transistor rated at hFE=100 might actually have 50–300 in practice. Always design for the minimum hFE from the datasheet, and use an overdrive factor ≥ 2 for robust switching.
Can I drive a relay with a BJT switch?
Yes. Connect a flyback diode (1N4001 or similar) in reverse across the relay coil to protect the transistor from voltage spikes when the relay turns off. Calculate base resistor for the relay coil current.
NPN or PNP — which to use?
NPN is more common and preferred for low-side switching (load between Vcc and collector, emitter to GND). PNP is used for high-side switching. NPN transistors generally have higher speed and are more available.