Skip to main content

Relays

Learning Objectives

By the end of this page, you should be able to:

  • Explain what a relay does and why it's used to isolate a control circuit from a load circuit
  • Describe the three functional parts of a relay: control circuit, switch contacts, and load circuit
  • Distinguish electromechanical relays (EMRs), solid-state relays (SSRs), and reed relays by construction and tradeoffs
  • Explain the electromagnetic switching mechanism inside an EMR
  • Identify when to choose an EMR versus an SSR based on switching speed, lifespan, and load type
  • Describe at least three practical applications of relays in real circuits

Quick Answer

A relay is an electrically operated switch that lets a small, low-power control signal switch a much larger load — often at a completely different voltage or current level — while keeping the two circuits electrically isolated from each other. The classic version, an electromechanical relay, uses an electromagnet to physically pull a metal contact closed or open. Solid-state relays achieve the same switching function with no moving parts, using semiconductor devices instead. Relays matter because they let a low-voltage signal (from a microcontroller, sensor, or thermostat) safely control a high-power circuit (a motor, heater, or mains-voltage appliance) without exposing the control electronics to dangerous voltages or currents.

What Is a Relay?

A relay is an electrical switch operated remotely by an electric current rather than by a person's hand. Every relay has three functional parts:

  1. Control circuit: The low-power circuit that activates the relay — for example, a 5 V signal from a microcontroller.
  2. Switch contacts: The movable metal contacts that physically connect or disconnect the load circuit.
  3. Load circuit: The (often higher-power) circuit that gets switched on or off — for example, a 230 V heater or a 12 V motor.

Because the control circuit and load circuit are physically and electrically separate, a relay provides galvanic isolation: even if the load circuit is at a dangerous voltage, the control circuit (and whoever is operating it) stays electrically isolated from it.

How an Electromechanical Relay Works

An electromechanical relay (EMR) works through a simple, elegant mechanism:

  1. When current flows through the relay's control coil, it generates a magnetic field, just like any inductor.
  2. This magnetic field attracts a metal armature (a small lever or plate) inside the relay.
  3. The armature's movement physically opens or closes the switch contacts, connecting or disconnecting the load circuit.
  4. When control current stops, a spring pulls the armature back to its resting position, returning the contacts to their default state.

This is exactly why a relay coil needs a flyback diode across it in DC circuits — like any inductor, the collapsing magnetic field when the coil is de-energized induces a voltage spike that can damage the transistor or switch driving it.

Types of Relays

Electromechanical Relays (EMRs)

The most common and traditional type, using the electromagnetic mechanism above.

  • Advantages: Low cost, high reliability, wide range of voltage and current ratings, and true electrical isolation with visible physical contacts.
  • Disadvantages: Slower switching (milliseconds, limited by mechanical movement), and limited lifespan due to mechanical wear and contact arcing over repeated cycles.

Solid State Relays (SSRs)

Use semiconductor devices — typically thyristors, triacs, or MOSFETs — combined with an optical isolator (an LED and photodetector) to switch the load, with no moving parts at all.

  • Advantages: Much faster switching (microseconds), longer lifespan since there's nothing to mechanically wear out, silent operation, and no contact arcing or bounce.
  • Disadvantages: Generally more expensive than EMRs of comparable rating, can generate more heat that needs to be managed (since the switching element always has some voltage drop), and may not handle very high transient currents as gracefully as a mechanical contact.

Reed Relays

Use a reed switch — two ferromagnetic reeds sealed in a glass tube that close when exposed to a magnetic field from a nearby coil.

  • Advantages: Very small size, low power consumption, and fast switching for a mechanical device, useful in high-reliability, low-current signal-switching applications.
  • Disadvantages: Limited current handling capacity and not suitable for high-voltage applications.

Real-World Example

A home thermostat uses a low-voltage control signal (often 24 V AC in HVAC systems) to activate a relay, which in turn switches the much higher current needed to run the furnace's blower motor or the compressor of an air conditioner. The thermostat's delicate low-voltage electronics never has to handle the motor's actual switching current directly — the relay does the heavy lifting and keeps the two circuits safely separated.

Applications of Relays

  • Power control: Switching large appliances, motors, or industrial machinery on and off
  • Signal isolation: Preventing electrical noise from a noisy load circuit from interfering with sensitive control electronics
  • Automation: Sequencing and controlling processes in industrial control panels
  • Safety interlocks: Ensuring a high-power circuit can only activate under specific safe conditions
  • Automotive systems: Switching headlights, starter motors, and other high-current loads from low-current dashboard switches or the ECU

Relay Switching Circuit

A microcontroller cannot usually supply enough current to energize a relay coil directly, so a transistor is typically used as an intermediate switch, with a flyback diode across the coil to absorb the voltage spike generated when the coil de-energizes. Once energized, the relay's contacts handle the actual load current, keeping the microcontroller's low-power circuitry safely isolated from the higher-power load.


Key Terms

TermDefinitionRelated Concept
RelayElectrically operated switch controlling a load circuit from a separate control circuitGalvanic isolation
Control circuitThe low-power circuit that activates the relayCoil, driving transistor
Load circuitThe circuit being switched, often higher power than the control circuitSwitch contacts
ArmatureThe movable metal part pulled by the electromagnet in an EMRElectromechanical switching
Flyback diodeDiode placed across a relay coil to absorb voltage spikes on de-energizingInductor protection
Solid-state relay (SSR)Relay using semiconductor switching with no moving partsOptical isolation
Reed relayRelay using a magnetically operated sealed reed switchLow-current signal switching
Galvanic isolationElectrical separation between two circuits with no direct conductive pathSafety, noise immunity
Contact bounceRapid, unintended making/breaking of contact as mechanical contacts settleEMR switching behaviour
OptocouplerOptical isolator (LED + photodetector) used inside SSRsSolid-state switching

Common Mistakes

Misconception: A relay's coil voltage rating must match the voltage of the load it's switching. Why it's wrong: The control circuit (coil) and the load circuit are electrically separate. A 5 V-coil relay can easily switch a 230 V AC load, because the coil voltage only determines what's needed to energize the electromagnet, not what the contacts can carry. Correct understanding: Match the coil voltage to your control circuit's output, and separately check the contact ratings (voltage and current) against the load circuit's requirements.


Misconception: Solid-state relays are always the better choice because they have no moving parts. Why it's wrong: SSRs are faster and last longer under frequent switching, but electromechanical relays offer true physical contact isolation, often handle higher inrush currents more robustly, and are usually cheaper for simple, infrequent-switching applications. Correct understanding: Choose based on the application: SSRs for high-frequency switching and long service life without mechanical wear; EMRs for cost-sensitive, lower-cycle-count, or high-isolation-integrity applications.


Misconception: It's fine to drive a relay coil directly from a microcontroller pin without any additional components. Why it's wrong: Most relay coils require more current than a microcontroller pin can safely supply, and the coil's inductance produces a damaging voltage spike when de-energized if there's no flyback diode. Correct understanding: Drive a relay coil through a transistor (or dedicated relay driver IC) sized for the coil current, and always include a flyback diode across the coil.

Comparison and Connections

FeatureElectromechanical RelaySolid-State RelayReed Relay
Switching mechanismMechanical (electromagnet + contacts)Semiconductor (optically isolated)Mechanical (magnetic reed switch)
Switching speedMillisecondsMicrosecondsFast (mechanical, but small mass)
LifespanLimited by mechanical wearVery long, no mechanical wearLong but limited by mechanical wear
Typical current capacityLow to highLow to moderateVery low
CostLowHigherLow to moderate

Practice Questions

Recall

  1. What are the three functional parts of a relay? Answer guidance: Control circuit, switch contacts, and load circuit.

  2. Name two advantages of a solid-state relay over an electromechanical relay. Answer guidance: Faster switching speed and longer lifespan (no mechanical wear), plus silent, bounce-free operation.

Understanding

  1. Why is a relay described as providing "galvanic isolation" between control and load circuits? Answer guidance: There is no direct electrical (conductive) connection between the control coil circuit and the load switch-contact circuit — energy transfers via the magnetic field (EMR) or optical coupling (SSR), so the two circuits remain electrically separate even though one controls the other.

  2. Why must a flyback diode be placed across a relay coil driven by a transistor? Answer guidance: The coil is an inductor; when the driving current is suddenly switched off, the collapsing magnetic field induces a large reverse voltage spike that could exceed the transistor's breakdown voltage. The flyback diode provides a safe path for this current, protecting the transistor.

Application

  1. A 5 V microcontroller needs to switch a 230 V, 5 A heater. Explain the role each stage would play: microcontroller pin, transistor, relay coil, relay contacts. Answer guidance: The microcontroller pin outputs a small logic-level signal, which drives a transistor (since the pin alone can't supply enough current for the coil). The transistor switches current through the relay coil, energizing the electromagnet. The relay's contacts, rated for 230 V/5A or higher, then physically connect the heater to mains power — keeping the microcontroller electrically isolated from mains voltage.

  2. An automated test system needs to switch a signal on and off millions of times over its lifetime with minimal maintenance. Would an EMR or SSR be the better choice, and why? Answer guidance: SSR — because it has no moving parts to wear out, it can handle a very high number of switching cycles reliably, unlike an EMR whose mechanical contacts degrade with repeated arcing and physical wear.

Analysis

  1. Compare the failure modes you would expect from a relay that has been cycled millions of times (EMR) versus one that has been used at the edge of its voltage rating for years (SSR), and explain the underlying cause in each case. Answer guidance: An EMR that has been cycled millions of times is likely to fail due to worn or pitted contacts (from repeated arcing) or a fatigued return spring, both mechanical wear mechanisms. An SSR operated near its voltage rating for a long time is more likely to fail due to thermal stress on the semiconductor switching element, since it always has some voltage drop and dissipates heat during conduction.

  2. A designer wants to switch a small, low-current signal in a sensitive measurement circuit with minimal noise or contact resistance issues. Which relay type is most appropriate, and why not the alternatives? Answer guidance: A reed relay — its low power consumption, small size, and fast, clean mechanical switching suit low-current signal applications well. An EMR's larger contacts and coil current draw are unnecessary and may introduce more noise; an SSR's semiconductor switching element typically has higher on-state resistance/voltage drop than desired for very sensitive low-level signals.

FAQ

Why do relays "click" when they switch? That click is the sound of the armature physically snapping against the contacts (or back to its resting position) as the electromagnet pulls it or the return spring releases it — audible proof of the mechanical action inside an electromechanical relay. Solid-state relays, having no moving parts, switch silently.

Can a relay switch AC and DC loads the same way? Not quite. AC naturally crosses zero volts twice per cycle, which helps extinguish any arc that forms as mechanical contacts open, so relays often have higher AC switching ratings than DC ratings for the same physical contacts. DC arcs are harder to extinguish because there's no natural zero crossing, which is why DC contact ratings are typically lower and DC relays sometimes include arc-suppression features.

What is contact bounce, and does it matter? When mechanical relay contacts close, they don't settle instantly — they physically bounce for a few milliseconds, making and breaking contact rapidly before settling. In most power-switching applications this is harmless, but in signal or logic applications it can cause erroneous multiple triggers, which is why debouncing circuits or software delays are used where precise timing matters.

Why do relay datasheets list separate voltage and current ratings for AC and resistive vs. inductive loads? Inductive loads (motors, other relay coils, transformers) generate their own back-EMF spikes when switched off, which stress the contacts more than a simple resistive load like a heater. Manufacturers often derate the current rating for inductive loads to account for this additional stress and the increased arcing it causes.

Is a relay the same thing as a contactor? They work on the same electromagnetic principle, but a contactor is essentially a heavy-duty relay designed for switching much higher currents and voltages, typically used for large motors and industrial power circuits, often with additional features like arc chutes to safely extinguish larger arcs.

Quick Revision

  • A relay uses a low-power control circuit to switch a separate, often higher-power, load circuit
  • Three parts: control circuit, switch contacts, load circuit
  • Electromechanical relays (EMRs) use an electromagnet to move an armature and physically open/close contacts
  • Solid-state relays (SSRs) switch electronically with no moving parts, using optical isolation
  • Reed relays use a magnetically actuated sealed switch, ideal for low-current, high-reliability signal switching
  • Relays provide galvanic isolation between control and load circuits
  • Always use a flyback diode across a DC relay coil to protect the driving transistor
  • EMRs: cheaper, robust, but slower and mechanically wear out over time
  • SSRs: faster, longer-lasting, but generally pricier and can run warmer
  • Coil voltage rating and contact voltage/current rating are independent specifications — check both

Prerequisites: Inductors (coil behaviour, flyback spikes); transistors (driving relay coils); diodes (flyback protection)

Related Topics: Transistors (relay driver circuits); solid-state switching devices (thyristors, triacs); industrial automation and control systems

Next Topics: Oscillators; sensors and actuator interfacing; power electronics and motor control