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.