Switch relay wiring splits into two electrically isolated circuits: the low-power control side (the coil) and the high-power load side (the contacts). Getting the wiring right means matching the coil voltage to your control signal and strictly derating the contact amperage based on whether your load is resistive, inductive, or a motor. A relay rated for 30A on a purely resistive heater will weld its contacts shut in seconds if you use it to switch a 30A compressor motor without checking the inrush ratings.

The Two Halves of Switch Relay Wiring: Coil vs. Contacts

An electromechanical relay uses an electromagnet to physically move a metal armature. Because the magnetic field provides the isolation, the coil circuit and the contact circuit share no electrical connection, making relays ideal for separating sensitive microcontroller logic from noisy, high-current loads.

The Coil Side (Control Circuit)

The coil is a spool of fine copper wire. In standard automotive relays (like the ubiquitous Bosch 5-pin), the coil terminals are 85 and 86. In industrial DIN-rail relays (like the Omron G2R series), they are marked A1 and A2. Polarity generally does not matter for standard AC or DC coils unless the relay has an internal status LED or a built-in suppression diode.

⚠️ CRITICAL DC FLYBACK WARNING: When wiring a DC coil, you must install a flyback diode (e.g., 1N4007) in reverse bias across the coil pins (cathode to positive, anode to negative). When the control circuit opens, the collapsing magnetic field generates a massive reverse voltage spike (often hundreds of volts). Without a flyback diode to recirculate this current, the spike will instantly destroy your ESP32 GPIO pin, fry your driving transistor, or cause severe EMI across your board.

The Contact Side (Load Circuit)

The contacts carry the actual load current. Standard terminology includes:

  • Common (COM / Pin 30 / Pin 11): The moving armature. This connects to your power source or load.
  • Normally Open (NO / Pin 87 / Pin 14): The circuit completes only when the coil is energized.
  • Normally Closed (NC / Pin 87a / Pin 12): The circuit is complete when the relay is at rest, and breaks when energized.

Decoding Relay Ratings: Which Column Governs Your Load?

Relay datasheets feature multiple rating columns. The most common mistake DIYers and junior technicians make is looking only at the maximum "Resistive" rating. According to All About Circuits, the governing column is always the one that matches your specific load's inrush characteristics.

Rating Parameter Typical Value (Omron G2R-2) What It Actually Means
Coil Voltage 12VDC / 120VAC Must match control signal. Operate range is typically 80% to 110% of nominal.
Resistive Contact Rating 5A @ 250VAC Maximum steady-state current for heaters or incandescent bulbs. No inrush.
Inductive / Motor Rating 2A @ 250VAC (cos φ=0.4) The Governing Column for motors. Accounts for locked-rotor inrush and arc suppression limits.
Breaking Capacity 1250VA The maximum fault energy the relay can safely interrupt without sustaining an arc.

A Note on Overcurrent Protection: Fuses and circuit breakers are not interchangeable when protecting relay contacts. A fast-acting semiconductor fuse clears a short circuit in milliseconds, keeping the fault current below the relay's breaking capacity. A standard thermal-magnetic breaker, however, follows a specific time-current curve; it may allow 10x inrush current to flow for several AC cycles before tripping. If that let-through energy exceeds the relay's making/breaking capacity, the contacts will weld together, defeating the safety of the circuit.

Selection Decision Path by Load Type

Use this decision tree to determine how heavily you must derate your relay based on the physical nature of the load.

Load Type Examples Derating Factor Required Protection / Snubber
Resistive Space heaters, toasters, incandescent lamps 100% (Use full rated current) None required. Standard fuse sizing.
Inductive Solenoids, contactor coils, transformers 30% to 50% of resistive rating RC snubber network across contacts to suppress turn-off voltage spikes.
Motor (AC/DC) Compressors, pumps, conveyor belts 20% to 30% (Must check LRA vs FLA) Motor-rated relay (HP rating required). Thermal overload relay in series.
Capacitive Switching power supplies, LED drivers 20% to 40% NTC thermistor in series to limit massive initial capacitor charging inrush.

Testing and Troubleshooting: Dead, Live, and End-of-Life

When a circuit fails, you need to isolate whether the fault lies in the control logic, the relay coil, or the relay contacts.

Dead Testing (Power Removed)

Set your multimeter to Ohms (Ω) or Continuity.

  1. Test the Coil: Place probes across A1 and A2 (or 85/86). A healthy 12VDC relay coil typically reads between 60Ω and 120Ω. A 120VAC coil will read much higher (e.g., 4,000Ω to 10,000Ω). If the meter reads "OL" (infinite), the internal coil wire is broken. The relay is dead.
  2. Test the Contacts: Place probes across COM and NC. It should read < 1Ω. Place probes across COM and NO. It should read "OL". If COM to NO shows continuity while de-energized, the contacts are welded shut from a previous overcurrent event.

Live Testing (Power Applied)

Safety First: Use appropriate PPE and rated test leads when working with mains voltage.

  1. Verify Coil Voltage: Energize the circuit. Measure DC/AC voltage directly across the coil pins. It must be within 80% to 110% of the nominal rating. If voltage is low, the armature will chatter and burn out the coil.
  2. Measure Contact Voltage Drop: With the load running, measure the voltage difference between the COM pin and the NO pin. A healthy relay will show a drop of less than 50mV. If you read a drop greater than 0.5V under load, the contacts are pitted, carbonized, and generating dangerous heat.

When to Repair vs. Replace

Standard PCB, automotive, and DIN-rail electromechanical relays (like the Omron G2R family) are sealed units. They are unrepairable. If the coil is open or the contacts are welded/pitted, replace the entire component. The only exception is heavy-duty industrial contactors (e.g., Allen-Bradley 100-C series), where the main power poles, arc chutes, and coils are modular and can be individually swapped out. For anything under 40A, swap the whole unit.

Switch Relay Wiring FAQ

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

No. Automotive relays (like standard Bosch 5-pin models) are designed for 12V/24V DC systems and lack the internal arc chutes and physical contact spacing required for AC mains. The 120V AC will easily jump the ~0.8mm contact gap, sustaining an arc that will melt the housing and cause a fire. Always use an IEC/UL-rated relay with proper clearance and creepage distances for mains voltage.

Why is my relay coil getting too hot to touch?

Continuous duty coils dissipate heat constantly (P = V²/R). A standard 12V relay with a 60-ohm coil burns 2.4W of power as heat whenever it is energized. If mounted in a sealed, unventilated enclosure, this ambient temperature rise will eventually degrade the coil's internal insulation, leading to a short. For applications where the relay must stay on for hours at a time, switch to a magnetic latching relay (which only draws power to change states) or a Solid State Relay (SSR).

How do I wire multiple relays to a single microcontroller GPIO pin?

Never wire relay coils directly in parallel to a single ESP32 or Arduino GPIO pin. The combined inrush current of multiple coils will instantly exceed the GPIO's absolute maximum rating (usually 12mA to 20mA per pin) and will brownout or permanently damage the microcontroller. Instead, use the GPIO to drive the gate of a single logic-level MOSFET (like an IRLZ44N) or a ULN2803 Darlington transistor array, and let the MOSFET handle sinking the combined coil current to ground.