skill
Transistor switching
A tiny current at the base opens a gate for a much bigger one.
first shows up at Level 3 · Sense
See it working
simulating…
A transistor is an electronic switch — but instead of your finger flipping it, a small electrical signal does. That means a sensor (which can only move tiny amounts of current) can control an LED, a buzzer, or a motor (which need much more).
The three legs of an NPN transistor
- Base (B) — the "control" pin. A tiny current here decides everything.
- Collector (C) — where the big current comes in.
- Emitter (E) — where it leaves, on its way back to −.
The rule
When enough current flows into the base, the transistor "turns on" and a much bigger current can flow from collector to emitter. Roughly:
I_collector ≈ β × I_base (β is often 100 or more)
So 50 µA into the base can control 5 mA through the collector. The transistor amplifies: a small current controls a larger one.
Where you'll see it
Any project where a sensor (LDR, button, microphone) has to trigger something loud, bright, or moving uses a transistor as the middleman. It's the bridge between "I detected something" and "I did something about it".
Sizing the base resistor
You never wire a signal straight to the base — the base–emitter junction only drops 0.7 V, so an unlimited current would flow and the transistor would cook. Instead a base resistor sits between the signal and the base, sized to deliver about ten times the strict minimum base current (that is, 10 × Ic ÷ β). The extra headroom keeps the transistor saturated when β drifts with temperature or load. The transistor base resistor calculator runs the math and shows the switch turning on live.
The upside-down twin: PNP
Every NPN has a mirror image, the PNP. Its big current flows in at the emitter and out at the collector, so its emitter goes to + and the load hangs off its collector down to −. And it turns on when the base is pulled about 0.7 V below the emitter, not above. An NPN switches the − side of a load; a PNP switches the + side. Together they can push a signal either way, which is how motor drivers and most chip outputs work. The Upside-Down Transistor builds one.