Proximity Sensor Wiring Guide: PNP vs NPN, 3-Wire vs 4-Wire (With Diagrams)
In industrial automation, proximity switches are essential sensors. They detect objects without physical contact and are widely used for counting and positioning. Ordinary proximity switches do not provide personnel protection. However, for many engineers, the confusion between PNP vs NPN and 3-wire vs 4-wire configurations can lead to an unreadable PLC signal or damage to the connected equipment.
This DAIDISIKE guide explains output logic, conductor roles and the checks needed before selecting a product or connecting a known sensor. It is a circuit-concept reference, not a substitute for the delivered sensor and PLC input manuals.
I. Understanding the Basics: PNP vs NPN
Before wiring, it is crucial to understand what is a proximity switch and how its output type interacts with your controller. The core difference lies in the Output Type.
1. Sourcing vs Sinking
- NPN (Sinking Output): When the output is conducting, the output (Black wire) connects to the Negative (Blue wire), outputting a Low Level signal. Current flows from the load into the sensor.
- PNP (Sourcing Output): When the output is conducting, the output (Black wire) connects to the Positive (Brown wire), outputting a High Level signal. Current flows from the sensor into the load.
Pro Tip: Think of NPN as “Pulling Down” to 0 V and PNP as “Pushing Up” to the rated positive supply. NO/NC determines when that output conducts.
2. Why two types?
Read the input-card circuit rather than infer it from the PLC brand. A PNP sourcing output feeds a sinking input referenced to 0 V; an NPN sinking output receives current from a sourcing input referenced to the positive supply. This matches OMRON’s load-placement explanation.

II. 3-Wire Proximity Sensors: The Industry Standard
The 3-wire proximity sensors are the most common in the industry, consisting of two power lines and one signal line.
Common DC Three-Wire Colour Convention — Verify the Model
- Brown (BN): Positive (+V, usually +24V DC)
- Blue (BU): Negative (0V / GND)
- Black (BK): Signal Output

III. 4-Wire Proximity Sensors: Check the Extra Function

A documented complementary-output four-wire proximity sensor can provide a White (WH) complementary output on a specifically documented NO/NC model. The following roles are an example, not a universal four-wire pinout.
- Brown (BN): +V
- Blue (BU): 0V / GND
- Black (BK): Normally Open (NO) Output
- White (WH): Normally Closed (NC) Output
Example: documented complementary-output sensor
Brown → rated positive supply; blue → 0 V.
Black NO → compatible input A; white NC → separate compatible input B.
For PNP outputs use sinking inputs; for NPN use sourcing inputs. Insulate unused output wires individually. Do not connect white to blue or join the two outputs.
The four-wire example illustrates complementary NO/NC outputs. Other models may use the extra conductor for teach, enable or alarm. IO-Link communication uses the documented C/Q connection (commonly pin 4), not simply whichever wire is fourth; confirm the exact pinout and insulate unused conductors individually. The photoelectric sensor wiring guide shows the same sourcing/sinking circuit logic with a separate through-beam transmitter and receiver.
IV. Pre-Wiring Checklist: Avoid Frying Your Sensor
Before you power up, run through this checklist from our technical team:
- Voltage Check: Use the exact sensor’s supply rating, allowable ripple and polarity. Never connect to AC unless specified.
- Polarity: Verify Brown is + and Blue is −. Confirm the model pinout and protection before energising.
- PLC Compatibility: Ensure your PLC input matches the sensor (PNP sourcing output to sinking input; NPN sinking output to sourcing input).
- Load Current: Ensure the connected relay stays within the specified continuous and inrush output limits; a generic 200 mA value is not a design rating.
V. Common Troubleshooting
- Sensor LED is on, but no PLC signal: Check output logic, PLC common, supply and the input threshold. An LED alone does not identify the fault. Measure with the documented load connected and follow the machine’s electrical test procedure.
- Frequent false triggers: Check for metal interference or unstable power.
- Sensor burns out: Immediately check for reversed polarity or a short circuit.
VI. Match the Wiring to an Actual Sensor
Start with the electrical interface, then choose the mechanical size. The following existing DAIDISIKE families document DC three-wire NPN/PNP variants. NO and NC are separate switching choices, not alternative names for NPN and PNP. Select the full ordering code and use its drawing before making a connection.
| Starting point | What to match | Product reference |
|---|---|---|
| M8 inductive proximity switch | Available installation space, flush/non-flush mounting and the required NPN/PNP, NO/NC ordering code. | M8 catalogue PDF |
| M12 metal inductive proximity switch | Body length, target distance and three-wire output matched to the receiving input. | M12 catalogue PDF |
| M18 / M30 three-wire inductive switches | Thread size, mounting clearance and exact output suffix; this product family is three-wire DC. | M18 / M30 catalogue PDF |
Connector count is not wire function. The connectorized JM12 family uses an M12 four-pin plug while its published electrical interface is three-wire DC. Check the cordset and assigned pins; do not create a second output from an unused pin. For body-size choices, compare M8 versus M12 mounting considerations.
Replacing a two-wire sensor? Use the separate DC two-wire series reference and check leakage current, voltage drop and minimum load. A two-wire circuit is not converted into three-wire PNP/NPN by matching the wire colours.
The PDFs above are model-family references, not approval of every cable revision or a universal four-wire product. The delivered ordering code and current matching instructions govern installation.
Conclusion: Selecting the right proximity sensor wiring is crucial for system stability. For professional industrial sensors and technical support, visit www.fsddsk.com.
