blog

Blog Details

Created with Pixso. Home Created with Pixso. Blog Created with Pixso.

M12 Connector Pinout Guide: Pin Configurations Explained

M12 Connector Pinout Guide: Pin Configurations Explained

2026-05-06
M12 Connector Pinout Guide

Complete M12 connector pinout guide covering A-code, D-code, X-code, B-code and more. Learn 3-pin to 12-pin configurations, wiring, and how to choose the right M12 connector pinout for your application.

What Is M12 Connector Pinout?

The M12 connector pinout defines the specific arrangement and function of each pin (contact) within an M12 circular connector. These rugged industrial connectors — standardized under IEC 61076-2-101 — use a 12mm threaded coupling interface and support pin configurations ranging from 3 to 12 contacts.

Each pin assignment maps a physical contact position to a wire function: power (positive/negative), ground, signal, data, or shield. The M12 connector pin configuration varies by coding type (A-code, D-code, B-code, X-code, T-code, K-code, etc.) and by pin count. Choosing the correct pin arrangement is essential for signal integrity, electrical safety, and system compatibility.

The key elements of any M12 connector pinout are:

  • Pin count — determines how many conductors can be carried
  • Pin assignment — defines which wire color or function connects to which pin number
  • Coding type — prevents mismating between incompatible connector types
  • Current and voltage ratings — dictated by pin size and contact density

Tip: Start your selection with our M12 Connector Selection Guide for a full overview of connector types and applications.


Why M12 Connector Pinout Matters

A wrong M12 connector pin configuration can cause serious problems:

  • System failure — reversed power polarity damages sensors or PLC inputs
  • Communication errors — mismatched Ethernet pin assignments break PROFINET or EtherNet/IP links
  • Safety hazards — improper ground wiring creates shock risks in AC power applications
  • Equipment damage — exceeding current per pin ratings causes overheating and connector failure
  • Downtime — troubleshooting wiring errors in industrial environments is time-consuming and costly

Given that M12 connectors are used in automated production lines, the cost of a pinout mistake multiplies across every affected machine.

For detailed wiring instructions, see our M12 Connector Wiring Diagram article.


M12 Connector Pin Numbering System

Before diving into specific pinouts, it helps to understand the numbering convention. All M12 connectors use a front-view perspective — looking at the male plug from the mating side:

  • Pin 1 is at the top
  • Pin 2 is at the bottom-left
  • Pin 3 is at the bottom-right
  • Additional pins are numbered counterclockwise

This consistent numbering system means you can reliably identify each contact position across any M12 connector manufacturer, including KRONZ products.
M12 Connector Pinout Guide: Pin Configurations Explained


M12 Connector Pinout Guide: Pin Configurations Explained
M12 A-Code Pinout: Sensor and Actuator Applications

A-code is the most widely used M12 connector coding type. It is designed for sensor and actuator connections in industrial automation. A-code connectors support 3, 4, 5, 8, and 12 pin configurations.

3-Pin A-Code: M12 Connector Pinout
Pin Wire Color Function
1 Brown (BN) DC+ (Power +)
2 White (WH) Signal / DC-
3 Blue (BU) DC- (Power -)
  • Current Rating: 4A
  • Voltage Rating: 250V
  • Typical Applications: Inductive sensors, proximity switches, simple on/off actuators
  • Common Models (KRONZ): H1203F, H1203FA, H1203M, H1203MA

The 3-pin M12 connector pinout is the standard for two-wire DC sensors. Pin 1 carries power, pin 3 provides the ground return, and pin 2 doubles as the signal wire and DC- in a combined circuit. This is the simplest and most economical A-code configuration.

4-Pin A-Code: M12 Connector Pinout
Pin Wire Color Function
1 Brown (BN) DC+ (Power +)
2 White (WH) Signal (NO/NC)
3 Blue (BU) DC- (Power -)
4 Black (BK) Signal / auxiliary output
  • Current Rating: 4A
  • Voltage Rating: 250V
  • Typical Applications: Three-wire PNP/NPN sensors, 4-20mA analog sensors, IO-Link devices
  • Common Models (KRONZ): H1204F, H1204FA, H1204M, H1204MA

The 4-pin A-code pin configuration separates the power and signal paths, making it ideal for three-wire sensors. Pin 4 often serves as a complementary output (NO+NC) or second signal channel.

M12 Connector Pinout Guide: Pin Configurations Explained
5-Pin A-Code: M12 Connector Pinout


Pin Wire Color Function
1 Brown (BN) DC+ (Power +)
2 White (WH) Signal 1
3 Blue (BU) DC- (Power -)
4 Black (BK) Signal 2
5 Gray (GY) Auxiliary / Earth ground
  • Current Rating: 4A
  • Voltage Rating: 60V
  • Typical Applications: Dual-channel sensors, safety sensors, sensors with auxiliary contacts
  • Common Models (KRONZ): H1205F, H1205FA, H1205M, H1205MA

The 5-pin A-code M12 connector pinout adds a dedicated auxiliary contact or earth ground. The reduced voltage rating (60V vs 250V) reflects the tighter pin spacing required for five contacts in the same 12mm housing.

M12 Connector Pinout Guide: Pin Configurations Explained
8-Pin A-Code: M12 Connector Pinout


Pin Wire Color Function
1 White (WH) Signal 1
2 Brown (BN) DC+ (Power +)
3 Green (GN) Signal 2
4 Yellow (YE) Signal 3
5 Gray (GY) Signal 4
6 Pink (PK) Signal 5
7 Blue (BU) Signal 6
8 Red (RD) DC- (Power -)
  • Current Rating: 2A
  • Voltage Rating: 30V
  • Typical Applications: Multi-signal sensors, complex actuators, encoder connections
  • Common Models (KRONZ): H1208F, H1208FA, H1208M, H1208MA

The 8-pin A-code M12 connector pin configuration supports six independent signal channels plus power and ground. This is the go-to choice for multi-function sensors and devices requiring simultaneous power, multiple discrete I/O, and analog signals.

M12 Connector Pinout Guide: Pin Configurations Explained
12-Pin A-Code: M12 Connector Pinout


  • Pins: 1–12
  • Current Rating: 1.5A
  • Voltage Rating: 30V
  • Typical Applications: High-density signal bundles, industrial cameras, complex control modules
  • Common Models (KRONZ): H1212F, H1212FA, H1212M, H1212MA

The 12-pin A-code M12 connector pinout is the highest-density sensor connector in the A-code family. With 12 independent contacts, it can carry multiple analog signals, digital I/O, and power in a single connector — eliminating cable clutter in dense machine layouts.

Summary: A-code M12 connectors cover the full range from 3 to 12 pins. As pin count increases, current and voltage ratings decrease due to smaller contact size and tighter spacing. Always check the connector's datasheet for the exact M12 pin configuration of your model.

M12 Connector Pinout Guide: Pin Configurations Explained
M12 D-Code Pinout: Industrial Ethernet (PROFINET / EtherNet/IP)


D-code connectors are built for industrial Ethernet networks, specifically PROFINET and EtherNet/IP.


Pin Function
1 TX+ (Transmit +)
2 RX+ (Receive +)
3 TX- (Transmit -)
4 RX- (Receive -)
  • Current Rating: 4A
  • Voltage Rating: 250V
  • Typical Applications: PROFINET networks, EtherNet/IP fieldbus, industrial automation Ethernet
  • Common Models (KRONZ): H1204DFV-0 (female), H1204DMV-0 (male)

D-code uses the same 4-pin physical layout as A-code but with a different keying notch that prevents mismating. The M12 connector pinout for D-code follows the standard Ethernet MDI crossover pattern, making it directly compatible with PROFINET RJ45 ports using standard patch cables.
M12 Connector Pinout Guide: Pin Configurations Explained

M12 X-Code Pinout: Gigabit Ethernet


X-code connectors are the premium choice for gigabit and 10 Gigabit Ethernet in industrial environments. They are fully shielded and use 8 pins to support dual-pair transmission.


Pin Pair Function
1+2 TX1+ / TX1-
3+6 RX1+ / RX1-
4+5 TX2+ / TX2-
7+8 RX2+ / RX2-
  • Shielding: Full metal shell, cable-level shielding
  • Typical Applications: Industrial cameras, machine vision, high-speed data acquisition, 10GBASE-T networks

X-code is mechanically keyed to prevent accidental insertion into A-code or D-code ports. The M12 connector pin configuration for X-code supports simultaneous bidirectional full-duplex transmission at gigabit speeds, critical for bandwidth-intensive applications like machine vision.

M12 B-Code Pinout: Profibus-DP

B-code is designed for the Profibus-DP fieldbus protocol, commonly used in factory automation across Europe and Asia.


Pin Function
1 NC (Not Connected)
2 Green (Bus A / GN)
3 NC (Not Connected)
4 Red (Bus B / RD)
5 Shield / Earth Ground
  • Current Rating: 4A
  • Voltage Rating: 250V
  • Cable: 2×0.34 mm² (2×22 AWG), purple PVC or PUR jacket
  • Typical Applications: Profibus-DP networks, legacy factory automation systems
  • Common Models (KRONZ): M1205BF-2/DP00, M1205BM-2/DP00

The B-code M12 connector pinout reserves two pins for the differential data bus (A and B) and uses the shield as pin 5. Pins 1 and 3 are left unconnected. The distinctive purple cable jacket follows Profibus color conventions.

M12 Power Coding: T-Code, S-Code, K-Code, L-Code

Power-coded M12 connectors are designed for DC and AC power distribution in industrial equipment. They handle significantly higher currents than signal connectors.

T-Code: DC Power (4-Pin)
Pin Wire Color Function
1 Black (BK1) DC+
2 Black (BK2) DC+ (parallel)
3 Black (BK3) DC-
4 Yellow-Green (GN/YE) Ground / Earth
  • Current Rating: 12A
  • Voltage Rating: 63VDC
  • Typical Applications: DC motor drives, 24V power distribution, industrial power supplies
S-Code: AC Power (4-Pin)
Pin Wire Color Function
1 Black 1 (BK1) L (Line)
2 Black 2 (BK2) N (Neutral)
3 Black 3 (BK3) L (Line, switched)
4 Yellow-Green (GN/YE) PE (Protective Earth)
  • Current Rating: 12A
  • Voltage Rating: 630VAC
  • Typical Applications: AC motor connections, 230V/400V power distribution panels
K-Code: AC Power with Ground (5-Pin)
Pin Wire Color Function
1 Brown (BN) L1 (Line 1)
2 White (WH) L2 (Line 2)
3 Blue (BU) N (Neutral)
4 Black (BK) L3 (Line 3)
5 Yellow-Green (GN/YE) PE (Protective Earth)
  • Current Rating: 12A
  • Voltage Rating: 630VAC
  • Typical Applications: Three-phase AC power, industrial motor control panels
L-Code: DC Power (5-Pin)
Pin Wire Color Function
1 Brown (BN) DC+
2 White (WH) DC+ (sense/aux)
3 Blue (BU) DC-
4 Black (BK) DC- (return)
5 Gray (GY) Signal / Shield
  • Current Rating: 12A
  • Voltage Rating: 63VDC
  • Typical Applications: Battery-powered equipment, isolated DC power rails, EV charging infrastructure

Summary: Power-coded M12 connectors (T/S/K/L) share the same 12mm form factor but provide 12A at voltages up to 630VAC or 63VDC — ideal for replacing larger industrial power connectors in space-constrained applications.

M12 Pinout Comparison Table
Coding Pins Application Current Voltage Shielded
A-Code 3 Sensors / actuators 4A 250V Optional
A-Code 4 Sensors / IO 4A 250V Optional
A-Code 5 Dual-channel sensors 4A 60V Optional
A-Code 8 Multi-signal 2A 30V Optional
A-Code 12 High-density signals 1.5A 30V Optional
D-Code 4 PROFINET / EtherNet/IP 4A 250V Yes
X-Code 8 Gigabit / 10GB Ethernet Yes
B-Code 5 Profibus-DP 4A 250V Yes
T-Code 4 DC Power 12A 63VDC Optional
S-Code 4 AC Power 12A 630VAC Optional
K-Code 5 3-Phase AC Power 12A 630VAC Optional
L-Code 5 DC Power + Signal 12A 63VDC Optional
How to Choose the Right M12 Pinout: Step-by-Step
Step 1: Identify Your Application Type
Application Recommended Coding
Simple sensor (on/off) A-Code, 3-pin
Analog sensor (4-20mA) A-Code, 4-pin
Dual-channel / safety sensor A-Code, 5-pin
Multi-signal encoder A-Code, 8-pin
High-density module A-Code, 12-pin
PROFINET / EtherNet/IP D-Code, 4-pin
Gigabit Ethernet X-Code, 8-pin
Profibus-DP B-Code, 5-pin
DC power distribution T-Code or L-Code
AC / 3-phase power S-Code or K-Code

Need help deciding? Read our detailed guide on M12 A Code vs D Code vs X Code to understand the key differences.

Step 2: Check Your Pinout Requirements

Once you have selected a coding type, confirm:

  • Pin count matches the number of signals or conductors you need
  • Wire color assignment matches your existing cable harness or device pinout
  • Current per pin does not exceed the connector's rated capacity
  • Voltage is within the connector's rating (watch the 60V drop for 5-pin A-code)
Step 3: Select the Right M12 Connector Series
Product Type Best For Key Models (KRONZ)
Field-wirable On-site installation, custom lengths H1204F, H1204DFV-0
Overmolded / molded Pre-assembled, plug-and-play M1204BF-2, M1205KF-2
Flange mount Panel-installed, PCB connection F1204F, F1208M
Common M12 Pinout Mistakes to Avoid
  1. Mixing up polarity on 3-pin sensors — Connecting DC+ to pin 3 instead of pin 1 will damage the sensor immediately. Always verify the datasheet before wiring.

  2. Using A-code for Ethernet — A-code and D-code look similar but have different internal pin assignments. A D-code connector in an A-code port will not transmit Ethernet signals correctly.

  3. Ignoring voltage derating at higher pin counts — A 5-pin A-code connector is rated for only 60V, not 250V. Using it at full 250V creates a safety hazard.

  4. Exceeding current per pin — An 8-pin A-code connector is rated for only 2A per pin. Connecting a motor drawing 4A will cause overheating and connector failure.

  5. Confusing B-code and K-code — Both are 5-pin, but B-code is for Profibus data (4A/250V) while K-code is for 3-phase AC power (12A/630VAC). The physical keying differs — do not force a mismatched connection.

  6. Skipping the shield connection on X-code — The shield on X-code connectors is critical for EMC performance. Leaving it unconnected defeats the purpose of the shielded design.

Warning: Always de-energize equipment before making or breaking M12 connections. Verify all pin assignments with a multimeter before applying power to a newly wired connector.

Conclusion

The M12 connector pinout system is a carefully designed standard that balances pin density, electrical performance, and mechanical keying across a wide range of industrial applications.

Three key takeaways:

  1. Match the coding type to your protocol — A-code for sensors, D-code for PROFINET, X-code for gigabit Ethernet, and power codes (T/S/K/L) for DC and AC power distribution. The coding prevents costly mismating errors.

  2. Understand the relationship between pin count and ratings — Higher pin counts enable more signals but reduce current and voltage capacity. Plan your power budget accordingly.

  3. Always verify pin assignments before wiring — Even within the same coding type, application-specific variations exist. Consult the datasheet and our M12 Connector Wiring Diagram for every new installation.

KRONZ (KRONZ (Guangzhou) Electronics Co., Ltd.) offers a complete range of M12 connectors in all coding types and pin configurations, including field-wirable, overmolded, and flange-mount styles. Every connector meets IEC 61076-2-101 standards and carries IP67 protection for reliable performance in harsh industrial environments.

Related Articles
Need Help?

KRONZ provides professional M12 connector solutions tailored to your specific application requirements:

  • ✅ Custom pinout configurations and wire harness assembly
  • ✅ Full product range: A-code (3-12 pin), D-code, X-code, B-code, T-code, S-code, K-code, L-code
  • ✅ Multiple connection types: field-wirable (screw/crimp/solder/punch-down), overmolded, flange mount
  • ✅ IP67-rated connectors with optional shielding, stainless steel hardware, and quick-lock (Q-type) variants
  • ✅ Sample quantities and technical consultation available

Contact KRONZ

If you still have questions about M12 connectors, please call 86-020-32981980 or contact us here. Discuss your M12 connector pin arrangement requirements with our engineering team.KRONZ offers a wide range of factory automation connections, including a comprehensive selection of UL-certified connections in our factory automation product catalog – there's something for everyone. If you don't find what you need, KRONZ also excels at custom cable orders, tailoring solutions to your unique application requirements!

For more information about M12 connections, please visit the KRONZ website:Click here to visit the KRONZ official website.


banner
Blog Details
Created with Pixso. Home Created with Pixso. Blog Created with Pixso.

M12 Connector Pinout Guide: Pin Configurations Explained

M12 Connector Pinout Guide: Pin Configurations Explained

2026-05-06
M12 Connector Pinout Guide

Complete M12 connector pinout guide covering A-code, D-code, X-code, B-code and more. Learn 3-pin to 12-pin configurations, wiring, and how to choose the right M12 connector pinout for your application.

What Is M12 Connector Pinout?

The M12 connector pinout defines the specific arrangement and function of each pin (contact) within an M12 circular connector. These rugged industrial connectors — standardized under IEC 61076-2-101 — use a 12mm threaded coupling interface and support pin configurations ranging from 3 to 12 contacts.

Each pin assignment maps a physical contact position to a wire function: power (positive/negative), ground, signal, data, or shield. The M12 connector pin configuration varies by coding type (A-code, D-code, B-code, X-code, T-code, K-code, etc.) and by pin count. Choosing the correct pin arrangement is essential for signal integrity, electrical safety, and system compatibility.

The key elements of any M12 connector pinout are:

  • Pin count — determines how many conductors can be carried
  • Pin assignment — defines which wire color or function connects to which pin number
  • Coding type — prevents mismating between incompatible connector types
  • Current and voltage ratings — dictated by pin size and contact density

Tip: Start your selection with our M12 Connector Selection Guide for a full overview of connector types and applications.


Why M12 Connector Pinout Matters

A wrong M12 connector pin configuration can cause serious problems:

  • System failure — reversed power polarity damages sensors or PLC inputs
  • Communication errors — mismatched Ethernet pin assignments break PROFINET or EtherNet/IP links
  • Safety hazards — improper ground wiring creates shock risks in AC power applications
  • Equipment damage — exceeding current per pin ratings causes overheating and connector failure
  • Downtime — troubleshooting wiring errors in industrial environments is time-consuming and costly

Given that M12 connectors are used in automated production lines, the cost of a pinout mistake multiplies across every affected machine.

For detailed wiring instructions, see our M12 Connector Wiring Diagram article.


M12 Connector Pin Numbering System

Before diving into specific pinouts, it helps to understand the numbering convention. All M12 connectors use a front-view perspective — looking at the male plug from the mating side:

  • Pin 1 is at the top
  • Pin 2 is at the bottom-left
  • Pin 3 is at the bottom-right
  • Additional pins are numbered counterclockwise

This consistent numbering system means you can reliably identify each contact position across any M12 connector manufacturer, including KRONZ products.
M12 Connector Pinout Guide: Pin Configurations Explained


M12 Connector Pinout Guide: Pin Configurations Explained
M12 A-Code Pinout: Sensor and Actuator Applications

A-code is the most widely used M12 connector coding type. It is designed for sensor and actuator connections in industrial automation. A-code connectors support 3, 4, 5, 8, and 12 pin configurations.

3-Pin A-Code: M12 Connector Pinout
Pin Wire Color Function
1 Brown (BN) DC+ (Power +)
2 White (WH) Signal / DC-
3 Blue (BU) DC- (Power -)
  • Current Rating: 4A
  • Voltage Rating: 250V
  • Typical Applications: Inductive sensors, proximity switches, simple on/off actuators
  • Common Models (KRONZ): H1203F, H1203FA, H1203M, H1203MA

The 3-pin M12 connector pinout is the standard for two-wire DC sensors. Pin 1 carries power, pin 3 provides the ground return, and pin 2 doubles as the signal wire and DC- in a combined circuit. This is the simplest and most economical A-code configuration.

4-Pin A-Code: M12 Connector Pinout
Pin Wire Color Function
1 Brown (BN) DC+ (Power +)
2 White (WH) Signal (NO/NC)
3 Blue (BU) DC- (Power -)
4 Black (BK) Signal / auxiliary output
  • Current Rating: 4A
  • Voltage Rating: 250V
  • Typical Applications: Three-wire PNP/NPN sensors, 4-20mA analog sensors, IO-Link devices
  • Common Models (KRONZ): H1204F, H1204FA, H1204M, H1204MA

The 4-pin A-code pin configuration separates the power and signal paths, making it ideal for three-wire sensors. Pin 4 often serves as a complementary output (NO+NC) or second signal channel.

M12 Connector Pinout Guide: Pin Configurations Explained
5-Pin A-Code: M12 Connector Pinout


Pin Wire Color Function
1 Brown (BN) DC+ (Power +)
2 White (WH) Signal 1
3 Blue (BU) DC- (Power -)
4 Black (BK) Signal 2
5 Gray (GY) Auxiliary / Earth ground
  • Current Rating: 4A
  • Voltage Rating: 60V
  • Typical Applications: Dual-channel sensors, safety sensors, sensors with auxiliary contacts
  • Common Models (KRONZ): H1205F, H1205FA, H1205M, H1205MA

The 5-pin A-code M12 connector pinout adds a dedicated auxiliary contact or earth ground. The reduced voltage rating (60V vs 250V) reflects the tighter pin spacing required for five contacts in the same 12mm housing.

M12 Connector Pinout Guide: Pin Configurations Explained
8-Pin A-Code: M12 Connector Pinout


Pin Wire Color Function
1 White (WH) Signal 1
2 Brown (BN) DC+ (Power +)
3 Green (GN) Signal 2
4 Yellow (YE) Signal 3
5 Gray (GY) Signal 4
6 Pink (PK) Signal 5
7 Blue (BU) Signal 6
8 Red (RD) DC- (Power -)
  • Current Rating: 2A
  • Voltage Rating: 30V
  • Typical Applications: Multi-signal sensors, complex actuators, encoder connections
  • Common Models (KRONZ): H1208F, H1208FA, H1208M, H1208MA

The 8-pin A-code M12 connector pin configuration supports six independent signal channels plus power and ground. This is the go-to choice for multi-function sensors and devices requiring simultaneous power, multiple discrete I/O, and analog signals.

M12 Connector Pinout Guide: Pin Configurations Explained
12-Pin A-Code: M12 Connector Pinout


  • Pins: 1–12
  • Current Rating: 1.5A
  • Voltage Rating: 30V
  • Typical Applications: High-density signal bundles, industrial cameras, complex control modules
  • Common Models (KRONZ): H1212F, H1212FA, H1212M, H1212MA

The 12-pin A-code M12 connector pinout is the highest-density sensor connector in the A-code family. With 12 independent contacts, it can carry multiple analog signals, digital I/O, and power in a single connector — eliminating cable clutter in dense machine layouts.

Summary: A-code M12 connectors cover the full range from 3 to 12 pins. As pin count increases, current and voltage ratings decrease due to smaller contact size and tighter spacing. Always check the connector's datasheet for the exact M12 pin configuration of your model.

M12 Connector Pinout Guide: Pin Configurations Explained
M12 D-Code Pinout: Industrial Ethernet (PROFINET / EtherNet/IP)


D-code connectors are built for industrial Ethernet networks, specifically PROFINET and EtherNet/IP.


Pin Function
1 TX+ (Transmit +)
2 RX+ (Receive +)
3 TX- (Transmit -)
4 RX- (Receive -)
  • Current Rating: 4A
  • Voltage Rating: 250V
  • Typical Applications: PROFINET networks, EtherNet/IP fieldbus, industrial automation Ethernet
  • Common Models (KRONZ): H1204DFV-0 (female), H1204DMV-0 (male)

D-code uses the same 4-pin physical layout as A-code but with a different keying notch that prevents mismating. The M12 connector pinout for D-code follows the standard Ethernet MDI crossover pattern, making it directly compatible with PROFINET RJ45 ports using standard patch cables.
M12 Connector Pinout Guide: Pin Configurations Explained

M12 X-Code Pinout: Gigabit Ethernet


X-code connectors are the premium choice for gigabit and 10 Gigabit Ethernet in industrial environments. They are fully shielded and use 8 pins to support dual-pair transmission.


Pin Pair Function
1+2 TX1+ / TX1-
3+6 RX1+ / RX1-
4+5 TX2+ / TX2-
7+8 RX2+ / RX2-
  • Shielding: Full metal shell, cable-level shielding
  • Typical Applications: Industrial cameras, machine vision, high-speed data acquisition, 10GBASE-T networks

X-code is mechanically keyed to prevent accidental insertion into A-code or D-code ports. The M12 connector pin configuration for X-code supports simultaneous bidirectional full-duplex transmission at gigabit speeds, critical for bandwidth-intensive applications like machine vision.

M12 B-Code Pinout: Profibus-DP

B-code is designed for the Profibus-DP fieldbus protocol, commonly used in factory automation across Europe and Asia.


Pin Function
1 NC (Not Connected)
2 Green (Bus A / GN)
3 NC (Not Connected)
4 Red (Bus B / RD)
5 Shield / Earth Ground
  • Current Rating: 4A
  • Voltage Rating: 250V
  • Cable: 2×0.34 mm² (2×22 AWG), purple PVC or PUR jacket
  • Typical Applications: Profibus-DP networks, legacy factory automation systems
  • Common Models (KRONZ): M1205BF-2/DP00, M1205BM-2/DP00

The B-code M12 connector pinout reserves two pins for the differential data bus (A and B) and uses the shield as pin 5. Pins 1 and 3 are left unconnected. The distinctive purple cable jacket follows Profibus color conventions.

M12 Power Coding: T-Code, S-Code, K-Code, L-Code

Power-coded M12 connectors are designed for DC and AC power distribution in industrial equipment. They handle significantly higher currents than signal connectors.

T-Code: DC Power (4-Pin)
Pin Wire Color Function
1 Black (BK1) DC+
2 Black (BK2) DC+ (parallel)
3 Black (BK3) DC-
4 Yellow-Green (GN/YE) Ground / Earth
  • Current Rating: 12A
  • Voltage Rating: 63VDC
  • Typical Applications: DC motor drives, 24V power distribution, industrial power supplies
S-Code: AC Power (4-Pin)
Pin Wire Color Function
1 Black 1 (BK1) L (Line)
2 Black 2 (BK2) N (Neutral)
3 Black 3 (BK3) L (Line, switched)
4 Yellow-Green (GN/YE) PE (Protective Earth)
  • Current Rating: 12A
  • Voltage Rating: 630VAC
  • Typical Applications: AC motor connections, 230V/400V power distribution panels
K-Code: AC Power with Ground (5-Pin)
Pin Wire Color Function
1 Brown (BN) L1 (Line 1)
2 White (WH) L2 (Line 2)
3 Blue (BU) N (Neutral)
4 Black (BK) L3 (Line 3)
5 Yellow-Green (GN/YE) PE (Protective Earth)
  • Current Rating: 12A
  • Voltage Rating: 630VAC
  • Typical Applications: Three-phase AC power, industrial motor control panels
L-Code: DC Power (5-Pin)
Pin Wire Color Function
1 Brown (BN) DC+
2 White (WH) DC+ (sense/aux)
3 Blue (BU) DC-
4 Black (BK) DC- (return)
5 Gray (GY) Signal / Shield
  • Current Rating: 12A
  • Voltage Rating: 63VDC
  • Typical Applications: Battery-powered equipment, isolated DC power rails, EV charging infrastructure

Summary: Power-coded M12 connectors (T/S/K/L) share the same 12mm form factor but provide 12A at voltages up to 630VAC or 63VDC — ideal for replacing larger industrial power connectors in space-constrained applications.

M12 Pinout Comparison Table
Coding Pins Application Current Voltage Shielded
A-Code 3 Sensors / actuators 4A 250V Optional
A-Code 4 Sensors / IO 4A 250V Optional
A-Code 5 Dual-channel sensors 4A 60V Optional
A-Code 8 Multi-signal 2A 30V Optional
A-Code 12 High-density signals 1.5A 30V Optional
D-Code 4 PROFINET / EtherNet/IP 4A 250V Yes
X-Code 8 Gigabit / 10GB Ethernet Yes
B-Code 5 Profibus-DP 4A 250V Yes
T-Code 4 DC Power 12A 63VDC Optional
S-Code 4 AC Power 12A 630VAC Optional
K-Code 5 3-Phase AC Power 12A 630VAC Optional
L-Code 5 DC Power + Signal 12A 63VDC Optional
How to Choose the Right M12 Pinout: Step-by-Step
Step 1: Identify Your Application Type
Application Recommended Coding
Simple sensor (on/off) A-Code, 3-pin
Analog sensor (4-20mA) A-Code, 4-pin
Dual-channel / safety sensor A-Code, 5-pin
Multi-signal encoder A-Code, 8-pin
High-density module A-Code, 12-pin
PROFINET / EtherNet/IP D-Code, 4-pin
Gigabit Ethernet X-Code, 8-pin
Profibus-DP B-Code, 5-pin
DC power distribution T-Code or L-Code
AC / 3-phase power S-Code or K-Code

Need help deciding? Read our detailed guide on M12 A Code vs D Code vs X Code to understand the key differences.

Step 2: Check Your Pinout Requirements

Once you have selected a coding type, confirm:

  • Pin count matches the number of signals or conductors you need
  • Wire color assignment matches your existing cable harness or device pinout
  • Current per pin does not exceed the connector's rated capacity
  • Voltage is within the connector's rating (watch the 60V drop for 5-pin A-code)
Step 3: Select the Right M12 Connector Series
Product Type Best For Key Models (KRONZ)
Field-wirable On-site installation, custom lengths H1204F, H1204DFV-0
Overmolded / molded Pre-assembled, plug-and-play M1204BF-2, M1205KF-2
Flange mount Panel-installed, PCB connection F1204F, F1208M
Common M12 Pinout Mistakes to Avoid
  1. Mixing up polarity on 3-pin sensors — Connecting DC+ to pin 3 instead of pin 1 will damage the sensor immediately. Always verify the datasheet before wiring.

  2. Using A-code for Ethernet — A-code and D-code look similar but have different internal pin assignments. A D-code connector in an A-code port will not transmit Ethernet signals correctly.

  3. Ignoring voltage derating at higher pin counts — A 5-pin A-code connector is rated for only 60V, not 250V. Using it at full 250V creates a safety hazard.

  4. Exceeding current per pin — An 8-pin A-code connector is rated for only 2A per pin. Connecting a motor drawing 4A will cause overheating and connector failure.

  5. Confusing B-code and K-code — Both are 5-pin, but B-code is for Profibus data (4A/250V) while K-code is for 3-phase AC power (12A/630VAC). The physical keying differs — do not force a mismatched connection.

  6. Skipping the shield connection on X-code — The shield on X-code connectors is critical for EMC performance. Leaving it unconnected defeats the purpose of the shielded design.

Warning: Always de-energize equipment before making or breaking M12 connections. Verify all pin assignments with a multimeter before applying power to a newly wired connector.

Conclusion

The M12 connector pinout system is a carefully designed standard that balances pin density, electrical performance, and mechanical keying across a wide range of industrial applications.

Three key takeaways:

  1. Match the coding type to your protocol — A-code for sensors, D-code for PROFINET, X-code for gigabit Ethernet, and power codes (T/S/K/L) for DC and AC power distribution. The coding prevents costly mismating errors.

  2. Understand the relationship between pin count and ratings — Higher pin counts enable more signals but reduce current and voltage capacity. Plan your power budget accordingly.

  3. Always verify pin assignments before wiring — Even within the same coding type, application-specific variations exist. Consult the datasheet and our M12 Connector Wiring Diagram for every new installation.

KRONZ (KRONZ (Guangzhou) Electronics Co., Ltd.) offers a complete range of M12 connectors in all coding types and pin configurations, including field-wirable, overmolded, and flange-mount styles. Every connector meets IEC 61076-2-101 standards and carries IP67 protection for reliable performance in harsh industrial environments.

Related Articles
Need Help?

KRONZ provides professional M12 connector solutions tailored to your specific application requirements:

  • ✅ Custom pinout configurations and wire harness assembly
  • ✅ Full product range: A-code (3-12 pin), D-code, X-code, B-code, T-code, S-code, K-code, L-code
  • ✅ Multiple connection types: field-wirable (screw/crimp/solder/punch-down), overmolded, flange mount
  • ✅ IP67-rated connectors with optional shielding, stainless steel hardware, and quick-lock (Q-type) variants
  • ✅ Sample quantities and technical consultation available

Contact KRONZ

If you still have questions about M12 connectors, please call 86-020-32981980 or contact us here. Discuss your M12 connector pin arrangement requirements with our engineering team.KRONZ offers a wide range of factory automation connections, including a comprehensive selection of UL-certified connections in our factory automation product catalog – there's something for everyone. If you don't find what you need, KRONZ also excels at custom cable orders, tailoring solutions to your unique application requirements!

For more information about M12 connections, please visit the KRONZ website:Click here to visit the KRONZ official website.