Project 17 — The Switch That Presses Itself (The Relay)
Text written by Claude Fable 5 (claude-fable-5).
Project 17 — The Switch That Presses Itself (The Relay)
The one idea: one circuit can press the button of another circuit. The box that does it is nothing new — it’s the last two projects glued together.
Take the lid off (parent job: work a thin blade under the cover’s seam and lever gently — a “sugar cube” relay’s lid pops off, which is why the parts list says buy two) and show the child what’s inside: a tiny coil wound on an iron core — “wait, that’s my nail!” — and a springy contact arm next to it — “that’s the glass pill’s tongues!” A relay is Project 15’s electromagnet aimed at Project 16’s switch, in one factory-made box.
What you need
- A 5 V relay — SRD-05VDC or similar, ideally de-lidded
- The 1N4007 diode (new part, pennies — the black pill with a silver stripe)
- Two separate battery packs (the whole point is that the two circuits never touch)
- Pushbutton, the Project 3 motor with its pinwheel, LED + 330 Ω
Finding the relay’s legs (SRD-style, 5 pins): two pins on one side are the coil; the other three are COM (common), NO (normally open — not touching COM until the coil pulls), and NC (normally closed — touching COM until the coil pulls). With the lid off the child can see which is which; with the lid on, the case usually has a diagram, or find the coil pair with the battery — it’s the pair that clicks.
Warm-up — feel the decision
Coil pins to the 6 V pack through the pushbutton (a 5 V coil is happy at 6 V). Press: CLICK. Release: click. Have the child hold the relay in their fingers while pressing — you can feel it decide. With the lid off, watch the arm snap down onto the contact. This is the electromagnet crane picking up its one, permanently-installed paperclip.
Add the diode now and forever: across the coil pins, stripe toward +. (Why: see the physics. Rule for the child: “the coil gets one seatbelt.”)
Build it — small circuit commands big circuit
- Command circuit: 6 V pack → pushbutton → coil → back to pack. Diode across the coil, stripe to +.
- Power circuit: motor pack + → relay COM; relay NO → motor; motor → motor pack −. Completely separate loop, separate battery.
- Press the button: click — the pinwheel spins up. Release: click — it stops.
Trace both loops with a finger and let it land: no wire connects them. The button’s electricity never touches the motor’s electricity — the command crosses the gap as magnetism, inside the box.
Now the flourish that makes this the arc’s hinge: replace the pushbutton with any sensor the series has built. The reed switch: a magnet waved near the table now starts the motor. The Project 7 beam-and-transistor: breaking a light beam starts the motor (put the relay coil where that project’s buzzer was — the transistor drives the coil happily; keep the diode). Every “signal” circuit the child owns can now command every “power” circuit. That plug-anything-into-anything feeling is what engineers actually mean by a component.
What to say to the child
“Inside this little box is your nail-magnet, but tiny, and next to it a springy switch like the glass pill’s tongues. When our small circuit turns the little magnet on, it pulls the springy switch closed — and that switch belongs to the other circuit, the big motor one. So the small circuit never touches the big one — it just leans over and presses its button. Click! Hear that? That’s the sound of one circuit bossing another one around. The very first computers were thousands of these, clicking away in big rooms like a rainstorm.”
And the story: early computers really were relays — Konrad Zuse’s Z3 (1941) computed with 2600 of them. In 1947, engineers found a moth squashed in relay #70 of Harvard’s Mark II and taped it into the logbook: “first actual case of bug being found.” The child has now personally met the kind of part the first computer bug died in.
For you — the physics
- Why 6 V drives a “5 V” coil fine: the coil is ~70 Ω, so ~85 mA and ~0.5 W — within spec (coils tolerate ±20 % happily; what matters is enough mmf to pull in against the spring). Note the economy: 85 mA of command current can switch the 10 A/250 V printed on the lid — a power gain of ~500× and full galvanic isolation. That printed rating is also worth a beat of respect: this same part is how low-voltage things (thermostats, doorbells, car keys) safely boss mains-level things around. We stay at battery volts, but the child is handling the real industrial part, not a toy version.
- The diode is the interesting new physics. The coil stores ; interrupt its ~85 mA in microseconds and spikes to hundreds of volts — enough to arc the pushbutton’s contacts (visible in the dark as a pinprick spark) and to kill a transistor instantly if one is doing the switching. The flyback diode gives that current a freewheeling loop: the spike clamps at ~0.7 V and the current decays over ms. Side effect worth knowing: the relay releases slightly slower with the diode (the field dies gently instead of being torn down). The explainer does the honest math.
- Snap action, again: as the armature approaches, the magnetic gap shrinks and the pull increases — so the relay commits, hard, in ~5 ms. Same positive-geometric-feedback trick as the reed switch. The click the child hears is a bistable system crossing its threshold; there is no half-pressed relay.
- The relay’s heir is on your breadboard. The NPN transistor is “a relay with no moving parts” — third circuit-controlling-circuit technology of the series (mechanical: relay; optical: optocoupler, which is Project 7’s part in a lightproof box; semiconductor: transistor). Faster (ns vs ms), silent, eternal — but no isolation and no satisfying click. Computers went relay → vacuum tube → transistor; the child is walking the same road in the other order.
Try next
- The relay that holds itself: wire the NO contact so that, once the coil pulls in, the contact feeds the coil (in parallel with the button). Press once — click — and it stays on after you let go; interrupt the coil feed to reset. A self-holding relay is a 1-bit memory made of magnetism and spring steel — Project 8’s latch, reincarnated. Race-judge circuit, relay edition, is entirely buildable.
- Two relays, two buttons, one motor: wire one through NC and one through NO and discover AND/OR logic by accident.
- Don’t dismantle the setup — the next project needs exactly one relay and one sneaky idea: what happens if the relay’s own switch cuts the relay’s own power?
← Back to Read Me First.