Comparators & Mixed-Signal Building Blocks

a transistor driver

A logic pin is a 95-pound weakling: it can output a clean HIGH or LOW but only deliver a few milliamps. A motor, a relay coil, a buzzer, or a string of LEDs may want hundreds of milliamps or amps. A transistor driver is the muscle that bridges this gap — a single transistor used as a switch, where the feeble logic signal controls the small base or gate current and the transistor handles the large load current. Think of a tap: a light touch on the handle (the logic pin) controls a powerful flow (the load).

The standard low-side driver puts the load between the supply and the transistor's collector (or drain), with the transistor's emitter (or source) to ground. Drive the base through a resistor and the transistor saturates, connecting the load to ground and turning it on. With a BJT you must supply enough base current: for a load of 200 mA and a transistor beta of 50 you need at least 200/50 = 4 mA of base current, and you usually provide more to drive it hard into saturation, choosing the base resistor as (Vlogic - 0.7) / Ibase. A logic-level MOSFET is often easier — it needs almost no steady gate current, just enough voltage above its threshold, and its low on-resistance wastes little heat. Either way, an inductive load like a relay or motor needs a flyback diode across it to absorb the voltage spike when the transistor switches off.

Transistor drivers are how a microcontroller turns logic into action: switching relays, LEDs, solenoids, heaters, and small motors. The honest details that bite beginners: forget the flyback diode and the turn-off spike from an inductive load will punch through and destroy the transistor; underdrive a BJT base and it leaves saturation, dropping volts and overheating; and a tiny logic-pin transistor cannot itself drive a big load — you size the device for the current and the heat. For many small loads, a ULN2003-style array packs seven ready-made drivers with built-in flyback diodes into one chip.

A microcontroller pin (sourcing 5 mA) drives the base of an NPN transistor through a 1 kΩ resistor to switch a 12 V relay coil drawing 80 mA. A flyback diode sits across the coil. The pin could never supply 80 mA itself; the transistor does the heavy lifting.

A weak logic signal commands a strong current — a tap, not a wall.

Switching an inductive load (relay, motor, solenoid) without a flyback diode is a classic transistor-killer: the collapsing magnetic field produces a high-voltage spike that breaks down and destroys the switch.

Also called
switch driverload driverlow-side driver低側驅動