M12 CAN Bus Pinout: CANopen & DeviceNet (5-Pin)
M12 CAN bus pinout for CANopen and DeviceNet: the 5-pin A-coded assignment (CAN_H, CAN_L, V+, V-, shield), wire colors, and wiring guidance, per CiA 303-1.
M12 CAN Bus Pinout: CANopen & DeviceNet (5-Pin)
Quick AnswerOn this page
Quick Answer
CAN bus over M12 uses the 5-pin A-coded connector, and both CANopen and DeviceNet share the same standard assignment: pin 1 is the shield (CAN_SHLD), pin 2 is bus power positive (V+), pin 3 is bus power negative / CAN ground (V-), pin 4 is CAN_H, and pin 5 is CAN_L. The differential CAN_H/CAN_L pair on pins 4 and 5 carries the bus signal, while pins 2 and 3 provide an optional bus power supply. This pinout is defined for CANopen in CiA 303-1 and matches the DeviceNet micro-style connector.
The M12 CAN Bus Pinout
The table below gives the standard 5-pin M12 CAN assignment used by CANopen and DeviceNet.
| Pin | Signal | Function | |-----|--------|----------| | 1 | CAN_SHLD | Cable shield / drain | | 2 | V+ (NET-S) | Bus power positive (optional) | | 3 | V- (NET-C) | Bus power negative / CAN_GND | | 4 | CAN_H | CAN signal high | | 5 | CAN_L | CAN signal low |
Physically, this is the standard 5-pin A-coded arrangement — the same contact layout shown in the 5-pin pinout guide, where pin 1 sits at the keyway and the contacts run round the face. What changes for CAN is the meaning of the contacts: instead of a sensor's supply-plus-signal layout, the connector carries the differential CAN pair, the bus power, and the shield. Because it is an A-coded connector, the keying is the common A-coding, so the mechanical part is interchangeable with other A-coded 5-pin connectors even though the signal use is CAN-specific.
Source: This assignment follows the CANopen connector recommendation CiA 303-1 (CAN in Automation) and the DeviceNet "micro" 5-pin connector convention (ODVA). Pin numbering is per IEC 61076-2-101 A-coding. Always confirm against your device datasheet and network specification.
CAN_H and CAN_L: The Signal Pair
The heart of any CAN connection is the differential pair, CAN_H (pin 4) and CAN_L (pin 5). CAN signals as the difference between these two lines, which is what gives the bus its strong noise immunity: interference tends to affect both wires equally and cancels in the difference. For this to work, CAN_H and CAN_L must be a twisted pair from end to end, and the bus must be terminated with 120 Ω resistors at both physical ends of the trunk.
Getting these two pins right is the single most important part of CAN wiring. Swapping CAN_H and CAN_L, or splitting the pair across the cable, degrades or breaks communication even when every contact is "connected". When terminating a field-wireable M12 CAN connector, keep the CAN_H/CAN_L pair twisted right up to pins 4 and 5, and verify the pair with a meter before energising.
Bus Power and Shield
Pins 2 (V+) and 3 (V-) carry an optional bus power supply. In DeviceNet this is a defined part of the network — node electronics are powered from the bus — and many CANopen networks use it too, though CANopen also allows nodes to be powered locally. V- (pin 3) doubles as the CAN reference ground (CAN_GND), giving the transceivers a common reference. Whether you wire the power pair depends on your network design: some installations use bus power, others leave V+/V- unused and power nodes separately.
Pin 1 is the shield (CAN_SHLD). On a screened CAN cable the shield connects here and is grounded according to the network's grounding scheme — usually at a single point to avoid ground loops. Carrying the shield correctly matters most on long buses and in electrically noisy plant, where it protects the differential pair from common-mode interference.
Wire Colors
Purpose-made CAN and DeviceNet cable follows a functional color code rather than the generic A-coded sensor colors: the drain/shield is bare, V+ is red, V- is black, CAN_H is white and CAN_L is blue. This DeviceNet color convention makes a CAN cordset easy to identify and is widely used across CANopen and DeviceNet hardware.
Be aware, though, that a generic A-coded 5-pin cordset — one not specifically built for CAN — follows the standard A-coded code instead (brown, white, blue, black, grey). So the colors you see depend on whether the cordset is a dedicated CAN cable or a general-purpose A-coded one. Never wire by color assumption alone on a CAN bus: confirm the conductor-to-pin mapping against the specific cable's datasheet, and verify CAN_H and CAN_L with a meter. For the color code across all codings, see the M12 connector wiring diagram.
CANopen vs DeviceNet on M12
CANopen and DeviceNet are different higher-layer protocols, but at the physical M12 connector they share the same 5-pin assignment, which is why a single connector style serves both. The differences live above the wire — in addressing, object dictionaries and device profiles — not in which pin is CAN_H. NMEA 2000, used in marine and similar applications, also uses the 5-pin M12 (micro) connector with this pinout.
This shared physical layer is convenient: the same cordsets, tools and terminations apply whether the device speaks CANopen or DeviceNet. What you must still match is the protocol and the network parameters — bit rate, termination and node addressing — which come from the device documentation, not the connector. Because the connector is A-coded, see the M12 connector types guide for how A-coding relates to the other codings, and use the connector selector or browse our 5-pin M12 connectors to find A-coded 5-pin parts.
Common CAN Wiring Mistakes
A handful of errors cause most M12 CAN problems. The first is swapping CAN_H and CAN_L — easy to do, and it breaks the bus. The second is failing to keep the pair twisted to the contacts, which lets noise in on longer runs. The third is missing or doubled termination: a CAN trunk needs exactly two 120 Ω terminators, one at each end, and getting this wrong causes intermittent, hard-to-diagnose faults. The fourth is mishandling the shield and ground — grounding the shield at multiple points can create a loop that injects noise.
As always, the safeguard is a continuity and pair check with a meter against the pinout before the bus goes live. On a multi-drop network a single transposed pair at one node can disturb the whole segment, so consistent, verified wiring at every connector pays off directly in reliability.
Key Takeaways
- CAN bus over M12 uses the 5-pin A-coded connector; CANopen and DeviceNet share the same pinout.
- Assignment: pin 1 CAN_SHLD, pin 2 V+, pin 3 V- / CAN_GND, pin 4 CAN_H, pin 5 CAN_L (per CiA 303-1 / DeviceNet).
- CAN_H (4) and CAN_L (5) are the differential pair — keep them twisted and terminate the bus with 120 Ω at both ends.
- Pins 2/3 carry optional bus power; pin 1 is the shield, grounded per the network's scheme.
- Dedicated CAN cable uses red/black/white/blue + drain colors; confirm the mapping against the cable datasheet and verify with a meter.
Frequently asked questions
- What is the M12 CAN bus pinout?
- CAN bus over M12 uses the 5-pin A-coded connector. The standard assignment (CiA 303-1 / DeviceNet) is pin 1 = CAN_SHLD (shield/drain), pin 2 = V+ (bus power), pin 3 = V- / CAN_GND, pin 4 = CAN_H, and pin 5 = CAN_L.
- Which M12 connector is used for CANopen and DeviceNet?
- Both CANopen and DeviceNet use the 5-pin A-coded ('micro') M12 connector with the same pin assignment: CAN_H and CAN_L on pins 4 and 5, bus power V+/V- on pins 2 and 3, and the shield on pin 1.
- What pins are CAN_H and CAN_L on an M12 connector?
- On a 5-pin M12 CAN connector, CAN_H is pin 4 and CAN_L is pin 5. The differential CAN_H/CAN_L pair carries the bus signal; pins 2 and 3 carry the optional bus power, and pin 1 is the shield.
- Does the M12 CAN connector carry power?
- It can. Pins 2 (V+) and 3 (V-) provide an optional bus power supply alongside the CAN_H/CAN_L signal pair, which is how DeviceNet and many CANopen networks power node electronics over the same cable. Whether power is used depends on the network design.
Looking for 5-Pin M12 connectors?
Browse our 5-Pin M12 range, or send us your requirements for a quote — including custom assemblies and samples.