Ground Embedded KO Subscribe

Notes / Electronic Circuits

BJT switch: a small current switching a large one

A small base current switches a large collector current on and off. Saturation and the base resistor calculation.

GROUND EMBEDDED · NOTEElectronic Circuits 03BJT as a switchVCC 3.3V10kΩButtonMCUGPIOHIGH when released

In an NPN transistor, a base-emitter current Ib allows about hFE × Ib to flow from collector to emitter.

Using it as a switch

GPIO 3.3 VBase resistorBasesmall currentCollector → emitterlarge currentLoad on
A small current into the base lets a large current flow through the collector.

A low-side switch that turns on a 100 mA relay from an MCU pin:

  • With a minimum hFE of 100, the Ib needed is 1 mA. To saturate it firmly, drive 3 to 5 times that: 3 to 5 mA.
  • Rb = (3.3 V - 0.7 V) / 3 mA ≈ 870 Ω → use something near 1 kΩ.
  • When saturated, Vce(sat) is about 0.1 to 0.3 V, so the transistor dissipates little.

Checklist

  • A pull-down of about 10 kΩ from base to emitter keeps it firmly off while the MCU is in reset.
  • Fit a flyback diode on coil loads such as relays.
  • Beyond a few amps the base current becomes too large and a MOSFET is the better fit.
BJT MOSFET
Drive Current Voltage
On-state loss Vce(sat) × I I² × Rds(on)
Suited to Small signals, low cost Large currents, fast switching
FREE PDFGet the 3 free ebooksIf you want to keep reading this topic as one book: BLDC motor control, serial communication and sensors at book length. PDFs are in Korean.Get them free →