Circuit Bytes · Episode 26 · Components · Transistors
The transistor as a switch
A transistor is like a valve that a small trickle can open. A small current into the base lets a big current flow from collector to emitter, so a weak chip signal can switch a motor on and off.
A valve a trickle can open
Your phone's chip holds billions of tiny switches with no moving parts: transistors. A handy picture is a valve: a small side trickle pushes the valve open, and a big flow rushes through the main pipe. The valve picture is a simplification, but it captures the key idea: a small current controls a much bigger one.
Three legs: base, collector and emitter
The transistor in this lesson is an NPN bipolar junction transistor (BJT). It has three legs:
- Base (B): the control input, where the small current goes in.
- Collector (C): where the big load current comes in.
- Emitter (E): where both currents leave, usually to the negative side (ground).
A small base current lets a much bigger current flow from collector to emitter. The arrow on the symbol sits on the emitter.
Off and on
- No base current: off. The transistor is in cutoff: almost no current flows from collector to emitter (only a tiny leakage), like an open switch.
- Enough base current: fully on. The transistor is in saturation: the load gets its full current, like a closed switch. "Fully on" still leaves a small voltage across the transistor, roughly 0.1 to 0.3 V.
The base also needs about 0.6 to 0.7 V before base current starts to flow.
Switching a load from a chip
A microcontroller pin can only supply a small current, too little for a motor or a bright lamp. Put the load between the supply and the collector, connect the emitter to ground, and feed the base from the chip pin through a resistor (the resistor sets the base current). Now a weak signal switches a big load.
Rule of thumb: feed the base about a tenth of the load current. This "forced gain of 10" makes sure the transistor is driven hard into saturation; many datasheets use the same Ic ÷ Ib = 10 condition. The real minimum depends on the transistor's gain.
Example from the video: an LED needing 20 mA gets 20 ÷ 10 = 2 mA at the base.
Phone chips use a cousin
The chips in phones and computers use MOSFETs (in CMOS logic), a cousin of the BJT. A MOSFET is switched by a voltage at its gate instead of a current into a base, but the idea is the same: a small control signal turns a bigger path on and off. Modern phone chips hold billions to tens of billions of them.
Try it yourself
A small lamp needs 150 mA. Using the one-tenth rule, how much base current should you aim for? 150 ÷ 10 = 15 mA. Then check that your chip pin can supply it: many microcontroller pins are rated for about 20 mA or less, so near that limit you would choose a different driver (for example a MOSFET).
Good to know
- NPN switches usually sit on the "low side": load between the supply and the collector, emitter to ground.
- Always use a base resistor; never connect the base straight to a supply or a chip pin.
- Motors and relays need a flyback diode across them to protect the transistor when they switch off (see episodes 23 and 24).
- The one-tenth rule is a design rule of thumb for switching, not a law; amplifier circuits work the transistor differently (next episode).
- Battery voltages only: never experiment with mains (wall outlet) power.
Answer to the comment question
A motor needs 400 milliamps. Using the one-tenth rule, how many milliamps go into the base? 40 milliamps. 400 mA ÷ 10 = 40 mA.
Test your knowledge
Quick quiz: The transistor as a switch
4 multiple-choice questions. Pick one answer for each, then check how you did.
Sources
- All About Circuits textbook, "The Bipolar Junction Transistor (BJT) as a Switch": cutoff and saturation as off and on
- SparkFun Learn, "Transistors: Applications I, Switches": base, collector, emitter; base resistor sizing
- Analog Devices Wiki, ADALM1000 lab "Activity: BJT device as a switch": saturation and cutoff
- HyperPhysics (Georgia State University), "Transistors": a small base current controls a larger collector current
Video transcript
How do your phone's billions of tiny switches work with no moving parts?
It's a transistor: a valve a small trickle can open, letting a big flow through.
Three legs: base, collector and emitter. A small base current lets a big current flow from collector to emitter.
No base current? Off. Enough? Fully on, like a closed switch.
So a weak chip signal can switch a motor. Rule of thumb: feed the base a tenth of the load current.
An LED needing twenty milliamps gets two at the base. Phone chips use a cousin of this part, with the same idea.
A motor needs four hundred milliamps. Using the one-tenth rule, how many milliamps go into the base? Comment your answer below!
That's your byte.