Skip to main content

Buying guide

PNP vs NPN Proximity Sensors: Wiring, Differences and How to Choose

Updated 4 min readBy the EU Enterprise technical team

Ordering a replacement sensor with the wrong output type is a very common reason a “working” sensor does nothing once it’s installed. Here’s how PNP and NPN outputs differ, how to tell which one your machine uses, and how to choose the right sensing technology.

PNP vs NPN in one sentence

A PNP (sourcing) sensor switches +24 V to its output wire when it detects a target; an NPN (sinking) sensor switches its output wire to 0 V. Both do the same job — the difference is which side of the supply they switch, and it must match the input card.

PNP vs NPN comparison
PNP (sourcing)NPN (sinking)
Output when ONConnects output to +V (e.g. +24 V DC)Connects output to 0 V
Load connected betweenOutput and 0 VOutput and +V
Matching PLC inputSinking input cardSourcing input card
Common onEuropean-style machines and panelsMany Japanese, Korean and Chinese machines

3-wire sensor colour code

  • Brown – supply positive (typically 10–30 V DC)
  • Blue – supply negative (0 V)
  • Black – switching output (normally open)
  • White – second output, often normally closed (4-wire sensors)

Matching the sensor to your PLC

A sinking PLC input expects current to flow into it, so it needs a PNP sensor. A sourcing input needs an NPN sensor. Many PLCs (including popular Siemens, Delta and Mitsubishi models) let you choose by wiring the input common to 0 V or +24 V — check the input wiring diagram before ordering. Browse controllers & PLCs.

NO vs NC outputs

Normally open (NO) outputs switch ON when a target is present — the usual choice for counting and position detection. Normally closed (NC) outputs are ON until a target appears, then switch OFF. Because a cut cable also reads as OFF, NC outputs are often chosen where a wire break should be treated as an alarm. (They are not a substitute for certified safety devices.)

Inductive, capacitive or photoelectric?

Choosing the sensing technology
TypeDetectsTypical rangeUse it for
InductiveMetal only1–40 mmGear teeth, metal flags, cylinder end positions, conveyors
CapacitiveAlmost anything (plastic, grain, liquids through tank walls)1–25 mmLevel detection in hoppers and tanks, non-metal parts
Photoelectric – diffuseObjects that reflect lightup to ~1 mBox detection on conveyors
Photoelectric – retro-reflectiveAnything breaking the beam to a reflectorup to several mDoors, conveyors, packaging lines
Photoelectric – through-beamAnything between emitter and receiverup to tens of mLong distances, dusty environments, high reliability

For inductive sensors, remember that the rated sensing distance is for mild steel; stainless steel, aluminium and brass reduce it noticeably. Flush (shielded) sensors can be mounted level with metal but have shorter range; non-flush (unshielded) sensors reach further but need clear space around the face.

Selection checklist

  1. Output type: PNP or NPN to match the input card.
  2. Output function: NO, NC or both.
  3. Technology: inductive, capacitive or photoelectric for your target material.
  4. Body size and thread: M8, M12, M18 or M30 — larger bodies sense further.
  5. Supply: 10–30 V DC is standard; 2-wire AC/DC types exist for retrofits.
  6. Connection: pre-wired cable or M12 connector (easier replacement).
  7. Protection: IP67 or better for wash-down and dusty plants.

Shop sensors from Omron, Pepperl+Fuchs and Fotek, or WhatsApp us a photo of the old sensor’s label and we’ll find the equivalent.

Frequently Asked Questions

Can I use an NPN sensor instead of a PNP sensor?

Not directly. The input card must be rewired (if it supports both) or you need an interface relay. It is usually simpler to order the matching output type.

Which is better, PNP or NPN?

Neither is better electrically. PNP is the usual choice on European-style panels; NPN is common on Japanese, Korean and many Chinese machines. Match whatever your PLC input card expects.

What do the brown, blue and black wires mean on a sensor?

Brown is +V (usually 24 V DC), blue is 0 V and black is the switching output. A white wire, if present, is a second output.

Why does my inductive sensor not detect aluminium?

Non-ferrous metals reduce the sensing distance to roughly 30–50% of the rated value. Move the sensor closer, use a larger body size, or choose a sensor rated for non-ferrous targets.

Related guides