blog · 7 August 2026
The transistor as a switch: small current, big current
Build an NPN low-side switch in the simulator, size the base resistor for saturation, and measure base and collector currents to see the whole point of the part.
A transistor's first job in every curriculum is the least glamorous one: being a switch. A few milliamps into the base controls tens of milliamps through the collector, and once you have measured that ratio yourself, half of digital electronics stops being mysterious. The simulator makes the measurement trivial, so today we build the classic NPN low-side switch and actually read the numbers.
The circuit
Open sim.devoltapp.com and build on a Breadboard (400) with the Bench PSU at 5 V:
- Red LED with a 220 Ω Resistor from 5 V down to a free column: supply, resistor, LED anode, LED cathode into the column. This is the load.
- NPN Transistor below it. It is a generic NPN with a gain of 100; hover each leg to see which is the emitter, base, and collector rather than trusting memory. Collector to the LED's cathode column, emitter to ground.
- Push Button from 5 V to a new column, and a 4.7 kΩ Resistor from that column to the transistor's base. Button feeds resistor feeds base.
- A 10 kΩ pull-down from the base column to ground keeps the base at a defined 0 V while the button is up, which yesterday's post earned the right to call non-negotiable.
Run it. Press the button: the LED lights. Release: dark. So far, indistinguishable from wiring the button in series with the LED, and cheaper to do that way. The measurements are where the transistor earns its socket.
Measure the ratio
Open the multimeter (View → Multimeter) and use current mode: the meter reads a branch's current when its probes straddle exactly one two-terminal component, so put the probes across each resistor in turn while holding the button.
- Across the 4.7 kΩ base resistor: about 0.9 mA. The arithmetic checks: 5 V minus a 0.7 V base-emitter drop leaves 4.3 V, and 4.3 V over 4.7 kΩ is 0.91 mA.
- Across the 220 Ω load resistor: about 14 mA, set by the LED chain exactly as in the first post of this series, because the transistor is fully on and its collector sits near 0.2 V.
Fifteen times more current in the controlled path than the controlling path, and the controlling path could as easily be a micro:bit pin as a button: P0's 3.3 V through the same base resistor gives 0.55 mA, still plenty. That is the entire trick, and now it is a pair of numbers you measured rather than a sentence you memorised.
Saturation, and how to lose it
The switch works because the base current is generous. The rule of thumb for a saturated switch is base current of at least a tenth of collector current; we are at 0.9 mA driving 14 mA, comfortably past it.
Break the margin on purpose. Select the base resistor and use the Inspector's value chips to raise it: at 47 kΩ the base gets 0.09 mA, and the transistor can no longer pass 14 mA on the collector side. Probe the collector node with the scope: instead of sitting near 0.2 V when pressed, it hangs partway up, the LED dims, and the transistor is now a linear amplifier dissipating real power, which the July thermal modelling will cheerfully turn into a warning if you push a bigger load through it. Put the 4.7 kΩ back and the collector snaps down to a saturated couple hundred millivolts.
That collector voltage is the honest definition of "on" for a switch: not "the LED looks lit", but "the transistor drops almost nothing".
Where this goes
This exact topology, scaled up, is how a 3.3 V pin drives a relay coil, a motor, or a strip of LEDs: the ULN2003A in the Drivers group is seven of these switches in one package with the base resistors built in. And the inverted question (what if I want the load on when the input is low?) leads to the PNP Transistor sitting next to the NPN in the palette, wired mirror-image from the positive rail.
The transistor's model parameters and its measured-vs-datasheet behaviour are documented at docs.devoltapp.com/parts/transistors. Tomorrow: the potentiometer, the voltage divider, and a knob worth turning.