中文官网

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

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.

When ON, PNP sources current from positive supply through the sensor to a sinking PLC input; NPN sinks current from a sourcing input through the sensor to zero volts
Concept A. Conventional current paths, not terminal connections. The PLC input circuit and common must match the exact sensor output. Select the image to read the full-size labels.

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

3-Wire NPN PNP Proximity Sensor Wiring Diagram with Brown Blue Black Wires
Figure 1: Sourcing/sinking load placement. The image’s 6–36 V label is not a rating for every sensor; use the selected model manual.

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

Common three-wire DC functions compared with model-dependent four-wire functions; a four-pin connector alone does not establish four-wire electronics
Concept B. Count documented electrical functions, not just connector pins. The fourth conductor may have a model-specific role; the complementary-output example below applies only when the exact manual specifies it. Select the image for full-size labels.

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.

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.

Figure 2: Separate NO/NC output roles for an explicitly specified model; not a terminal-level wiring approval.

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:

  1. Voltage Check: Use the exact sensor’s supply rating, allowable ripple and polarity. Never connect to AC unless specified.
  2. Polarity: Verify Brown is + and Blue is −. Confirm the model pinout and protection before energising.
  3. PLC Compatibility: Ensure your PLC input matches the sensor (PNP sourcing output to sinking input; NPN sinking output to sourcing input).
  4. 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


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.

Existing three-wire families and their published PDF references
Starting pointWhat to matchProduct reference
M8 inductive proximity switchAvailable installation space, flush/non-flush mounting and the required NPN/PNP, NO/NC ordering code.M8 catalogue PDF
M12 metal inductive proximity switchBody length, target distance and three-wire output matched to the receiving input.M12 catalogue PDF
M18 / M30 three-wire inductive switchesThread 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.

ModelsProximity Switch RangeGuideSelection & TroubleshootingSelectionM8 vs M12 SensorsCircuit LogicPhotoelectric Sensor WiringEngineeringCheck Your Ordering Code

DAIDISIKE Tech & Video Center

Advanced Sensor Solutions for Industrial Safety and Automation

DAIDISIKE Corporate Profile

Discover our commitment to precision engineering and manufacturing.

Safety Interlock DX Series

Real-world application for advanced machine safeguarding.

AGV LiDAR DLD30T-5N — 30 m at 90% remission / 10 m at 10% remission

Enhanced perimeter security and collision prevention solutions.

Vehicle DQLV Light Curtains

Optimized for toll stations and weighbridges profiling.

Measuring DQL Series 3D

Dimensional measurement and object positioning principles.

DQC Universal Grating

Installation guide for hand & finger safeguarding.

Waterproof DQR Series

Performance under high-pressure washdowns.

Color Mark Sensors

Intelligent recognition for high-speed packaging lines.

Strip DK-D461 Sensors

Advanced background suppression for irregular shapes.

Area DQSA Protection

Cost-effective side safeguarding using mirror reflection.

Frequently Asked Questions

What is the difference between PNP and NPN proximity sensors?

The difference is which line switches. A PNP (sourcing) sensor switches the positive line and delivers a positive signal to the input. An NPN (sinking) sensor switches the negative line and pulls the input to ground. The choice must match what your PLC input card expects as its common.

What is the difference between 3-wire and 4-wire sensors?

A 3-wire sensor has power, ground and one switching output. A 4-wire device has one additional conductor whose function is model-specific. It may provide a complementary output, teach or enable input; never infer its role from colour alone or short an output to a supply rail.

What are the standard wire colours on a proximity sensor?

Brown commonly identifies positive supply, blue 0 V and black a switching output on a DC three-wire sensor. On a four-wire device, white may be a second output or another model-specific function. Colours and connector pin count do not establish a pinout: confirm the complete ordering code, connector view and exact datasheet before wiring.

How do I avoid damaging a proximity sensor when wiring it?

Check the supply voltage and polarity before powering up, confirm whether the sensor is PNP or NPN, and make sure the load and the PLC input match that type. Reversed polarity, overload or an incompatible input circuit can cause damage or prevent a valid signal. A PNP sourcing output normally connects to a sinking input; NPN sinking connects to a sourcing input.

Should I choose PNP or NPN?

Match the exact PLC input circuit, not its brand or country. A PNP sourcing output normally feeds a sinking input with a 0 V common; an NPN sinking output normally feeds a sourcing input with a positive common. Also check the sensor supply, input thresholds, output current and the required NO or NC switching state.