Most M12 sensor distribution boxes follow one near-universal wiring standard: the 5-pin A-coded pinout. Learn it once and you can wire, cross-reference and troubleshoot boxes from any manufacturer, because they nearly all share it. This guide lays out the pinout, explains each pin, and shows how a dual-channel port maps a double-acting cylinder.
The standard 5-pin A-coded pinout
On a dual-channel 5-pin distribution box, each M12 port uses the same assignment:
| Pin | Function | Typical cordset colour |
|---|---|---|
| 1 | +24 V DC (power to sensor) | Brown |
| 2 | Signal B (2nd signal, dual channel) | White |
| 3 | 0 V (common return) | Blue |
| 4 | Signal A (primary signal) | Black |
| 5 | PE / FE (earth) | Grey |
Pins 2 and 4 carry the two independent switching signals (channels B and A). On a single-channel box only one signal pin is used per port; the pinout is otherwise identical, which is part of why the standard is so convenient.
What each pin does
- Pin 1 (+24 V DC): supplies power out to the sensor. Usually brown in a standard cordset.
- Pin 2 (Signal B): the second switching signal on a dual-channel port. Usually white.
- Pin 3 (0 V): the common return. Usually blue.
- Pin 4 (Signal A): the primary switching signal, and the only signal used on a single-signal sensor. Usually black.
- Pin 5 (PE / FE): protective or functional earth. Usually grey; not present on 4-pin cordsets.
Because a 4-pin sensor cordset simply omits pin 5, it still mates with a 5-pin A-coded socket. That means a 5-pin dual-channel box also accepts 4-pin single-signal sensors.
The home-run side
All the port signals are combined into the home-run trunk, which reaches the panel either as a fixed moulded cable or through an M23 quick-disconnect connector. The trunk has one core per signal plus the shared power and earth cores, so an 8-port dual-channel box carries sixteen signal cores plus power and earth. At the panel, each core lands on its own PLC input terminal.
Worked example: wiring a double-acting cylinder
A double-acting cylinder has two reed switches: one senses the extended position, one the retracted. With a Y-splitter or a twin cordset, both switches connect to a single dual-channel port. The extended-position switch maps to Signal A (pin 4) and the retracted-position switch to Signal B (pin 2). Both travel down the home-run to two adjacent PLC inputs. One port, one plug, two signals, no wiring on terminals.
Common wiring mistakes to avoid
- Ignoring output logic: a PNP box wired with NPN sensors passes signals but the LEDs will not indicate correctly.
- Leaving unused ports open: fit protective caps or the box loses its IP67 rating at that socket.
- Assuming single channel: plugging a two-signal cylinder into a single-channel box loses the second signal.
- Over-tightening M12 connectors: hand-tight plus a light nip is enough; the seal is in the thread and the O-ring.
Frequently Asked Questions
What is the standard M12 5-pin pinout for a sensor box?
Pin 1 is +24 V, pin 2 is signal B, pin 3 is 0 V, pin 4 is signal A, and pin 5 is protective earth. This A-coded assignment is shared across almost all manufacturers.
Can a 4-pin sensor plug into a 5-pin box?
Yes. A 4-pin A-coded cordset mates with a 5-pin A-coded socket; it simply does not use pin 5. So a 5-pin dual-channel box accepts 4-pin single-signal sensors.
Why must I cap unused ports?
An open M12 socket breaks the box's IP67 seal at that point, letting in dust and moisture. A protective cap restores the rating on ports you are not using.
Need help choosing? Voxintech stocks M12 sensor distribution boxes from 4 to 10 ports in Noida, Delhi NCR, with datasheets, GST invoicing and ex-stock dispatch. Send us your sensor count and we will size the right box for your machine.
Related Voxintech products
Browse Voxintech M12 sensor junction boxes – 4, 6, 8 and 10-port dual-channel distribution boxes with 2 m, 5 m and 10 m home-run cables, in stock in Noida, Delhi NCR.
