An electromechanical relay is an electrically operated switch that uses a low-power control signal to isolate and switch a high-power load. At its core, a relay works by passing current through a copper wire coil to generate a magnetic field, which pulls a ferrous armature against a spring to physically close or open metallic contacts. This provides complete galvanic isolation between your sensitive control circuitry (like an ESP32 GPIO or PLC output) and the mains or high-current load.

The Core Mechanism: Coil vs. Contact Side Wiring

To wire a relay correctly, you must treat it as two entirely separate circuits that share only a magnetic link. Confusing the coil side with the contact side is the most common cause of burned-out microcontrollers and failed panels.

The Coil Side (Control Circuit)

The coil terminals (typically labeled A1/A2 on industrial relays or 13/14 on PCB relays) are the electromagnet. When you apply the rated voltage—say, 12V DC or 120V AC—current flows through the spool, creating magnetic flux.

DC Coil Flyback Protection: If you are driving a DC coil, you must install a flyback diode (like a 1N4007 or 1N4148) in parallel with the coil, with the cathode (stripe) facing the positive supply. When the driving transistor turns off, the collapsing magnetic field induces a massive reverse voltage spike (inductive kickback). Without the diode routing this spike back into the coil, it will instantly punch through the junction of your driving MOSFET or destroy the output transistor of an optocoupler. For AC coils, a diode will cause a short circuit; instead, use an RC snubber network or a metal oxide varistor (MOV) across the coil.

Wiring Warning: Never drive a relay coil directly from an Arduino or ESP32 GPIO pin. A typical relay coil draws 30mA to 70mA, which exceeds the safe continuous sourcing limit of most microcontroller pins and lacks the voltage headroom. Always use an intermediary driver like a PC817 optocoupler paired with an N-channel MOSFET (e.g., IRFZ44N) or a dedicated ULN2803 Darlington array.

The Contact Side (Load Circuit)

The contact terminals carry the actual load current. Standard SPDT (Single Pole Double Throw) relays feature three terminals:

  • COM (Common): The moving blade that connects to either NO or NC.
  • NO (Normally Open): Connects to COM only when the coil is energized.
  • NC (Normally Closed): Connects to COM when the coil is de-energized (failsafe state).

Current flows from your power source, through the COM terminal, out the NO/NC terminal, and into the load. The contacts are typically plated with silver alloy (like AgSnO2) to minimize contact resistance and resist arc erosion.

Decoding Relay Ratings: Which Column Governs Your Load?

Reading a relay datasheet can be deceptive. A relay marketed as a "10A relay" rarely handles 10A across all load types. The governing rating is always the lowest rated value for your specific load category. If you are switching a motor, the motor rating column governs, even if the resistive column claims 16A.

Relay Model / Series Coil Voltage Max Resistive Rating (Cos φ = 1.0) Max Inductive / Motor Rating Breaking Capacity (Max)
Omron G2R-1-E 12V DC 16A @ 250V AC 6A @ 250V AC (Motor) 4,000 VA
Finder 40.52 24V DC 8A @ 250V AC 3A @ 250V AC (Inductive) 2,000 VA
Panasonic ALDP112 12V DC 16A @ 250V AC 1/2 HP @ 120V AC 4,400 VA
Song Chuan 833HM 5V DC 10A @ 250V AC 1/4 HP @ 120V AC 2,500 VA

The Breaking Capacity Trap

Breaking capacity (measured in VA or Watts) dictates the relay's ability to extinguish the electrical arc that forms when contacts open under load. When coordinating a relay with a branch circuit breaker, remember they are not interchangeable protective devices. The breaker's time-current trip curve dictates fault clearing (short circuits), while the relay's breaking capacity dictates its ability to safely extinguish the internal arc when opening a normal load. If your load's VA exceeds the relay's breaking capacity, the arc will sustain, melting the contacts and potentially causing a fire, regardless of the breaker upstream.

Selection Decision Path: Resistive, Inductive, and Motor Loads

To select the correct relay, identify your load type and apply the corresponding derating factor. Inrush currents and phase shifts dictate how hard the contacts work during make-and-break operations. Refer to the Macromatic load classification guide for deeper physics on arc suppression.

Load Type Examples Inrush / Phase Characteristic Selection Rule & Derating
Resistive Heaters, toasters, incandescent bulbs Low inrush (except cold tungsten); Voltage and current are in phase (Cos φ = 1.0). Use the standard Resistive Rating. For cold tungsten lamps, derate to 20% due to 10x-15x inrush current upon switch-on.
Inductive Solenoids, transformers, contactor coils High inductive kickback on break; Current lags voltage (Cos φ ≈ 0.4 to 0.7). Derate to 30% - 40% of the resistive rating. Ensure the relay has a high DC/AC breaking capacity to quench the arc.
Motor (Ballast) Compressors, fans, pumps, conveyors Massive Locked Rotor Amps (LRA) on start; high inductive kick on stop. Derate to 20% - 25% of resistive rating. For motors >1 HP, abandon PCB relays and use a heavy-duty contactor.
Capacitive Switching power supplies, capacitor banks Extreme inrush current (acts like a dead short until charged). Derate heavily or use a relay with specific TV-5 or TV-8 tungsten/capacitive ratings to prevent contact welding.

Bench Testing and Lifecycle: Dead, Live, and Replace vs. Repair

Relays are wear items. The mechanical spring fatigues, and the contacts erode from arcing. Knowing how to test them and when to discard them is critical for bench and field troubleshooting. For comprehensive electromechanical theory, the Omron Principles of Relays documentation provides excellent failure mode analysis.

How to Test a Relay Dead (Bench Test)

  1. Test the Coil: Set your multimeter to resistance (Ohms). Probe the coil terminals (A1/A2). A healthy 12V DC relay coil typically reads between 150Ω and 400Ω. If it reads OL (Open Line), the internal copper wire has snapped; the relay is dead. If it reads near 0Ω, the coil is shorted.
  2. Test the Contacts (De-energized): Switch the meter to continuity mode. Probe COM and NC; you should hear a beep (near 0.0Ω). Probe COM and NO; the meter should read OL (infinite resistance).
  3. Energize and Re-test: Apply the rated DC voltage to the coil using a bench power supply. You should hear a distinct, sharp "click". While energized, probe COM and NO (should beep) and COM and NC (should read OL). If it clicks but continuity fails, the contacts are pitted or carbon-fouled.

How to Test a Relay Live (In-Circuit)

When the relay is installed and operating under load, use a clamp meter to verify the load is drawing the expected current. Next, use your multimeter in AC/DC Voltage mode to measure the voltage drop directly across the COM and NO terminals while the relay is energized. A healthy set of contacts will drop less than 50mV. If you read 1V to 5V across closed contacts, the contacts are severely pitted, generating massive heat (P = I × V), and the relay is on the verge of thermal failure.

When to Repair vs. Replace

Never attempt to repair an electromechanical relay.

Some hobbyists attempt to open the plastic housing and file down pitted or welded contacts. This is a severe safety hazard. Filing the contacts removes the specialized silver-alloy plating, exposing the base brass or copper. This base metal oxidizes rapidly, leading to high resistance, carbon tracking, and eventual arc welding under load. Furthermore, opening a sealed relay compromises its arc chamber, allowing ionized gas to escape and potentially flash over to adjacent PCB traces.

The Verdict: If a relay fails a dead test, exhibits high voltage drop under load, smells of ozone, or shows heat discoloration on the PCB pads, it is e-waste. Desolder it or pull it from its DIN socket, and replace it with an exact-spec or upgraded equivalent (e.g., swapping a standard AgSnO2 contact for an AgCdO variant if dealing with severe inductive bounce). Always pair the replacement with a fresh flyback diode or snubber network to protect your new investment.