An electrical relay is an electromagnetically operated switch that uses a low-power control signal to isolate and switch a higher-power load. At its core, it provides galvanic isolation between your sensitive control electronics (like an ESP32 GPIO pin or a 24V PLC output) and the heavy machinery or mains voltage it commands. When you ask, "what is a electrical relay doing in this circuit?", the answer is almost always: acting as a sacrificial, electrically isolated bridge between logic-level voltage and load-level current.

While solid-state relays (SSRs) use optocouplers and TRIACs or MOSFETs to switch loads, the classic electromechanical relay (EMR)—like the ubiquitous Omron G2R-1-E or Finder 38 series—relies on physical moving parts. A copper wire coil generates a magnetic field, pulling a spring-loaded silver-alloy armature to close or open a physical air gap. This physical gap is what gives EMRs their excellent off-state isolation and low on-state voltage drop.

The Two Circuits: Coil Side vs. Contact Side Wiring

Wiring a relay requires treating it as two completely separate circuits that share only a magnetic link. Mixing these up is the most common cause of fried microcontrollers and blown control fuses on the bench.

The Coil Side (Control Circuit)

The coil side consists of the electromagnetic winding, typically labeled A1 and A2 on DIN-rail sockets, or simply the two coil pins on a PCB footprint. When you apply the nominal coil voltage (e.g., 12V DC or 120V AC), current flows through the fine copper wire, generating the magnetic flux needed to pull the armature. A standard 12V DC relay coil might draw 30mA to 45mA—well within the limits of a standard transistor driver, but too much for a raw microcontroller GPIO pin.

⚠️ CRITICAL WARNING: DC Coil Flyback Protection
A relay coil is an inductor. When you remove power from a DC coil, the collapsing magnetic field induces a massive reverse voltage spike (inductive kickback, governed by V = -L(di/dt)). This spike can easily exceed 100V, instantly destroying the driving MOSFET, BJT, or microcontroller pin. You must wire a flyback diode (like a 1N4007) in reverse bias across the DC coil pins (cathode to positive, anode to negative). AC coils do not require this, as the alternating zero-crossings naturally dissipate the stored energy, though RC snubbers are sometimes used to reduce contact arcing.

The Contact Side (Load Circuit)

The contact side handles the actual load current. Standard relays use a Single Pole Double Throw (SPDT) configuration featuring three terminals:

  • COM (Common): The moving armature. This connects to your load or your voltage source, depending on whether you are switching the high side or low side.
  • NO (Normally Open): The terminal that connects to COM only when the coil is energized.
  • NC (Normally Closed): The terminal that connects to COM when the coil is de-energized (the spring's default resting state).

Relay Rating Table and Load Selection Decision Path

Reading a relay datasheet requires understanding that the bold "10A" printed on the plastic cover is a best-case scenario. The governing rating column depends entirely on the physics of the load you are switching. Do not confuse a relay's breaking capacity with a circuit breaker's interrupting rating. Breakers use thermal-magnetic time-current curves to protect wiring from sustained overloads; relays are designed to make and break the circuit under normal operating inrush, but they will destructively arc if asked to clear a dead short.

Table 1: Typical SPDT Relay Ratings (e.g., Omron G2R-1-E 12VDC)
Parameter Typical Value What It Governs
Coil Voltage 12V DC (Must operate at ≥75% nominal) Control circuit compatibility; dictates driver transistor selection.
Contact Rating (Resistive) 10A @ 250V AC / 30V DC Pure heating elements, incandescent bulbs. The "headline" number.
Contact Rating (Inductive) 3A @ 250V AC (cos φ = 0.4) Solenoids, transformers, contactor coils. Dictates severe derating.
Max Breaking Capacity 30A (Make) / 10A (Break) The absolute limit the contacts can interrupt without the arc sustaining and welding the contacts shut.

Load Selection Decision Tree

Use this decision path to determine which rating column governs your specific application and how to derate the relay:

Load Type Inrush Characteristic Derating Rule Example Application
Resistive None (Steady state = Inrush) Use 100% of rated capacity. Space heater, toaster, LED driver (with active PFC).
Inductive High break-voltage arc Derate to 30% - 50% of resistive rating. Valves, solenoids, relay coils, magnetic ballasts.
Motor / LRA Massive make-inrush (Locked Rotor Amps) Derate to 20% of resistive rating, or match specific HP/LRA rating. HVAC compressors, water pumps, conveyor belts.
Capacitive Instantaneous short-circuit make-inrush Derate heavily; add an NTC thermistor in series. Switching mode power supplies, large capacitor banks.

For deeper dive into contact materials and arc suppression, refer to the Omron Relay Basic Knowledge technical guide or standard application notes from major manufacturers.

Bench Testing: Dead and Live Diagnostics

When a circuit fails to energize, you need to isolate whether the fault lies in the control logic, the relay coil, or the contact side. Here is the systematic diagnostic path.

Dead Testing (Power Removed)

Set your multimeter to resistance (Ohms) and continuity mode.

  1. Coil Integrity: Measure across the coil pins (A1 to A2). A healthy 12V DC relay coil will typically read between 200Ω and 400Ω. If it reads OL (open loop), the internal fine wire has snapped. If it reads near 0Ω, the coil is shorted.
  2. Contact Resting State: Measure COM to NC. It should read < 1Ω (continuity beep). Measure COM to NO. It should read OL (infinite resistance).
  3. Manual Actuation: If the relay has a manual test lever (common on DIN-rail sockets), press it. The COM-to-NC reading should go OL, and COM-to-NO should drop to < 1Ω.

Live Testing (Energized under Load)

If the dead tests pass but the load still won't run, the contacts may be carbonized or pitted, creating high resistance under load.

  1. Coil Voltage Check: With the control signal active, measure DC/AC voltage directly across A1 and A2. It must be within 10% of the nominal coil voltage. A 12V relay will chatter or fail to pull in if voltage drops below 9V due to wire voltage drop.
  2. Contact Voltage Drop: With the relay energized and the load drawing current, measure the AC/DC voltage directly across the COM and NO terminals. A healthy closed contact will drop less than 50mV. If you read > 100mV, or if the voltage fluctuates wildly, the contacts are degraded.

When to Repair vs. Replace

In almost all hobbyist, commercial, and light-industrial scenarios, you replace the relay, you do not repair it. Standard PCB and DIN-rail relays (like the Finder 38.51 or Omron G2R) cost between $4 and $15. Attempting to file down pitted contacts removes the specialized silver-tin oxide or silver-cadmium oxide plating, exposing the base brass or copper. This base metal will oxidize rapidly, leading to high resistance, overheating, and eventual thermal failure. Only consider repairing (cleaning/polishing) contacts on massive, high-current industrial contactors where the replacement part costs hundreds of dollars and lead times are long.

Frequently Asked Questions

What is the difference between an electrical relay and a solid-state relay?

An electromechanical relay (EMR) uses physical moving metal contacts to switch the load, providing a true physical air gap for isolation and a very low voltage drop when closed. A solid-state relay (SSR) uses semiconductor switches (like TRIACs for AC or MOSFETs for DC) triggered by an internal optocoupler. SSRs switch infinitely faster, have no moving parts to wear out, and operate silently. However, SSRs leak a small amount of current when "off" (requiring bleeder resistors for sensitive loads), generate significant heat when "on" (requiring heatsinks), and are highly susceptible to voltage spike destruction compared to the robust physical air gap of an EMR.

Why does my relay contact weld shut when switching a motor?

Contact welding happens when the make-inrush current (Locked Rotor Amps) exceeds the relay's breaking/making capacity. When the contacts close onto a heavy inductive or motor load, the initial current surge can be 6 to 10 times the running current. This massive surge creates localized micro-welds on the silver-alloy contact surface. When the relay tries to open, the spring force isn't strong enough to tear the micro-welds apart, leaving the relay permanently stuck in the "ON" position. To fix this, you must upgrade to a relay with a higher HP/LRA rating, or use a contactor specifically designed with arc chutes and high-pressure contact springs for motor loads.

Can I use a 12V DC automotive relay to switch 120V AC mains?

No, this is extremely dangerous. While the coil side might be safely driven by 12V DC, the contact side of an automotive relay (typically a standard Bosch-style 30A relay) is designed for 14V DC systems. The physical distance between the contacts (the air gap) and the internal creepage distances across the plastic housing are not rated for 120V AC peak voltages (which reach ~170V). Switching mains voltage with an automotive relay will likely result in a sustained AC arc across the contacts, melting the plastic housing, causing a short circuit, and presenting a severe fire and electrocution hazard. Always use relays specifically rated and certified (UL/CE) for the AC mains voltage you are switching.

For more on safe mains switching practices and component selection, review the All About Circuits guide on relay applications.