TRICKEDROCKS

EP 02 · THE SWITCH

This is a switch.

Your phone has about 20,000,000,000 of them.

Each one can flip billions of times a second.

None of them move.

So how do you build a switch… out of sand?

~20 min · see electricity move, build circuits, make a transistor

ACT 1

What is electricity?

A copper wire is already full of free electrons: tiny negative particles that can drift between the atoms. Connecting a battery doesn't send electrons racing from one end to the other. Each one just shoves its neighbour. Close the switch and watch.

THE PUSH TRAVELS · THE ELECTRONS BARELY MOVE

A long copper wire, already packed with free electrons. One of them is marked.

SO WHAT IS VOLTAGE?

Inside a battery, chemical reactions release electrons at its − end and use them up at its + end. (No electrons cross the battery itself: charged atoms, called ions, carry the charge through the paste inside.) So the − end has extra electrons and the + end is missing some. Charges push and pull on each other (like charges repel, opposite charges attract), so this imbalance creates an electric field: an invisible push that reaches into the wire and shoves every free electron along it, from the crowded − end toward the + end.

Left alone, the electrons would even out the imbalance, and the wire gives them a way to do exactly that. The chemistry keeps topping the imbalance back up, which is where the energy comes from. When the chemicals run out, it can't any more: the battery is flat.

Voltage is how much energy that push gives each bit of charge on its way around: 1 volt = 1 joule of energy per coulomb (a coulomb is about 6.24 billion billion electrons). In the bulb, the electrons crash into atoms and hand that energy over as heat and light.

A COMPLETE LOOP
BOTTOM PIECE:
  • In the long wire, close the switch and watch the push race ahead of the marked electron.
  • In the loop, turn the battery up. Watch the charge pile up at its ends, the push along the wire, and the bulb.
  • Open the switch. What happens to the electrons on the far side?
  • Swap the bottom piece for glass, then silicon.

The current meter counts how much charge flows past each second.

ACT 2

A switch can decide

CIRCUIT
BATTERY: pushes electrons out of its − end, around the loop, and back in at +. BULB: glows when electrons flow through it. The cyan dots are the electrons.

ClickTap links to lay wire. Tap a placed switch to flip it on and off.

ACT 3

The relay

Wrap a wire around iron and send a current through it, and the iron becomes a magnet. Put a springy metal lever next to it, and the magnet can pull the lever shut. That's a relay: a switch flipped by electricity. Flip the switch in the left circuit.

ONE RELAY

The left circuit powers the magnet. The right circuit is switched by it.

ACT 4

The vacuum tube

Heat a metal wire until it glows, and electrons boil off it. Inside a glass tube with the air pumped out, they fly freely to a metal plate, and a current flows through empty space. The plate is strongly positive, so it pulls them hard. Between filament and plate sits a fine wire mesh: the grid. Switch the grid between negative and 0 V and watch.

ONE VACUUM TUBE

Why doesn't the grid need to be hugely negative to fight a +100 V plate? It sits much closer to the filament, so its push dominates there. In a typical small tube, 1 volt on the grid counts as much as 20 to 100 volts on the plate, so a few volts negative shuts it off. That's also why tubes could amplify: a small signal on the grid controls a big current.

ACT 5

Sand that conducts… sometimes

Zoom into silicon. A silicon atom has 14 electrons, but 10 sit in inner shells, held tight to the nucleus. Only its 4 outer electrons matter here, and each atom shares them with its 4 neighbours: those shared pairs are the bonds. Every electron is locked in a bond, so nothing is free to move, and silicon barely conducts. Unless you swap in a few different atoms.

A SILICON CRYSTAL
CURRENT

no voltage

current = free charges × how hard the voltage pushes them

electron locked in a bond − free electron + hole: a missing electron, acts like a + charge
STEPS
  1. Press APPLY VOLTAGE on the pure crystal. Does anything flow?
  2. Pick PHOSPHORUS and clicktap one silicon atom to swap it.
  3. Swap in more until the current passes the gold line.

ACT 6

Build a transistor

Chip factories build transistors layer by layer. Follow the steps.

CROSS-SECTION OF ONE TRANSISTOR
− free electron · n-type has spare ones + hole · p-type is full of them + − fixed charged atoms (ions) in the barrier glass: an insulator, nothing crosses it

ACT 7

How small is small?

Drag the slider to zoom from a relay down to a single atom.

1 CM ACROSS

A modern transistor is about 50 nm across, and its thinnest parts are only a few nanometres: a few dozen atoms.

TRANSISTORS ON ONE CHIP

Log scale. Roughly doubling every two years for half a century: Moore's law.

So where does each tiny gate get its voltage from?

ACT 8

Switches flipping switches

In a chip, each transistor's output is wired to the gate of the next. Turn one on, and it turns on the next, and the next. It's the relay chain from Act 3, but with no clicks and no moving parts. Flip the first gate.

A CHAIN OF TRANSISTORS
slowed down billions of times: a real transistor flips in about 10 picoseconds
supply rail, about 1 V ground, 0 V

Where do all those batteries come from? They don't exist. The diagrams in this lesson each drew their own battery so you could see what drives that one circuit. A real chip has one power source, and two wires run everywhere: the supply rail, held at about 1 volt, and ground, at 0 V. Every one of its billions of transistors connects between those same two wires.

The power comes from one battery (a phone's, converted down from about 3.7 V) or a power supply plugged into the wall, and the wall is pushed by a power plant, solar panel or wind turbine. The transistors don't store any of it: each switch uses a tiny bit and turns it into heat. Billions of switches, billions of times a second, add up, which is why chips need fans and why a busy phone gets warm.

Wire them in clever patterns, a few at a time, and these chains start to decide things, like the AND and OR circuits you built in Act 2. Those patterns are called logic gates.