Transistor as a Switch – First Principles
Imagine a light bulb in your room controlled by a wall switch. When you flip the switch, you either complete the circuit (bulb glows) or break it (bulb goes dark). The switch itself has only two states: fully open or fully closed. A transistor can be made to behave exactly like that switch — but controlled by a tiny voltage or current instead of your finger.
The key idea is simple: drive the transistor to one of its two extreme operating regions — cut-off or saturation — and it becomes an electronic ON/OFF switch.
The Two Extreme States
A bipolar junction transistor (BJT) has three regions of operation: active, cut-off, and saturation. For switching, we ignore the active region entirely. We only care about the two ends:
Cut-off → Transistor is fully OFF (like an open switch). Collector current IC≈0.
Saturation → Transistor is fully ON (like a closed switch). Collector current is maximum, limited only by external resistance.
In cut-off, the base-emitter junction is reverse-biased or has zero voltage — no base current flows, so no collector current flows. The transistor behaves as if it's not there; the load (say, a motor or LED) gets no power.
In saturation, the base-emitter junction is forward-biased enough that the base current is large. The collector-emitter voltage drops to a very small value — typically VCE(sat)≈0.2 V for silicon transistors. This means almost the entire supply voltage appears across the load, driving maximum current through it.
How to Drive It: The Base Resistor
You cannot just apply a voltage to the base — you must limit the base current with a resistor. The transistor's base-emitter junction behaves like a diode; without a resistor, you'd burn it out.
The design rule is straightforward:
RB=IBVin−VBE
where Vin is the control voltage (e.g., from a microcontroller pin), VBE≈0.7 V for silicon, and IB is chosen to guarantee saturation.
To guarantee saturation, you make the base current larger than the minimum needed. A common rule of thumb: use a forced beta βforced≈10 to 20, much smaller than the transistor's actual current gain β. So:
IB=βforcedIC(sat)
where IC(sat) is the load current you want to switch.
A Concrete Example
Suppose you want to switch a 12 V, 100 mA LED using a 5 V microcontroller pin and a 2N2222 transistor (β≈100, VCE(sat)≈0.2 V).
- Load current: IC=100 mA.
- Base current for saturation: Use βforced=10. Then IB=100 mA/10=10 mA.
- Base resistor: RB=(5 V−0.7 V)/10 mA=430 Ω (use a standard 470 Ω).
When the microcontroller pin is HIGH (5 V), 10 mA flows into the base, the transistor saturates, and the LED glows at full brightness. When the pin is LOW (0 V), the base has no current, the transistor cuts off, and the LED is off.
Never leave the base floating. If the input is disconnected, stray noise can turn the transistor partially on, causing it to heat up or behave unpredictably. Always pull the base to ground with a resistor (say 10 kΩ) if the driving source can go high-impedance.
Why This Works: The Physics in One Sentence …