Industry News
Relay Wiring Diagram: How to Wire a Relay (Coil, COM, NO, NC)
A general relay wiring diagram explained in words: coil and contact circuits, terminal numbering, a PLC-driven example, NO vs NC, SPDT vs DPDT and the mistakes to avoid.
To wire a relay, treat it as two circuits. The coil side (often marked A1 and A2) connects to the control signal, such as a push button or PLC output, at its rated coil voltage. The contact side connects the load supply to COM and the load to NO, if it should run only while the relay is energised, or to NC, if it should run until the relay operates.
This guide explains a general relay wiring diagram for industrial plug-in relays; the exact terminal numbers always come from the drawing for your relay and socket.
The two circuits in every relay wiring diagram.
A relay wiring diagram shows one component sitting in two electrically separate circuits. The coil circuit carries a small control current; the contact circuit carries the load current, which can be at a completely different voltage. A 24 V DC coil can switch a 230 V AC load when the contact ratings allow it, because the relay insulates one side from the other.
| Terminal | Side | Connects to |
|---|---|---|
| Coil + / A1 | Control | Switched control supply: push button, sensor or PLC output (or the + supply in a sinking circuit) |
| Coil − / A2 | Control | Control supply return (0 V or neutral), or the PLC output in a sinking circuit |
| COM (common) | Load | Load supply, or the line that is being switched |
| NO (normally open) | Load | Load that must run only while the coil is energised |
| NC (normally closed) | Load | Load that must run until the coil is energised |
“Normally” means with the coil de-energised. Diagrams therefore draw relay contacts at rest: NO open, NC closed. If you read a drawing as if the relay were operated, NO and NC appear swapped.
Pin numbering conventions on relays and sockets.
Three numbering styles are common, and a relay and its socket may use different ones:
- A1 / A2 for the coil. Many industrial relays and DIN-rail sockets mark the coil terminals A1 and A2. When polarity matters, the drawing shows which one is positive.
- Two-digit contact numbers. In this scheme the first digit is the contact number and the second its function: on a changeover contact, 11 is COM, 12 is NC and 14 is NO; the second contact is 21, 22 and 24. The NO vs NC guide explains the scheme in more detail.
- Plain pin numbers. Octal relays and PCB relays usually number their pins 1, 2, 3 and so on. The 8-pin ZJ10F, for example, has its coil on pins 2 and 7, and the 11-pin version on pins 2 and 10. The full pinout is in the 8-pin and 11-pin relay wiring diagram.
ZJWZJH (JINHONG) socket part numbers state the number of changeover contacts: “1Z” is one changeover (SPDT) and “2Z” is two (DPDT), as in the 157F-1Z and 157F-2Z sockets. Terminal marking differs between relay families and socket styles, so wire from the terminal map printed on the socket and the connection drawing for the exact part number, not from this generic description.
Example: a PLC output switches a 230 V AC load through a relay.
This example assumes a 24 V DC relay coil, a sourcing (PNP) PLC output that supplies +24 V when on, a single-phase 230 V AC lamp as the load, and a relay with one changeover contact numbered 11/12/14. It is a description of the principle, not the terminal layout of a specific ZJWZJH model.
| From | To | Purpose |
|---|---|---|
| PLC output (+24 V when on) | Coil A1 | Energises the coil |
| Coil A2 | 0 V of the 24 V DC supply | Completes the coil circuit |
| 230 V AC line (L), via its protective device | COM 11 | Feeds the contact |
| NO 14 | Lamp | Lamp lights only while the coil is energised |
| Lamp | Neutral (N) | Completes the load circuit |
| NC 12 | Not connected | Spare, or a second load that runs while the relay is off |
With a sinking (NPN) output the coil is turned round: A1 goes to +24 V and A2 to the PLC output, which switches the 0 V side. If the coil has a diode or LED, keep the positive terminal on the positive side in both cases. NPN vs PNP outputs explains the difference. The same contact wiring works when the coil is driven by a push button instead of a PLC; a start-stop circuit adds a holding contact, described in start-stop push button wiring.
Simplified demonstration
Choose NO or NC for the load.
Decide what the load must do when the coil has no power, including when the control supply fails or a wire breaks:
- Use NO when the load should run only on command: a motor starter coil, a solenoid valve, a warning lamp driven by a fault output.
- Use NC when the load should stay on until the relay operates, for example a “ready” lamp that goes out when a fault relay picks up.
- Use both on one changeover contact to switch between two loads, such as a green and a red lamp, from one signal.
A standard relay contact is not a safety function. Emergency stop and guard circuits need devices and wiring validated in the machine’s risk assessment; see emergency stop wiring with a safety relay.
SPDT vs DPDT relay wiring.
An SPDT relay has one changeover contact: one COM, one NO, one NC. A DPDT relay has two changeover contacts moved by the same coil, each with its own COM, NO and NC. Use the second pole to switch a second circuit, such as feedback to a PLC input, from the same signal. Keep each pole’s wiring separate unless the drawing says otherwise, and check the rating per pole: on the ZJ157F, the 1-pole version is rated 12 A and the 2-pole version 8 A per pole, both at 250 V AC / 30 V DC resistive. If the two poles switch different voltages, check the published dielectric strength between poles as well (3000 V AC for the ZJ157F, 2000 V AC for the ZJ18F). SPDT vs DPDT covers motor reversing and other DPDT uses.
Coil supply and suppression.
The coil voltage and type (AC or DC) in the part number must match the control supply. When a DC coil is switched off, its inductance produces a voltage spike that can stress a PLC transistor output or arc across a push-button contact. The usual cure is a flyback (freewheeling) diode across the coil, cathode to the positive terminal, which makes the coil polarity-sensitive and slightly slows the relay’s release. AC coils use an RC network or a varistor instead. Several ZJWZJH relays offer this as an option: a diode (D) on the ZJ10F, D or D1 on the ZJ157F, and D (diode) or C (varistor) on the ZJ18F.
How to wire a relay step by step.
- Isolate the control and load circuits and prove them dead.
- Confirm from the full part number the coil voltage, AC or DC, any diode or LED option, and the contact rating for your load type, not only the resistive rating.
- Mount the socket that matches the relay (same pin layout and number of changeover contacts) on the DIN rail.
- Wire the coil terminals to the control signal and its return, observing polarity where marked.
- Wire the load supply to COM and the load to NO or NC, one circuit per pole.
- Plug in the relay, fit the retaining clip, and label the socket.
- Energise the coil and check that each load switches as planned; then remove the signal and check that it returns.
ZJWZJH relays and sockets for this wiring.
| Relay | Contacts and coil | Socket | Note |
|---|---|---|---|
| ZJ157F | SPDT 12 A or DPDT 8 A, 250 V AC / 30 V DC; coil 6–110 V DC or 6–240 V AC | 157F-2Z-C3 screw, or 157F-1Z-C5 push-in | Slim relay for PLC output interfacing; LED and diode options |
| ZJ18F | 2, 3 or 4 changeovers; coil 6–110 V DC or 6–240 V AC | 18F-2Z-C3 (2 changeovers) | Match the socket to the pole count |
| ZJ10F | 8-pin DPDT or 11-pin 3PDT; 10 A, 250 V AC / 28 V DC | 10F-2Z-C1 (8-pin) | Pin-numbered, not A1/A2; see the octal pinout guide |
| ZJ41F | SPDT 6 A, 250 V AC / 30 V DC; coil 5–60 V DC | 41F-1Z-C2 | 5 mm wide; socket includes a protection and indication circuit and is ordered by input-voltage code |
For 16 or 32 PLC outputs, a PLC relay module such as the JHF16C replaces individual relays and sockets: the coil side connects to the PLC through one 20-pin cable, and versions exist for NPN (+COM) and PNP (−COM) outputs. See how to choose and wire a PLC relay module.
Common relay wiring mistakes.
| Mistake | Result | Check |
|---|---|---|
| Reading the diagram as if the relay were operated | NO and NC swapped | Diagrams show contacts with the coil off |
| Terminals of two poles mixed in one circuit | Poles interconnected; a terminal may be live unexpectedly | One complete circuit per pole |
| Sinking output wired as if it were sourcing | Coil never energises, or a diode coil shorts the output | PLC output type and coil polarity |
| Motor or lamp load chosen on the resistive rating | Contact wear or welding | Load type and inrush; see why relay contacts weld |
| No suppression on a DC coil driven by a transistor output | Output stress, interference | Diode option or external suppression |
| Copying a pinout from another brand | Wrong terminals | Drawing for the exact part number |
Next step.
To get a matched relay and socket, send us the coil voltage and type, the control source (push button, sourcing or sinking PLC output), the number of circuits to switch, and the load type, voltage and current for each. Browse the relay range and relay sockets.
FAQ
Can a 12 V or 24 V relay switch 230 V?
Yes, if the contact rating covers the load. The coil voltage describes the control circuit only. Check the contact rating for the load type, voltage and current, and the socket rating, which can differ from the relay’s.
What do 30, 85, 86 and 87 mean on a relay?
That is the automotive relay convention: 85 and 86 are the coil, 30 the common, 87 the normally open contact and 87a the normally closed contact. Industrial plug-in relays use other schemes: plain pin numbers, as on the ZJWZJH ZJ10F, or A1/A2 and 11/12/14 style marking.
Does a relay need its own power supply?
The coil needs a supply at its rated voltage, which is often the same 24 V DC supply as the PLC. The load needs its own supply on the contact side. The two can be separate; that is what lets a low-voltage control circuit switch a mains load.
How do I know which relay terminals are the coil?
Look for A1 and A2 on industrial relays and DIN-rail sockets, or read the pin numbers from the drawing: on the 8-pin ZJ10F the coil is on pins 2 and 7, and on the 11-pin version on pins 2 and 10. Always wire from the terminal map for the exact relay and socket.
ZJ157F relay
157F-2Z-C3 socket
ZJ10F relay
10F-2Z-C1 socket