PNP or NPN is the question we are asked most often, and getting it wrong means a sensor that does nothing when you wire it up. The distinction is simple once you see it: PNP switches the positive side of the load, NPN switches the negative side.
The difference in one line
- PNP (sourcing) — when the sensor triggers, it connects the load to the positive supply. Current flows out of the sensor's output wire into the load.
- NPN (sinking) — when the sensor triggers, it connects the load to the negative supply (0 V). Current flows from the load into the sensor's output wire.
Both sensors use the same three wires — brown to positive, blue to negative, black as the output. What differs is which rail the black wire connects the load to when the sensor operates.
Matching the sensor to your PLC
This is where the confusion usually starts, because the naming appears backwards. A sinking input card needs a sourcing (PNP) sensor, and a sourcing input card needs a sinking (NPN) sensor. The sensor and the input must be opposites — one supplies the current, the other accepts it.
| Your PLC input card | Sensor you need | Common on |
|---|---|---|
| Sinking input (negative common) | PNP sensor | Most modern installations in India and Europe |
| Sourcing input (positive common) | NPN sensor | Older Japanese-origin machinery |
If you are specifying from scratch and have a free choice, order PNP. It is the dominant standard across Siemens, Allen-Bradley, Delta, Schneider and most Mitsubishi installations sold in India today, and it is what you will find most easily when you need an urgent replacement.
How to identify what you have
- Check the input card terminals. If the input card has a common terminal wired to 0 V, it is a sinking card and needs PNP sensors. If the common goes to +24 V, it is sourcing and needs NPN.
- Look at an existing working sensor. Whatever is already installed and working is what you should order as a replacement.
- Check the datasheet for the input module — it will state sink or source, and many modern cards are configurable for either.
What happens if you order the wrong one
Usually nothing at all — the input simply never turns on, because current has no path. That is the benign outcome. The more troublesome case is an input that appears to work but sits at an indeterminate level, giving intermittent readings that look like a faulty sensor or a wiring fault and take hours to diagnose.
Neither is dangerous, but both cost time. It is worth confirming before you order.
NO and NC: a separate question
PNP and NPN describe the electrical output type. Normally open and normally closed describe the switching logic, and the two choices are independent — you can have PNP-NO, PNP-NC, NPN-NO or NPN-NC.
- Normally open (NO) — output is off with no target present, and turns on when the target arrives. The intuitive default for detection.
- Normally closed (NC) — output is on with no target present, and turns off when the target arrives.
For fault detection and interlock circuits, prefer NC. If the cable is cut or the sensor loses power, an NC output goes to the same state as "target detected" — so the machine fails to the safe condition rather than continuing as if all is well. This principle is why NC is standard in safety circuits.
A note on 2-wire sensors
2-wire DC sensors sidestep the PNP/NPN question because the load wires in series and current flows the same way regardless. The trade-off is a voltage drop of around 6 V across the sensor and a small residual leakage current when off — both of which need checking against your PLC input specification. Our 2-wire DC page covers this in detail.
Still not sure?
Send us your PLC model number and, if you have it, a photograph of the input card wiring. We will confirm which sensor you need before you order — it takes a few minutes and avoids a return.
Related reading
Need help specifying a sensor?
Send us your application — target material, sensing distance, supply voltage and housing constraint. We will recommend a part, quote it, and ship from Mumbai.