A is a valve for electric current, worked by another, much smaller current. It was invented at Bell Labs in 1947, and the computer series tells the story in Smaller and Faster. Billions of them now sit inside every phone. The ones in this part come one at a time, in little black cases with three legs.
The commonest kind on a beginner’s bench is the : the BC547 in Europe, the 2N3904 or 2N2222 in America. Its three legs are:
- The collector, where the big current comes in from the load, such as an LED and its resistor.
- The emitter, where it leaves, usually straight to the − rail.
- The base, the control. A small current flowing into the base and out through the emitter switches the big one on.
In the circuit symbol, the emitter is the leg with the arrow, and on an NPN transistor the arrow points out. “NPN: not pointing in” is the old way to remember it.
Pin orders differ between types, and even between makers of the same type, so check the datasheet, or ask your multimeter. On the diode setting, an NPN transistor behaves like two diodes back to back with their anodes joined at the base. Red probe on the base and black on either other leg shows about 0.6 to 0.7 volts; any other pair shows OL. That finds the base. The emitter usually reads a few millivolts higher than the collector.
Picture a big water pipe with a heavy valve in it, and beside it a small tap. Turn the small tap a little, and a trickle of water pushes on the big valve and opens it. The big flow through the main pipe is many times the trickle, but it is the trickle that decides how far the valve opens.
In the transistor, the trickle is the base current and the big flow is the collector current. How many times bigger is the transistor’s , written β (beta) or hFE. For a BC547 it lies somewhere between about 110 and 800, depending on the batch; the letter after the number, A, B or C, tells you which range. We will use 200 as a round figure.
Two details stop the picture from being too simple:
- The base needs a push to get started. Like a diode, the base-emitter junction lets almost no current through below about 0.6 volts, and holds itself at about 0.7 volts once current flows.
- The load sets a ceiling. Gain only says how much the transistor would allow. If the LED and its resistor can only pass 11 mA, that is all that flows, however hard you open the valve. The transistor is then fully on, or , with only about 0.1 to 0.2 volts left across it.
So a transistor has three states: off, with no base current; partly on, with the collector current equal to gain times base current; and fully on, with the load in charge. As a switch, it should only ever be off or fully on.
The transistor as a valve
Turn up the base current slowly. Watch the collector current follow it, two hundred times bigger, until the LED's resistor sets the limit and the transistor is fully on.
20 µA into the base lets about 4 mA through: 200 times as much. The transistor is partly on, and the LED is dim.
An NPN transistor with a gain of 200 switching a red LED and 220 Ω from 4.5 V. A real BC547's gain lies anywhere from about 110 to 800, so the currents are approximate.
A switch should be fully on, so the base needs comfortably more current than the bare minimum. That current comes through a resistor, from whatever is doing the switching. Four steps:
- Find the load current. A red LED with 220 Ω on 4.5 volts: about 11 mA.
- Divide by the lowest gain the transistor might have. 11 mA ÷ 110 = 0.1 mA. That is the least that could possibly do.
- Allow a good margin. Multiply by five to ten, so any transistor of the type will be fully on: about 0.5 mA.
- Use Ohm’s law on what is left. The base sits at 0.7 volts, so 4.5 − 0.7 = 3.8 volts are across the resistor. 3.8 ÷ 0.5 mA = 7.6 kΩ. Round down this time, so the current goes up: 6.8 kΩ, or the more common 4.7 kΩ.
A small lamp or motor taking 100 mA needs a bigger transistor, since 100 mA is the BC547’s absolute limit. A 2N2222 can take 600 mA. With a lowest gain of about 100, it needs 1 mA of base current, 5 mA with the margin, so 3.8 ÷ 5 mA, about 680 Ω.
Why insist on fully on? Because of heat. A transistor turns the voltage across it times the current through it into heat. Fully on, there is hardly any voltage across it, and it stays cool. Half on, with a couple of volts across it and a big current through it, it gets hot.
The most sensitive base resistor of all is your finger. Skin conducts a little, enough to let a few microamps through, and a transistor turns microamps into milliamps.
- Build the LED and 220 Ω resistor from the + rail to the transistor’s collector, and connect the emitter to the − rail.
- Connect a 1 kΩ resistor to the base, and a bare wire to its other end. This resistor protects the transistor if the wires touch each other.
- Run a second bare wire from the + rail and lay its end close to the first, a few millimetres apart, without touching.
- Touch both wire ends at once with one fingertip.
The LED glows, faintly with a light touch, more with a firm or damp one. Your finger, somewhere around a million ohms, lets about 4 microamps into the base, and the transistor turns it into about a milliamp.
For a brighter result, add a second transistor. The first one’s emitter feeds the second one’s base, its collector goes to the + rail, and the second one switches the LED. This is a Darlington pair, invented by Sidney Darlington in 1953: the gains multiply, 200 × 200 = 40,000, and the faintest touch turns the LED fully on.
Part 3 built a divider with a light-dependent resistor, whose voltage rose as the light fell. A transistor turns that rising voltage into a switch.
- Keep the LED, 220 Ω and transistor from the touch switch, without the bare wires.
- Put a 47 kΩ resistor from the + rail to the base, and the LDR from the base to the − rail.
In a lit room, the LDR is a few thousand ohms and holds the base well below 0.6 volts: the transistor is off. As the light fades, the LDR’s resistance climbs, the base voltage rises past 0.6 volts, and current starts to flow. Cup your hand over the LDR and the LED comes on.
The 47 kΩ decides how dark it must get. A bigger resistor makes it switch in brighter light; a smaller one waits for deeper darkness. Part 10 replaces it with a knob, so you can set the level.
Finger and shadow
Touch the wires with different fingers, then switch to the night light and change the light, or hold your hand over the LDR. In both, try adding a second transistor.
Your finger, about 1 MΩ, lets 3.87 µA into the base. × 200 that would be 774 µA, so the LED glows faintly. Try adding a second transistor.
NPN transistors with a gain of 200, a red LED with 220 Ω and a 4.5 V battery. Skin resistance varies a lot from person to person, and with the weather, so the currents are approximate.
Notice how the night light switches. With one transistor it fades in gradually as the room darkens; with two, the change is quicker, though still not instant. Between off and fully on is a whole range of “partly on”, where the output copies the input’s every wobble, only bigger. That range is no use for a switch, but it is exactly what an amplifier needs, and the next part puts it to work.
Sources for this part
Transistors
- Bipolar junction transistor – Wikipedia
- History of the transistor – Wikipedia
- BC548 – Wikipedia (the BC546, BC547 and BC548 family)
- 2N2222 – Wikipedia
- 2N3904 – Wikipedia
- Darlington transistor – Wikipedia