Relays

Build · 10 min

A relay is a switch worked by a coil. Current in the coil makes an electromagnet, which pulls an iron arm, the armature, and the arm moves a contact. Most relays have three contacts:

  • COM, the common one, on the moving arm;
  • NC, normally closed: touching COM while the coil is off;
  • NO, normally open: touching COM only while the coil is on.

Try it:

On the board: a relay with legs, left to right, coil +, coil −, COM, NC and NO (columns 12 to 16). Its coil is fed from the battery on the left through the toggle switch.

A relay's coil kicks like any other when it's switched off, so first fit a flyback diode across it: plain end in column 10 (wired to coil −), striped end in column 7 (wired to coil +).

Now the second circuit. The LED and its resistor sit on the far side of the board with a battery of their own, on the far rails. Switch them with the relay's contacts:

  • a wire from the far + rail to COM (column 14);
  • a wire from NO (column 16) to the resistor's free end (column 18, across the gap).

Press Run and flip the switch on and off.

You move the wire from NO to NC. Now what does the LED do?

  • Lights while the coil is off, and goes dark when it's on
  • Lights while the coil is on, as before
  • Never lights

Why would you use a relay rather than switching the LED directly from the first circuit?

  • The circuits share no wire, so a small, safe signal can switch something big or dangerous, like a mains lamp
  • A relay switches far faster than a transistor
  • A relay needs no current to hold it on

A relay:

  • is a coil that pulls an armature, moving COM from NC to NO;
  • keeps the coil's circuit and the switched circuit separate: isolation;
  • is a coil, so it needs a flyback diode across it when a transistor drives it.

On a real bench a relay's coil and its contacts each have ratings: a 5 V coil might switch 10 A at 250 V. Arduino relay modules put the relay, its transistor and its flyback diode on one small board. Mains wiring is not a breadboard job: leave it to a qualified person.