What an A-coded M12 connector is
An M12 A-coded connector is the general-purpose M12 coding, with a single key and between 3 and 12 pins. It is the default layout for anything that is not Ethernet, fieldbus or high-current power: sensors, actuators, low-voltage DC supplies, serial lines and switched I/O. It is defined in IEC 61076-2-101 alongside the B, C and D codings.
The key lets an A-coded plug mate only with an A-coded socket of the same pin count, so a sensor cable cannot be screwed onto an Ethernet or power port. Because A coding covers so many jobs, the pin count matters as much as the coding: a 4-pin and an 8-pin A-coded connector look alike from a distance but will not mate.
A-coded is also the connector behind IO-Link, the point-to-point sensor protocol defined in IEC 61131-9. An IO-Link master uses 4- or 5-pin A-coded sockets, so standard sensor cables work unchanged.
A-coded pin counts and ratings
The number of pins sets what the connector can carry. Fewer pins means larger contacts and more current per pin.
| Pins | Typical rating | Common uses |
|---|---|---|
| 3 | Around 4 A, up to 250 V | Simple DC sensors, low-current supplies |
| 4 | Around 4 A, up to 250 V | Sensors and actuators, IO-Link, DC power input |
| 5 | Around 4 A, up to 60 V | IO-Link class B, DC power with functional earth, CAN |
| 8 | Around 2 A, up to 30 V | Serial ports, USB, multi-channel digital I/O |
| 12 | Around 1.5 A, up to 30 V | Dense digital I/O, combined signal cables |
The ratings are typical values from connector datasheets and vary between makers and cable cross-sections. For a DC power input, check that both the connector and the cable are rated for the start-up current of the computer, not just its running current.
The standard 4-pin pinout and wire colors
Sensor makers follow a common pin assignment and color code, based on IEC 60947-5-2, so a standard 4-pin A-coded sensor cable works with most sensors:
-
//
Pin 1, brown. Positive supply, usually 24 V DC.
-
//
Pin 2, white. Second signal or output, such as the normally closed or diagnostic output.
-
//
Pin 3, blue. 0 V supply return.
-
//
Pin 4, black. Main switching or IO-Link communication signal.
-
//
Pin 5, grey (5-pin only). Functional earth, shield or a second supply, depending on the device.
A-coded connectors on computers
Rugged and waterproof computers use A-coded M12 for DC power and for the ports that would be USB, serial or terminal blocks on a standard industrial PC. Each port gets a pin count to suit its signals, so an 8-pin A-coded socket might carry an RS-232 or RS-485 serial port, another carry a USB 2.0 port, and a 4-pin socket the DC input.
Pin assignments for serial and USB on M12 are not standardized, so two computers from different makers can wire the same 8-pin socket differently. Always build cables from the computer datasheet, and label them. Our IP67 computers and IP69K computers publish the pinout for each M12 port. DC power is also not always A-coded: some makers use K, S or L coding, as our overview of M12 codings explains.
Choosing an A-coded cable
Four details decide whether a cable fits: the pin count, the gender at each end, straight or right-angled heads, and the cable jacket. PUR jackets suit oil and abrasion on machines, PVC suits dry, fixed runs, and halogen-free jackets are often required on rail vehicles. Shielded cable is worth the extra cost for analog signals and serial lines near motors and drives. Our guide to M12 waterproof connectors covers sealing and cable choice in more depth.
Common faults with A-coded cabling
Most problems with A-coded connections come from the cable rather than the connector itself. These are the faults we see most often when commissioning rugged computers:
-
//
Wrong pin count. An 8-pin cable ordered for a 12-pin socket, or the reverse. The coding matches, so the mistake only shows when the plug will not seat.
-
//
Generic serial wiring. A cable wired to one maker’s RS-232 pinout fitted to another maker’s computer. The link appears dead, or works one way only.
-
//
Undersized power cable. Thin sensor cable used for a DC input. The voltage drop over a long run can stop the computer starting, especially at low supply voltages.
-
//
Loose coupling nut. A nut tightened only part way leaves the seal open. Hand-tighten fully, typically to around 0.4 to 0.6 Nm, and recheck after transport.
-
//
Missing caps. Unused sockets left open on a washdown line fill with water. Fit the sealing caps supplied with the computer.
Quick answers on M12 A-coded connectors
M12 A-coded: common questions
What is an A-coded M12 used for?
General signals and low power. Sensors, actuators, IO-Link devices, DC power inputs, serial lines, USB and digital I/O.
Is A-coded the same as A-code?
Yes. A-code, A-coded and A-coding all describe the same IEC 61076-2-101 layout.
Can an A-coded connector carry Ethernet?
Not reliably. Ethernet needs twisted pairs with controlled impedance. Use D-coded for 100 Mbit/s or X-coded for Gigabit and faster.
What color is pin 4 on an M12 sensor cable?
Black. On the standard 4-pin layout, pin 4 is black and carries the main switching or IO-Link signal. Brown is supply, blue is 0 V and white is the second signal.
Will a 4-pin A-coded cable fit a 5-pin socket?
Usually, yes. A 4-pin male plug normally fits a 5-pin female socket, leaving pin 5 unused. A 5-pin plug will not fit a 4-pin socket.
What is the difference between A-coded and B-coded?
Key position and use. B coding moves the key to the opposite side and is reserved for PROFIBUS, so fieldbus and sensor cables cannot be swapped.
We supply rugged and waterproof computers with their A-coded power and I/O cables made up to the published pinout as standard, so each cable arrives ready for its port.