Electricity/Transistors and switching/What a transistor is

What a transistor is

A transistor is a tap you turn with electricity instead of your hand. A trickle into one leg lets a hundred times as much through the other two, which is how a pin that can only give 20 milliamps ends up running a motor.

A diode has two legs and one trick. A transistor has three, and the third one changes what a circuit can be: it is the first part on this site whose job is to let one current decide what another current does.

Drag the slider.

A trickle holding open a torrent
shut
Water into the base pipe0 µA
Into the base
0
Through the big pipe
0
Out of the emitter
0
Nothing in, nothing through. The flap is shut and the big pipe is doing nothing at all, even though there is plenty of pressure behind it. A transistor with nothing on its base is an open switch.

Small in, large out

That is the whole idea, and it is worth saying in the smallest possible way:

  • A trickle goes into the base.
  • A much larger current is allowed through the collector.
  • Both leave together at the emitter.

The trickle is doing no work. It is not pushing the big current along — the supply does that. It is holding a gate open, the way your finger on a tap is not what makes the water come out.

The ratio between the two is about 100 for the small transistors in a beginner's kit. Put 100 microamps into the base and around 10 milliamps is allowed through the collector. That number has a name, gain, and the next page is about where it comes from and how far you can trust it.

It costs 0.7 V to start

Nothing at all happens until the base is about 0.7 V above the emitter. Below that the transistor is off — not dim, not slightly on, off.

If that number looks familiar it is because it is the same 0.7 V from the diode chapter, and it is the same physics. There is a junction in there, and you have to pay to cross it.

The three legs

Three legs, and no way to tell from the symbol
2N3904 · B
Leg
Part
Base — the control leg. The one you drive, through a resistor, from a GPIO pin or a switch. It takes a trickle: tens or hundreds of microamps. Nothing at all happens here until it is about 0.7 V above the emitter. Switch the part and watch it move: the symbol did not change and the leg did, which is why the datasheet is not optional.

The symbol tells you which leg does what. It does not tell you which leg is which on the actual part, and the two transistors in most starter kits are mirror images of each other. Read the number printed on the flat face, then read that number's datasheet. This is not fussiness: a transistor fitted backwards usually still does something, which is worse than doing nothing.

Two jobs, and you only need one of them

A transistor can sit anywhere between fully off and fully on, and that is what makes it an amplifier: a small wobble on the base becomes a large wobble at the collector. Radios, microphones and guitar pedals are built out of that.

You will not be doing that. In every project on this site the transistor is either fully off or shoved fully on, because that is what a switch is and because the in-between state is where the part gets hot. Which is the last page of this chapter: a transistor as a switch.

Edit this page — content/fundamentals/electricity/what-a-transistor-is.mdx

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Fundamentals on the forum