Both the BJT and the MOSFET can switch a load on and off from a 5 V logic signal — but they waste very different amounts of power doing it. Take the same job for both: a 12 V, 2 A lamp (a 6 Ω load), switched by a 5 V microcontroller pin, at 20 kHz PWM. The BJT burns 1.43 W. The MOSFET burns 0.12 W — twelve times less. This article works out where every milliwatt goes, and when the BJT is still the right choice.
Figure 1: The same 12 V, 2 A lamp driven by a BJT (a, left) and by a logic-level MOSFET (a, right), from the same 5 V signal — and the total loss of each at 20 kHz PWM (b). The MOSFET wastes 12 times less power. (Schematic, not to scale.)
The BJT: three losses, and the base current is one of them
A BJT is a current-controlled switch: to pass 2 A through the collector, the base must be fed a good fraction of that. For reliable saturation, use a forced beta of about 20, so IB = 2 / 20 = 100 mA. From a 5 V logic pin through a base resistor, with VBE = 0.7 V:
RB = (5 − 0.7) / 0.1 = 43 Ω → use the standard 47 Ω
That gives IB = (5 − 0.7) / 47 = 91.5 mA, a forced beta of 2 / 0.0915 = 21.9 — still safely saturated. Now the three losses. First, conduction: a saturated TIP31 drops about VCE(sat) = 0.4 V at 2 A:
Pcond = 0.4 × 2 = 0.80 W
Second, switching: a BJT is slow to turn off — its storage time is around 1 µs — so at 20 kHz PWM it spends part of every cycle half-on, with full voltage and full current across it at the same time:
Psw = ½ × 12 × 2 × 1 µs × 20 kHz = 0.24 W
Third, the base drive itself: the 4.3 V across RB at 91.5 mA is 4.3 × 0.0915 = 0.39 W — burned in the resistor and in the microcontroller pin, which must also source 91.5 mA, far more than most pins are rated for. Total for the BJT:
Ptotal = 0.80 + 0.24 + 0.39 = 1.43 W
The load takes 24 W, so the switch efficiency is 24 / (24 + 1.43) = 94.4%. And it runs hot: in a TO-220 package with about 62.5 °C/W to ambient, 1.43 W is an 89 °C rise — about 114 °C at a 25 °C room temperature, uncomfortably close to the 150 °C limit.
The MOSFET: voltage-controlled, so the drive costs almost nothing
A MOSFET is voltage-controlled: the gate is an insulated capacitor, so it draws no DC current at all. The key number is the on-resistance. The IRLZ44N is a logic-level MOSFET — its RDS(on) is 0.022 Ω at VGS = 5 V, so it is fully on from a 5 V logic pin. (A standard IRFZ44N needs 10 V on the gate; at 5 V it would be barely on and would burn far more. Always check the RDS(on) test voltage in the datasheet.) Conduction loss:
VDS = 0.022 × 2 = 0.044 V, Pcond = 0.022 × 2² = 0.088 W
Switching is fast — rise plus fall around 100 ns with a 220 Ω gate resistor — so:
Psw = ½ × 12 × 2 × 100 ns × 20 kHz = 0.024 W
Gate drive costs only the charge moved in and out of the gate each cycle: with Qg = 48 nC, Pgate = 48 nC × 5 V × 20 kHz = 0.0048 W. Total for the MOSFET:
Ptotal = 0.088 + 0.024 + 0.005 = 0.117 W
Efficiency is 24 / (24 + 0.117) = 99.5%, and the temperature rise is only 0.117 × 62.5 = 7.3 °C — the MOSFET stays near room temperature with no heatsink. Even with no PWM at all (plain DC switching), the BJT still loses 0.80 + 0.39 = 1.19 W against the MOSFET's 0.088 W.
When the BJT still wins
The MOSFET is not better at everything. A BJT costs less, it is rugged — no fragile gate oxide to damage with static — and it works fine from any drive voltage once the base resistor is right. For a slow, low-current switch (a relay, a small LED, a buzzer) the BJT's 0.4 V drop costs almost nothing, and a 2N2222 with a 1 kΩ base resistor is the simplest circuit in the drawer. But for currents above about 1 A, or for any PWM switching, the MOSFET's near-zero drive current and milliohm on-resistance make it the clear winner — just remember to pick a logic-level part when the drive is only 5 V.
Key points to remember
- Same job — 12 V, 2 A lamp, 5 V drive, 20 kHz PWM: the TIP31 BJT loses 1.43 W, the IRLZ44N MOSFET loses 0.117 W, about 12 times less.
- BJT losses: conduction 0.4 V × 2 A = 0.80 W; switching ½ × 12 × 2 × 1 µs × 20 kHz = 0.24 W; base drive 4.3 V × 91.5 mA = 0.39 W — the base alone burns more than the whole MOSFET.
- The base resistor is RB = (5 − 0.7) / 0.1 = 43 Ω → 47 Ω standard, giving IB = 91.5 mA and a forced beta of 21.9.
- MOSFET losses: conduction 0.022 Ω × 2² = 0.088 W (VDS only 0.044 V); switching 0.024 W (100 ns edges); gate drive 48 nC × 5 V × 20 kHz = 0.0048 W.
- Efficiency: 94.4% (BJT) vs 99.5% (MOSFET); temperature rise in a TO-220 package: about 89 °C for the BJT (114 °C junction) vs 7.3 °C for the MOSFET.
- Use a logic-level MOSFET (like the IRLZ44N, RDS(on) = 0.022 Ω at VGS = 5 V) with 5 V drive — a standard MOSFET needs 10 V on the gate. The BJT still wins for cheap, slow, low-current switching.
