Relay Wiring Diagram: How Relays Work

A relay is an electrically operated switch that uses a small control signal to switch a much larger load. Relays are found everywhere -- car accessories, industrial control panels, home automation, HVAC systems, and Arduino projects. Understanding how to wire a relay correctly is a fundamental skill for anyone working with electrical systems.

This guide covers the different types of relays, how they work internally, wiring diagrams for common configurations, and practical applications.

What Is a Relay?

A relay is an electromagnetic switch. It contains a coil of wire wrapped around an iron core. When you pass current through the coil, it creates a magnetic field that pulls a metal armature, which moves a set of contacts. When the coil is de-energized, a spring returns the armature to its resting position.

The key advantage of a relay is isolation: the control circuit (coil side) is electrically separate from the switched circuit (contact side). This means you can use a 5V signal from a microcontroller to switch a 120V appliance, or a dashboard switch to control a 30A circuit.

Relay Terminology

Types of Relays

Electromechanical Relay (EMR)

The most common type. Uses a physical coil and mechanical contacts. Available in many form factors: PCB mount, plug-in (with socket), DIN rail, and automotive (ISO mini relay).

Pros: High current capacity, works with AC and DC, clear mechanical operation. Cons: Limited switching speed, contact wear over time, audible click.

Solid State Relay (SSR)

Uses semiconductor devices (transistors, triacs, or SCRs) instead of mechanical contacts. No moving parts.

Pros: Silent operation, no contact bounce, very fast switching, long life. Cons: Small voltage drop across the output, can overheat at high currents, may need a heatsink.

Automotive Relay (ISO Mini)

A standardized 5-pin relay used in vehicles. Pins are numbered 85, 86, 30, 87, and 87a following the ISO standard.

Time Delay Relay

Includes a timing circuit that delays the switching action by a configurable duration. Used in industrial motor control, HVAC sequencing, and lighting controls.

Latching Relay

Maintains its switched state even after the coil is de-energized. Requires a reverse pulse to reset. Used in lighting control panels and energy-saving applications.

How to Read Relay Pin Diagrams

Every relay has its pin configuration printed on the housing or datasheet. The most common configuration for a general-purpose relay is SPDT (Single Pole, Double Throw) with five pins:

Pin layout (bottom view of a 5-pin relay):
  [85]  [86]
     [30]
  [87a] [87]

For a PCB relay with standard markings:

Basic Relay Wiring Diagram: Switching a Load

Example: Using a 12V Relay to Control a High-Power Light

In this example, a dashboard switch controls a 12V relay, which in turn switches a 30A light bar.

Control circuit (coil side):

  1. Connect the positive terminal of the switch to 12V ignition power (fused at 5A).
  2. Connect the other terminal of the switch to pin 86 (coil positive).
  3. Connect pin 85 (coil negative) to ground.

Load circuit (contact side):

  1. Connect pin 30 (common) to the positive battery terminal through a 40A fuse.
  2. Connect pin 87 (normally open) to the positive wire of the light bar.
  3. Connect the negative wire of the light bar to ground.

When you flip the dashboard switch, 12V flows through the coil (pins 86 to 85), energizing the relay. This closes the connection between pin 30 and pin 87, sending battery power to the light bar.

Adding a Flyback Diode

When the relay coil is de-energized, the collapsing magnetic field generates a voltage spike that can damage sensitive electronics. A flyback diode (also called a snubber or freewheeling diode) absorbs this spike.

Connect a 1N4001 diode across the coil terminals:

This is especially important when driving a relay from a microcontroller, transistor, or MOSFET.

Relay Wiring with Arduino or Microcontroller

Microcontrollers output low-current signals (typically 20mA at 3.3V or 5V) that cannot drive a relay coil directly. You need a transistor driver circuit.

Circuit:

  1. Connect a digital output pin from the Arduino to the base of an NPN transistor (e.g., 2N2222) through a 1K resistor.
  2. Connect the transistor collector to one coil terminal.
  3. Connect the transistor emitter to ground.
  4. Connect the other coil terminal to 5V (or the relay's rated coil voltage).
  5. Place a flyback diode across the coil.

When the Arduino sets the pin HIGH, the transistor conducts, energizing the relay coil. Most "relay modules" sold for Arduino already include the transistor, flyback diode, and an LED indicator -- you just connect the signal pin, VCC, and GND.

Relay Wiring for Motor Control

Relays are commonly used to control motors, especially for reversing direction. A DPDT relay (or two SPDT relays) can reverse the polarity applied to a DC motor.

Motor Reversing with a DPDT Relay

A DPDT relay has two sets of contacts, each with COM, NO, and NC:

De-energized (motor runs forward):

Energized (motor runs reverse):

Wiring:

  1. Connect the positive supply to NC1 and NO2.
  2. Connect the negative supply (ground) to NC2 and NO1.
  3. Connect COM1 to motor terminal A.
  4. Connect COM2 to motor terminal B.
  5. Wire the coil to your control switch.

Using Multiple Relays

Relay Cascade (One Relay Controlling Another)

When you need a low-voltage signal to control a very high-voltage or high-current load, you can cascade relays. A small relay driven by a microcontroller switches a larger relay that handles the heavy load.

Interlocking Relays

In motor control, two relays are often interlocked to prevent simultaneous energization (which would cause a short circuit in a motor reversing circuit). Electrical interlocking is done by wiring the NC contact of each relay in series with the coil of the other relay.

Relay Specifications You Must Check

Before wiring a relay, verify these specifications:

  1. Coil voltage: Must match your control voltage (5V, 12V, 24V, etc.).
  2. Coil current: Determines how much current the coil draws. Needed to size your switching transistor or control circuit.
  3. Contact rating: The maximum current and voltage the contacts can switch. Always derate by 20% for reliability.
  4. Contact configuration: SPST, SPDT, DPDT, etc.
  5. Coil resistance: Lets you calculate coil current (I = V/R).
  6. Operating temperature: Matters for automotive and industrial applications.

Common Relay Wiring Mistakes

Mistake 1: No Fuse on the Load Circuit

Always fuse the load circuit at pin 30 (common). If the load shorts out, the fuse protects the wiring from melting.

Mistake 2: Undersized Wire

The wire from the battery to pin 30 and from pin 87 to the load must be sized for the full load current. A 30A light bar needs 10 AWG wire minimum.

Mistake 3: No Flyback Diode

Omitting the flyback diode can destroy transistors, microcontrollers, and other sensitive components in the control circuit.

Mistake 4: Using the Wrong Contact

Connecting the load to the NC (normally closed) contact instead of NO (normally open) means the load is on by default and turns off when you activate the switch -- the opposite of what most people want.

Mistake 5: Bad Ground

Both the coil ground and the load ground must have clean, solid connections. A bad ground causes intermittent operation or complete failure.

Relay Applications

Create Your Own Relay Wiring Diagram

Mapping out your relay circuit before you build saves time and prevents costly mistakes. With CircuitDiagramMaker, you can:

Create your relay wiring diagram -- free

Key Takeaways