How Does a Relay Work? The Electromechanical Switch Explained

A relay is an electrically operated switch where a low-power control circuit (the coil) generates a magnetic field to physically move metal contacts, thereby switching a completely isolated, high-power load circuit. In practical terms, it allows a fragile 3.3V microcontroller GPIO pin or a small 12V dashboard switch to safely turn on a 120V AC water heater or a 24V DC winch motor.

Think of it like a municipal water valve. A small pilot stream of water (your coil current) pushes against a rubber diaphragm. That diaphragm movement opens a massive main brass valve (your contacts), allowing a firehose-level volume of water (your load current) to flow through the main pipe. The pilot water and the main water never mix, just as your microcontroller's 5V logic never physically touches the 120V AC mains wiring.

For a concrete bench example: a standard 12V DC relay coil might draw just 40mA (0.48 Watts). When energized, it pulls in the armature to switch a 120V AC motor drawing 8 Amps (960 Watts). That single electromechanical component provides a 2,000x power amplification while maintaining galvanic isolation between the two circuits. For a deeper dive into the magnetic physics, Electronics Tutorials provides excellent breakdowns of the armature and yoke mechanics.

Coil vs. Contacts: Wiring the Two Halves of the Circuit

Every standard electromechanical relay has two distinct electrical sides that you must wire independently: the coil (input) and the contacts (output).

The Coil Side (Control)

On DIN-rail relays, the coil terminals are typically labeled A1 (positive/hot) and A2 (negative/neutral). On PCB relays, they are simply the two pins connected to the copper spool. You wire your control signal (e.g., an ESP32 GPIO driving a 2N2222 NPN transistor) across A1 and A2.

CRITICAL DC PROTECTION: If you are driving a DC coil, you MUST wire a flyback diode (like a standard 1N4007) in reverse bias directly across A1 and A2 (cathode to A1, anode to A2). When the DC power is cut, the collapsing magnetic field induces a massive reverse voltage spike—often 10x to 50x the supply voltage. Without a flyback diode, this spike will instantly destroy your driving transistor or fry your microcontroller's GPIO pin. AC coils do not require this diode, as the AC zero-crossing naturally collapses the field without generating destructive DC spikes.

The Contact Side (Load)

The load side features three main terminals per pole: Common (C or 11), Normally Open (NO or 14), and Normally Closed (NC or 12).

  • Common (C): The moving blade. Wire your power source (e.g., 120V AC Hot) here.
  • Normally Open (NO): The circuit is open (off) until the coil energizes. Wire your load here for standard 'turn on when triggered' applications.
  • Normally Closed (NC): The circuit is closed (on) until the coil energizes. Used for fail-safe or alarm circuits.

Decoding Relay Ratings: Which Column Governs Your Load?

The most common mistake hobbyists make is looking at the '10A 250VAC' printed on the relay cover and assuming it can switch any 10A load. The governing column is not the maximum resistive rating; it is the breaking capacity and the specific load-type rating.

ParameterTypical Value (Omron G2R-2)What It Actually Means for Your Build
Coil Voltage12V DCNominal voltage to pull in the armature. Must be maintained within 80-110% (9.6V to 13.2V) for reliable operation.
Resistive Contact Rating5A at 250V ACMaximum current for purely resistive loads (heaters, incandescent bulbs). No inrush current.
Inductive/Motor Rating2A at 250V ACMaximum current for loads with high inrush (motors, transformers, solenoids). This is the number that actually governs most DIY projects.
Breaking Capacity1250 VAMaximum Volt-Amps the contacts can safely interrupt. Exceeding this causes an internal arc that will weld the contacts shut.

Why the massive difference between resistive and inductive ratings? Inrush current. A 2A AC motor can draw 12A or more on startup (Locked Rotor Amps). If you size your relay for the 2A run current using the 5A resistive column, the massive startup arc will pit the silver-tin-oxide (AgSnO2) contact plating, eventually welding the relay in the 'ON' position—a severe fire hazard.

The Selection Decision Tree: Picking the Right Part Number

Stop guessing. Use this decision path to select the exact relay for your workbench or control panel.

Load TypeInrush MultiplierRequired DeratingConcrete Part Pick (2026 Standard)
Resistive (Heaters, LED drivers)1x to 1.5xNone (use rated current)Omron G2R-1-S DC12 (10A resistive)
Inductive (Solenoids, Contactors)3x to 5xDerate to 30% of resistive maxFinder 55.34.9.012.0040 (7A rated, use for <2A inductive)
Motor (Compressors, Pumps)6x to 10xDerate to 20% or use HP ratingPanasonic ALQ312 (Motor load rated, 10A/1HP)
High DC Loads (Solar, 12V/24V)1x (but arc risk is high)Must use DC-specific blowoutOmron G7SA (Specifically designed for DC safety breaking)

Quick-Select If/Then Path

  • IF your load is < 50V DC and < 2A → PICK a standard PCB relay like the Omron G5V-2.
  • IF your load is a 120V/240V AC motor → PICK a relay with a specific HP (Horsepower) rating printed on the datasheet, not just an amp rating. Default to the Omron G7L series or step up to a proper IEC contactor.
  • IF you are switching high-current DC (like a 24V 20A solar dump load) → PICK a DC-rated contactor with magnetic blowouts. Standard AC relays will fail to extinguish the DC arc and will melt.

Bench Testing: Dead and Live Diagnostics

When a circuit fails, you need to know if the relay is the culprit. Here is how to test it properly.

Dead Testing (Power Disconnected)

  1. Set your multimeter to Ohms (Ω). Measure across the coil pins (A1/A2). A standard 12V DC coil should read between 200Ω and 400Ω. If it reads OL (Open Loop), the internal copper wire is burned. If it reads 0.0Ω, the coil is shorted.
  2. Measure Common (C) to Normally Closed (NC). It should read < 1Ω (ideally 0.1Ω to 0.3Ω). Higher resistance indicates carbon buildup or pitting on the contacts.
  3. Measure Common (C) to Normally Open (NO). It must read OL. Any reading here means the contacts are welded shut.

Live Testing (Energized)

HAZARD WARNING: Live testing involves exposed mains voltage. De-energize the circuit before making any wiring changes. Only probe with properly rated CAT III/IV meter leads.

Apply the nominal coil voltage. You should hear a distinct mechanical 'click'. If the coil is energized (measure voltage across A1/A2 to confirm) but the load side shows 0V or high resistance across C and NO, the internal contacts are fouled with carbon or mechanically jammed.

When to Repair vs. Replace

Replace 99% of the time. A $6 DIN-rail relay with pitted contacts is not worth salvaging. Never attempt to file down the contacts of a standard PCB or DIN relay. You will remove the specialized AgSnO2 or AgCdO plating, exposing the base metal and guaranteeing a welded failure on the very next switching cycle.

Repair only on heavy industrial contactors. If you are dealing with a massive $400 Allen-Bradley or Schneider Electric contactor, you can purchase official replacement contact kits and swap the bolt-on pucks. For everything else, bin it and socket a new one.

Final Recommendation: The Default Workbench Pick

For 90% of DIY automation, Arduino/ESP32 interfacing, and light industrial prototyping (switching 120V AC lights, small pumps, or 12V DC accessories up to 5A), do not overcomplicate your BOM. Standardize your inventory on the Omron G2R-1-S DC12 (or DC24) relays, mounted in Omron P2RF-71 DIN-rail sockets. They cost roughly $6 to $8 per unit, feature a built-in LED indicator to confirm coil status, include a manual test lever for debugging without power, and provide fully isolated 10A contacts. If your project eventually requires switching a 30A compressor, keep the G2R in your circuit to drive the coil of a heavier, properly rated contactor. This modular approach saves debugging time and keeps your low-voltage logic safely isolated from high-current faults.