A relay is one of the most useful components in electronics: it lets a small electrical signal control a large one, with full electrical isolation between the two.
The basic idea
Apply a small current to a coil. The coil becomes an electromagnet. That magnet pulls a metal contact, which closes (or opens) a completely separate circuit.
Control side → [ coil ] → magnetic field
Load side → [ contact ] opens / closes
The main types
- SPST — single pole, single throw. One switch, on or off.
- SPDT — single pole, double throw. Switches between two outputs.
- DPDT — double pole, double throw. Two switches that move together.
- Latching — stays in position after the coil is de-energised, saving power.
- Solid-state (SSR) — no moving parts; uses semiconductors to switch silently and fast.
When to use which
Use a mechanical relay when you need a cheap, rugged switch that can handle surges. Use a solid-state relay when you need millions of silent switching cycles, like in heating control.
Rule of thumb: moving parts wear out, semiconductors get hot. Pick the failure mode you can live with.