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

How to Bench-Test a Relay with a Multimeter

Before you wire a relay into a circuit, it's worth confirming it's actually good. Set your multimeter to resistance (ohms) and work through the coil first, then the contacts.

Measure across pins 85 and 86 (the coil). You should read a finite resistance -- not zero (a shorted coil) and not open/infinite (a broken winding). The actual number varies a lot by relay part number and coil voltage; a small automotive or PCB relay might read anywhere from tens to a few hundred ohms, so check the datasheet if you need an exact figure rather than assuming a fixed value.

Next, with the coil de-energized, check continuity between pin 30 (common) and pin 87 (NO), and separately between pin 30 and pin 87a (NC) if your relay has that pin. Then apply 12V (or whatever the relay's rated coil voltage is) across 85/86 and repeat the continuity checks. Disconnect the load circuit while you do this so you're not feeding stray voltage back through the meter.

Measurement Expected reading
Resistance across 85/86 (coil) Finite resistance -- varies by relay, not zero and not open
Continuity 30 to 87 (NO), coil de-energized Open (no continuity)
Continuity 30 to 87a (NC), coil de-energized Closed (continuity)
Continuity 30 to 87, coil energized at rated voltage Closed (continuity)
Continuity 30 to 87a, coil energized at rated voltage Open (no continuity)

If any of these readings don't match, the relay has failed in some way -- see the failure modes below.

Common Relay Failure Modes

Welded or stuck contacts. The relay stays switched on (30 to 87 still shows continuity) even after you remove power from the coil. This is usually caused by switching a load that exceeds the contact current rating, or by inductive arcing when the relay switches a motor, solenoid, or other inductive load without adequate protection on the load side. Repeated arcing pits the contact surfaces until they fuse together.

Open coil. No click when you energize it, and no continuity across 85/86. The coil winding has broken internally, usually from age, overheating, or physical damage. There's no fixing this -- replace the relay.

Contact corrosion or high resistance. The relay clicks normally, meaning the coil is fine, but the connected load runs weak, dim, or flickers. The contact surfaces have oxidized or pitted enough to add resistance to the load path even though a basic continuity check still shows a closed circuit. A voltage-drop test across the closed contacts under load will catch this where a simple continuity test won't.

Choosing Contact Ratings and Fuse Sizing

When you pick a relay, choose a contact current rating with real margin above the load's steady-state current -- not right at the edge of it. Motors, incandescent bulbs, and other loads with high inrush current can briefly draw several times their running current when they first switch on, and running contacts near their rated maximum shortens their life.

The fuse in the 30/87 load path should be sized to protect the wire gauge you're using, not just matched to the relay's contact rating. Relay contacts are often rated well above what a given wire size can safely carry, so the fuse's real job is protecting the wiring and the load, not the relay itself.

The coil-side (85/86) circuit is a different story. Coil current is typically small, so it's normally adequately protected by a small fuse or simply by the low current rating of the switch or transistor driving it, rather than needing a large fuse of its own.

Relay Coil Power and Control-Side Current

Two simple calculations are useful once you know a relay's coil resistance and rated coil voltage.

Coil power dissipation: P = V² / R, using the coil voltage and coil resistance. This tells you how much heat the coil generates, which matters most in continuous-duty applications where the relay stays energized for long periods.

Minimum control-side current: I = V/R, using the same coil voltage and resistance. This tells you how much current the driving circuit needs to supply to energize the coil. Compare that number to what your control source can actually deliver -- a microcontroller GPIO pin is typically limited to around 20mA, so if the calculated coil current is higher than that, the pin can't drive the relay directly and needs a transistor or MOSFET driver stage in between, as covered in the Arduino wiring section above.

Key Takeaways

Peterbilt Relays Behind Dash Diagram — circuit diagram showing component connections+-12V SupplyControl SwitchKRelay CoilFlyback DiodeRelay Contact (NO)Lamp (Load)Relay Control CircuitFlyback diode protects coilNO contact closes when coil energized
Peterbilt Relays Behind Dash Diagram — open the interactive version of this diagram to customise and export it.
Relay Circuit Diagram — circuit diagram showing component connections+-12V SupplyControl SwitchKRelay CoilFlyback DiodeRelay Contact (NO)Lamp (Load)Relay Control CircuitFlyback diode protects coilNO contact closes when coil energized
Relay Circuit Diagram — open the interactive version of this diagram to customise and export it.
Relay Diagram — circuit diagram showing component connections+-12V SupplyControl SwitchKRelay CoilFlyback DiodeRelay Contact (NO)Lamp (Load)Relay Control CircuitFlyback diode protects coilNO contact closes when coil energized
Relay Diagram — open the interactive version of this diagram to customise and export it.

Frequently asked questions

why does my relay click but the load doesn't turn on

A click means the coil is energizing and the armature is moving, so the coil side is fine. The problem is on the load side: a blown fuse in the 30/87 circuit, a bad ground, a wire that's come loose from pin 87 or 30, or contacts corroded enough to add resistance despite still closing. Check for voltage at pin 87 with the relay energized.

can I use a 12V relay on a 24V system

No. A 12V relay's coil is wound for 12V and will draw roughly double its rated current on 24V, which overheats the coil and can burn it out quickly. Use a relay with a coil rated for your actual control voltage. The contact rating (the load side) is separate and doesn't need to match your control voltage.

do I need a diode with every relay

You need a flyback diode whenever a transistor, MOSFET, microcontroller, or other semiconductor is switching the coil directly, since the voltage spike from the collapsing magnetic field can damage that component. If a mechanical switch alone is energizing the coil, a diode is less critical but is still good practice to protect any other electronics sharing that power rail.

how do I know if a relay is bad

Test it with a multimeter. Measure resistance across the coil pins (85/86) -- it should read a finite value, not zero or open. Then check continuity across the common and normally open pins (30/87) with the coil de-energized and again with rated voltage applied to the coil. If the readings don't flip as expected, or there's no click at all, the relay has failed.

what happens if you wire a relay backwards

Most electromechanical relay coils aren't polarity sensitive, so reversing 85 and 86 usually still energizes the coil normally. The bigger risk is wiring the load to the NC (87a) contact instead of NO (87), which makes the load run backwards -- on by default, off when activated. A backwards flyback diode can short the coil supply when energized and blow a fuse.

why does my relay hum or chatter instead of clicking cleanly

Chattering usually means the coil isn't getting a clean, steady voltage -- a weak or fluctuating power supply, a loose connection at 85 or 86, or a control voltage that's below the relay's rated pull-in voltage. Check the voltage at the coil pins while it's supposed to be energized; if it's sagging or unstable, trace it back to the power source or wiring before assuming the relay itself is defective.

Interactive diagrams for this guide

Related guides