A standard 1 channel relay module (like the ubiquitous Songle SRD-05VDC-SL-C or Omron G5V variants) is the workhorse of DIY home automation and microcontroller projects. Priced between $1.50 and $3.00, these modules provide galvanic isolation between your low-voltage logic (Arduino, ESP32, Raspberry Pi) and higher-voltage AC or DC loads. However, misinterpreting the datasheet ratings or ignoring the inductive kickback on the coil side will result in welded contacts, brownouts, or bricked GPIO pins. This guide breaks down the exact wiring, load-selection decision paths, and bench-testing procedures you need to deploy these modules reliably.

The Anatomy of a 1 Channel Relay Module (Coil vs. Contact Side)

A relay module consists of two entirely separate circuits sharing only a magnetic field. Understanding this galvanic isolation is critical for safe wiring.

The Coil Side (Low-Voltage Control)

The control side typically features a 3-pin or 4-pin header labeled VCC, GND, and IN (sometimes with a JD-VCC jumper for total optical isolation). When you pull the IN pin low (active-low modules) or high (active-high), current flows through an optocoupler (usually a PC817) and a driver transistor (like an S8550 PNP), which energizes the electromagnetic coil. A standard 5V coil draws about 70mA to 90mA—too much for a microcontroller GPIO pin to source directly, which is why the onboard driver transistor is mandatory.

CRITICAL: Flyback Diode Protection
When wiring the coil side in DC circuits, you must account for inductive kickback. When the driver transistor switches off, the collapsing magnetic field in the coil generates a high-voltage reverse spike that can destroy your microcontroller. Commercial modules include a built-in flyback diode (typically a 1N4148) across the coil. If you are wiring a bare relay or designing a custom PCB, you must install a flyback diode in reverse bias across the coil pins.

The Contact Side (High-Voltage Load)

The load side uses a 3-position screw terminal block: COM (Common), NO (Normally Open), and NC (Normally Closed).

  • COM to NO: The circuit is open until the coil is energized. Use this for loads that should default to OFF (e.g., lights, heaters).
  • COM to NC: The circuit is closed until the coil is energized. Use this for fail-safe applications (e.g., mag-locks that must unlock during a power failure).

Decoding Relay Ratings: Which Column Governs Your Load?

When sizing a relay for a specific load, the Contact Rating and Breaking Capacity columns govern your maximum limits, not the coil voltage. The coil voltage only dictates your control circuit requirements. Below is the rating table for a standard SRD-05VDC-SL-C module.

Parameter Typical Datasheet Value What It Means for Your Build
Coil Voltage 5V DC (Nominal) Must be supplied by a dedicated 5V rail; do not power from the ESP32's 3.3V VOUT pin.
Coil Resistance ~71 Ω Dictates the steady-state current draw (~70mA at 5V).
Contact Rating (Resistive) 10A @ 250VAC / 10A @ 30VDC The absolute maximum for purely resistive loads (incandescent bulbs, heating elements).
Breaking Capacity Max 10A (AC), 10A (DC) The maximum current the contacts can safely interrupt without arcing and welding shut.
Contact Resistance < 100 mΩ Voltage drop across closed contacts; higher values indicate pitting or carbon buildup.

Note: A common bench mistake is treating the relay’s contact rating like a fuse or breaker. A 10A relay contact is not a 10A overcurrent protective device. Fuses and breakers clear faults based on specific time-current curves (e.g., a fast-blow fuse clears a dead short in milliseconds, while a thermal-magnetic breaker trips on sustained overloads). A relay will simply weld its contacts shut if subjected to a massive short-circuit current, failing in a dangerous closed state. Always place a properly sized fuse on the load side.

Selection Decision Path by Load Type

The "10A" rating on the plastic shell is highly misleading if you aren't switching a purely resistive load. Inductive and motor loads generate massive inrush currents and back-EMF. Use this decision tree to derate your 1 channel relay module appropriately:

Load Type Inrush / Arcing Factor Derating Rule Example Application
Resistive 1x (No inrush) Use 80% of rated capacity (8A max on a 10A relay). Space heater, incandescent bulb, soldering iron.
Inductive 2x to 5x inrush Derate to 30% of rated capacity (3A max). Add an RC snubber across contacts. Solenoids, relays, contactor coils, transformers.
Motor (AC/DC) 5x to 8x locked-rotor inrush Derate to 20% of rated capacity (2A max). Use a contactor for larger motors. HVAC blower fans, sump pumps, compressor motors.
LED / CFL 10x to 20x capacitive inrush Derate to 10% of rated capacity (1A max). Use zero-cross SSRs for large LED banks. Smart home lighting circuits, LED strip power supplies.

Bench Testing: Dead and Live Verification

Before wiring a module into a wall box or final enclosure, validate it on the bench. Refer to the SparkFun Relay Tutorial for basic electromechanical principles if you are new to component testing.

Dead Testing (Multimeter Required)

  1. Coil Resistance: Set your multimeter to Ohms. Measure across the internal coil pins (or VCC and the coil side of the driver circuit if accessible). You should read ~71Ω for a 5V module. An "OL" (open loop) reading means the coil wire is snapped internally.
  2. Contact Continuity (De-energized): Set the meter to Continuity/Diode mode. Place probes on COM and NC. It should beep (< 1Ω). Place probes on COM and NO. It should read "OL".
  3. Contact Continuity (Energized): Apply 5V to VCC and GND, and pull the IN pin to GND. You should hear an audible click. Re-test the contacts: COM to NO should now beep, and COM to NC should read "OL".

Live Testing (Under Load)

  1. Voltage Drop Test: With the relay energized and the actual load running, measure the AC or DC voltage directly across the COM and NO terminals. A healthy relay will show a voltage drop of less than 0.1V. If you read 1V or more, the internal contacts are pitted, carbon-fouled, or failing.
  2. Thermal Check: After 15 minutes of operation at 75% load, check the terminal block with an IR thermometer. If the plastic is softening or exceeds 60°C, your wire terminations are loose, or the relay is undersized for the load.

When to Repair vs. Replace

When a relay fails, when do you repair versus replace? For a standalone $2 module, always replace. The internal mechanical contacts are sealed inside the plastic can and cannot be serviced or cleaned. If the driver transistor (e.g., S8550) or optocoupler (PC817) on the module PCB fails, you could theoretically desolder and replace the $0.10 component, but bench time is more valuable than the part cost. The only exception is if the relay is integrated into a custom, unobtainable, or expensive PCB, in which case you desolder the relay can and solder in a matching pin-compatible replacement from a reputable brand like Omron or Finder.

Frequently Asked Questions

Why does my 1 channel relay module click but the load doesn't turn on?

If you hear the mechanical click but the load remains dead, the issue is almost always on the contact side. First, verify you wired the load to COM and NO (not COM and NC, which requires the relay to be de-energized to pass current). Second, check for contact welding or carbon buildup using the live voltage drop test mentioned above. Finally, ensure your load's power supply is actually outputting voltage; the relay only acts as a switch, it does not provide power to the load.

Can I use a 5V 1 channel relay module directly with a 3.3V ESP32 GPIO?

Yes, but you must wire it correctly. Most 5V relay modules are "active-low," meaning they trigger when the IN pin is pulled to ground. Power the module's VCC and GND from the ESP32's 5V (VIN) and GND pins. Connect the IN pin to your 3.3V GPIO. When the GPIO outputs HIGH (3.3V), the optocoupler LED won't illuminate (relay OFF). When the GPIO outputs LOW (0V), current flows from the 5V VCC, through the optocoupler, into the GPIO, triggering the relay. If your module has a "JD-VCC" jumper, remove it and supply the JD-VCC pin with a separate 5V source for true galvanic isolation.

How do I stop my microcontroller from resetting when the relay switches?

This is a classic brownout caused by the coil's inrush current dragging down the shared 5V rail, or back-EMF coupling into the logic ground. To fix this, never power the relay module's VCC directly from the microcontroller's onboard 5V regulator. Instead, use a separate 5V buck converter or power supply for the relay module, tying only the GND and the IN signal wire to the microcontroller. Additionally, place a 100µF to 470µF electrolytic bulk capacitor across the VCC and GND terminals on the relay module itself to supply the instantaneous 70mA spike when the coil energizes.