← All articles
physicsrelayelectricityengineeringSeptember 17, 20264 min read

What Is a Relay? A Switch Operated by a Magnet

By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.

A small current through a coil of wire pulls an iron lever, and the lever closes a pair of heavy contacts carrying a much larger current somewhere else. That is the entire device, it dates from the 1830s, and it is still fitted by the billion because it does something no transistor does quite as well: it puts a physical air gap between the circuit that makes the decision and the circuit that does the work.

How it works

An electromagnetic relay has a coil wound on an iron core, a hinged iron armature held away from the core by a spring, and one or more sets of electrical contacts that the armature moves. Energising the coil magnetises the core, which attracts the armature against the spring, and the movement opens some contacts and closes others. Removing the current lets the spring return everything. The two circuits, the coil side and the contact side, are connected only by the magnetic field, so they can run at completely different voltages, be referenced to different grounds, and be separated by whatever insulation the design requires. Contacts are described by their resting state: normally open contacts close when energised, normally closed contacts open, and changeover contacts do both, transferring a common terminal from one output to another. A relay with several sets of contacts operates them all simultaneously, which is why a single small signal can switch four independent circuits at once.

What it is for

The reasons for choosing a relay over a semiconductor switch are specific and still compelling:

  • Galvanic isolation, meaning a genuine physical break, so a fault at high voltage cannot reach the control electronics and a person cannot be reached through the control wiring
  • Amplification of control authority, letting a milliamp from a microcontroller switch tens of amps at mains voltage
  • Very low resistance when closed, so almost no power is wasted and no heatsink is needed, unlike a transistor with its permanent voltage drop
  • Tolerance of surges, reverse voltage and hostile electrical environments that would destroy a semiconductor
  • Switching alternating and direct current equally well, and switching circuits of any polarity
  • A visible and mechanically verifiable state, which safety standards frequently require, since a welded contact can be detected by a mirror contact that must move with it

The variants

The basic mechanism has been specialised heavily. A contactor is simply a large relay built for motor loads, with arc chutes and heavy contacts. A latching relay uses a permanent magnet or a two-coil arrangement to stay in position after the pulse ends, drawing no standing current, which matters in battery equipment. A reed relay seals its contacts in a glass tube filled with inert gas, giving fast, clean, low-current switching used in test equipment. A solid state relay replaces the contacts with a triac or transistor and the coil with an optical coupler, keeping the isolation while removing the moving parts, at the cost of a voltage drop, heat and leakage when off. Protective relays in the electricity grid are a different animal entirely: originally electromechanical devices that measured current or voltage and tripped a circuit breaker when a fault occurred, now almost always digital units that still carry the name and still make the same decisions, extremely quickly, about disconnecting faulted sections before damage spreads.

Why it mattered to computing

The relay's contribution to information technology is larger than its size suggests. Because a relay can be arranged so that one contact controls another relay's coil, relays can be wired to compute logical functions, and telephone exchanges built from them performed enormous amounts of automatic switching from the 1890s onwards. Claude Shannon's 1937 master's thesis showed that the behaviour of relay switching circuits corresponded exactly to Boolean algebra, which established the theoretical basis for all digital logic design and is frequently called the most influential thesis of the century. Working computers were built entirely from relays, including Konrad Zuse's machines in Berlin and the Harvard Mark I, before vacuum tubes and then transistors replaced them for being thousands and then millions of times faster. The telegraph use came first and gave the device its name, since a relay received a weakened signal on a long line and used it to key a fresh full-strength signal onto the next section, relaying the message onward exactly as a fresh rider did on a post road.

The takeaway

A relay is a switch operated by an electromagnet, so a small current in a coil moves an armature that opens and closes contacts carrying a much larger current. The two sides are linked only by the magnetic field, which gives a real physical break between control and load, and that isolation, along with very low closed resistance and tolerance of abuse, is why relays survive alongside semiconductors. Variants include contactors, latching, reed and solid state types, and relay logic gave Shannon the basis for digital design in 1937.

Practise this

Questions from Electricity and Magnets

Reading about something is not the same as being able to recall it. These are real questions from the Electricity and Magnets unit in our Physics track, answers and explanations included. The unit has 119 in total across 20 steps.

  • Odd one outLevel 1

    1. Which one is NOT caused by static electricity?

    • A fridge magnet holding up a drawingcorrect
    • Hair standing up after using a slide
    • A spark when touching a door handle
    • Paper sticking to a rubbed balloon

    The fridge magnet works by magnetism, while the others are all static electricity.

  • Fill the blankLevel 1

    2. The strength of an electric current is measured in units called ____.

    • ampscorrect
    • litres
    • metres
    • grams

    The strength of a current is measured in amps.

  • Fill the blankLevel 2

    3. A bar magnet is strongest at its two ____.

    • polescorrect
    • middle
    • edges
    • corners

    The magnetic force is strongest at the poles, where the field lines are closest together.