A tap with a tiny handle
Every component you have met so far is passive: a resistor only ever drops voltage, a capacitor only stores charge, and even the diode from the last rung can only block one way and pass the other. None of them can take a weak signal and make a strong thing happen. The bipolar junction transistor (BJT) is the first active device in this whole ladder — the first part that can control. The picture to hold in your head is a tap (a faucet): a tiny movement of the handle controls a big flow of water, and the handle takes almost no effort while the flow does the real work.
A BJT has three leads, not two: the base, the collector, and the emitter — base, collector, emitter. The base is the handle; current flows in the main path between collector and emitter, and a small current into the base sets how wide that path opens. Inside the silicon it is a sandwich of three doped layers: an NPN transistor is n-p-n, and a PNP is p-n-p, the mirror image. You can even picture it as two of last rung's PN junctions sharing the thin middle base layer back to back — though that picture explains the diode-like base, not the gain, so do not lean on it too hard.
Small base current, big collector current
To turn an NPN on, you must first push current into the base. The base-emitter path is itself a forward-biased diode, so it needs about 0.7 V across it before any base current flows — the same forward voltage drop you met with diodes, and just as before that 0.7 V is a handy model, not a fixed constant. Once base current is flowing, the magic appears: a small base current Ib commands a much larger collector current Ic flowing in the main path.
The ratio between them is the current gain, written beta (or h_FE on a datasheet): Ic = beta times Ib. A typical small-signal NPN has a beta somewhere around 100 to 300. So if beta is 150 and you trickle Ib = 0.1 mA into the base, the collector can carry Ic = 150 times 0.1 mA = 15 mA. A tenth of a milliamp from a sensor or a logic pin controls fifteen milliamps through a load — that is amplification, and it is what makes the transistor an active device. The current gain beta is the number that captures the whole 'tiny handle, big flow' idea.
But hold one warning in mind from the very start: this neat proportional law, Ic = beta times Ib, only holds in one of the transistor's operating modes — the active region, which the next guide will mine for amplification. Push the base harder and harder and the proportionality eventually gives out, because the load in the collector simply runs out of voltage to give. That breakdown of the law is not a failure — it is exactly the behaviour a switch wants.
Three regions — a switch uses only the ends
A BJT lives in one of three operating regions. In cutoff, there is no base current, so no collector current flows — the tap is shut and the transistor is OFF, an open circuit. In the active region, base current is flowing and Ic = beta times Ib faithfully holds — this is the smooth, in-between zone for amplifiers. In saturation, you have shoved so much current into the base that the collector cannot keep up its beta-times-Ib promise; the path is wide open, the collector-to-emitter voltage collapses to a small leftover called Vce(sat), roughly 0.1 to 0.2 V, and the transistor is fully ON.
A switch deliberately uses only the two ends — cutoff and saturation — and slams through the active middle as fast as possible. Think about where the heat goes. When OFF there is almost no current, so the power dissipated in the transistor (P = V times I) is tiny even though the full supply sits across it. When ON, the current is large but the voltage across it is only ~0.2 V, so again the power is small. It is only the linear middle — meaningful voltage and meaningful current at once — that gets a transistor hot, and a switch spends almost no time there.
Designing an NPN low-side switch
The everyday workhorse is the low-side switch using a transistor switch: the load hangs between the positive supply and the collector, the emitter goes to ground, and a control voltage drives the base through a base resistor. It is called 'low side' because the transistor sits between the load and ground — on the low, ground-referenced side of the load (low-side switching). When the control input is high the transistor saturates and current flows through the load; when it is low (0 V) the transistor is in cutoff and the load is off.
+5 V
|
[ Rc ] 270 ohm
|
_V_ LED (cathode toward C)
|
o C (collector)
|
in --[ Rb ]--o B (base) NPN (e.g. 2N3904)
5V/0V 3k3 |
o E (emitter)
|
GND- Size the collector resistor for the load current. Say we want 10 mA through an LED (LED, ~2 V drop) on a 5 V supply, with the transistor saturated (~0.2 V left). This Rc is just a current-limiting resistor: Rc = (5 - 2 - 0.2) / 0.01 = 280 ohm, so pick the nearest standard 270 ohm.
- Pick the base current by overdrive, not by beta. Do NOT compute Ib = Ic / beta — that trusts a number you cannot trust. Instead force a low 'switching beta' of about 10, so Ib = Ic / 10 = 10 mA / 10 = 1 mA. That is several times more base current than any real beta would demand, which jams the device into saturation.
- Size the base resistor with Ohm's law. The base sits at ~0.7 V above the emitter, so Rb drops the rest of the control voltage: by Ohm's law, Rb = (Vin - 0.7) / Ib = (5 - 0.7) / 0.001 = 4300 ohm. Choose 3.3 k for margin; it gives Ib = (5 - 0.7) / 3300 ≈ 1.3 mA. (Driving from a 3.3 V logic pin instead? Use (3.3 - 0.7) / 0.001 ≈ 2.6 k, so 2.2 k.)
- Check that it truly saturates. Even a sickly transistor with beta = 50 could carry beta times Ib = 50 times 1.3 mA = 65 mA — far more than the 10 mA the load actually draws. Because the supply can only ever push ~10 mA through Rc, the transistor is forced deep into saturation regardless of its exact beta. That is the whole point: the design works for any beta in the datasheet's range.
Honest limits and the family
The single most important honesty of this whole rung: beta varies wildly. The datasheet for one part number might quote beta anywhere from 100 to 400, and on top of that spread it drifts with temperature and with collector current. Good design therefore never relies on a precise beta. For a switch the cure is overdrive, as we just did. For an amplifier (the guides ahead) the cure is negative feedback and an emitter resistor that set the operating point from resistor ratios instead. Whenever you catch a design whose behaviour hinges on the exact value of beta, treat it as a bug.
Switching a coil — a relay or a motor — adds one mandatory part. An inductor is a flywheel for current: when you suddenly turn the transistor off, the coil's current cannot stop instantly, so it forces the collector voltage to spike to hundreds of volts trying to keep flowing, and that spike can destroy the transistor. The fix is a flyback diode across the coil, reversed so it normally blocks, giving that trapped current a safe loop to die away in. A transistor switching a relay this way is the classic transistor driver, and the diode is never optional.