Inductive, Capacitive & Photoelectric Sensors: NPN vs PNP 3-Wire PLC Wiring
IEC 60947-5-2 inductive, capacitive, and photoelectric sensor selection, non-ferrous metal reduction factors, BN/BU/BK/WH wire colors, and NPN vs PNP 24V DC PLC input wiring.
Inductive, capacitive, and photoelectric proximity sensor selection and NPN/PNP wiring form the backbone of contactless `24 V DC` industrial detection under IEC 60947-5-2. Choosing the right sensing principle depends on target material and operating range (`Sn`), while selecting PNP (sourcing) versus NPN (sinking) must match the PLC digital input card's common (`COM`) polarity.
> Related Category: Compare M8–M30 barrel sizes, sensing ranges, and output configurations in Inductive Sensors, Capacitive Sensors, and Photoelectric Sensors.
1. Inductive vs capacitive vs photoelectric sensor selection matrix
| Sensor family | Detectable target materials | Typical range (`Sn`) | Environment & key engineering rule |
|---|---|---|---|
| Inductive sensor | Metals only (steel, stainless, aluminum, brass, copper) | 1 – 30 mm (M8, M12, M18, M30) | Immune to oil, dust, and water spray. Rated `Sn` assumes mild steel (`Fe360 = 1.0`); multiply by 0.7 for stainless, 0.4 for aluminum/brass, and 0.3 for copper |
| Capacitive sensor | Metals + plastic, glass, wood, grain, powder & liquids | 2 – 25 mm (trimmer adjustable) | Senses dielectric constant (`εr`), enabling non-contact liquid/pellet level detection through plastic or glass sight walls |
| Photoelectric sensor | Any opaque or translucent target | 0.1 m – 30+ m | Diffuse (direct target reflection), retro-reflective (use polarized filters on shiny shrink-wrap), and through-beam (highest excess gain in dusty long-span conveyors) |
Flush (shielded) vs non-flush (unshielded): Flush inductive barrels can be mounted flush inside steel brackets; non-flush barrels achieve longer `Sn` distances but require a metal-free radial clearance zone around the sensing tip.
2. Standard 3-wire and 4-wire DC color code (IEC 60947-5-2)
- Brown (`BN` — M12 Pin 1): `+24 V DC` supply (`10–30 V DC`)
- Blue (`BU` — M12 Pin 3): `0 V DC` reference (`GND` / `M`)
- Black (`BK` — M12 Pin 4): Normally Open (`NO`) switched signal output
- White (`WH` — M12 Pin 2, on 4-wire sensors): Normally Closed (`NC`) complementary output
3. Wiring PNP (Sourcing) vs NPN (Sinking) outputs to a PLC
Both PNP and NPN sensors connect Brown to `+24 V DC` and Blue to `0 V DC`; only the Black output transistor topology changes:
- PNP Sensor (`+24 V` Sourcing — European machinery standard): When triggered, the Black wire actively outputs `+24 V DC`. Wire it to a sinking PLC system digital input card whose common terminal (`COM` / `1M`) is tied to `0 V DC`. PNP prevents false-ON actuation if a damaged signal wire shorts to grounded machine steel.
- NPN Sensor (`0 V` Sinking — Asian sensor/encoder standard): When triggered, the Black wire pulls the load down to `0 V DC`. Wire it to a sourcing PLC digital input card whose common terminal (`COM` / `S/S`) is tied to `+24 V DC`, or interface via an optocoupler/slim relay module when connecting to a sinking-only PLC.
For shielded sensor and analog trunk cabling in VFD cabinets, see What Is the Difference Between LIYY and LIYCY Cables.
Frequently asked questions
Why does an 8 mm inductive sensor detect aluminum at only 3 mm?
Standard eddy-current inductive sensors specify nominal sensing range (`Sn`) on `1 mm` mild steel (`Fe360`). Non-ferrous aluminum has a reduction factor around `0.35–0.45`, reducing effective range to roughly `3 mm` unless a multi-coil "Factor 1" sensor is selected.
How do I wire a 24 V DC interface relay directly to a PNP vs NPN sensor?
For a PNP sensor, wire relay coil `A1` to the Black output wire and `A2` to `0 V DC` (Blue). For an NPN sensor, wire coil `A1` permanently to `+24 V DC` (Brown) and `A2` to the Black output wire. Always use a flyback-diode relay socket and keep coil draw below `100–200 mA`.
Why do glossy packages false-trigger standard retro-reflective photoeyes?
Shiny foil or stretch-wrap reflects visible red light directly back into the receiver like a mirror. Use a polarized retro-reflective photoelectric sensor paired with a corner-cube reflector that rotates light polarization by 90°.
Why are 3-wire DC sensors preferred over 2-wire DC sensors on PLC inputs?
Two-wire sensors draw `0.8–1.5 mA` off-state leakage current through the load to stay powered, which can falsely hold high-impedance PLC inputs ON, whereas 3-wire sensors isolate supply draw on the dedicated Blue `0 V` wire.