A relay is a physical switch that actually moves and is controlled by a small current. They are less reliable than solid state switches. But I had one.
I basically followed the example of using a relay that came with my ARDX. (This is Circuit 11 in that book.) It is important to note that it requires a transistor to switch power to the relay. The Arduino digital outputs provide so little current they can't reliably switch the relay.
The coil inside the relay is also an inductive load, requiring a fly-back diode to protect the circuit.
- Spent an hour breadboarding this circuit,
- Spent about an hour laying out the soldered circuit board (this is a separate skill which I am very bad at),
- Spent about an hour stripping jumper wires and placing the components on the board in preparation for soldering,
- Spent about two hours soldering, and correcting my soldering.