Building a Relay-Controlled Circuit
Let a low-voltage transistor circuit safely switch a completely separate, higher-power circuit using an electromagnetic relay.
You'll need: a 5V or 12V relay (matched to your control supply), a flyback diode (a standard 1N4001-type works), the transistor switch from Lesson cb-10, and a separate load circuit for the relay to control (even just a second LED-and-resistor pair on its own battery, to keep this build simple and low-voltage).
A relay is an electromagnet (the coil) that physically pulls a mechanical switch (the contacts) closed when energized. Its key advantage: the coil circuit and the contact circuit are completely electrically separate — a low-voltage control signal can switch a relay whose contacts control an entirely different, isolated circuit, at a different voltage or even AC power (which, for real mains-voltage projects, is a job for a qualified electrician — keep this practice build to low DC voltages only).
Wire the transistor's collector to one side of the relay coil, the other coil side to your control supply, exactly like the LED load in Lesson cb-10 — the relay coil simply replaces the LED as the thing being switched. Then wire your separate load circuit through the relay's contacts.
The flyback diode is essential, not optional: place it across the relay coil, reverse-biased (so it normally blocks current). When the transistor switches off and the coil's magnetic field collapses, it briefly generates a voltage spike that can destroy the transistor — the diode gives that spike a safe path to dissipate instead.