PNP or NPN sensor: the difference and how to tell which you have
In one sentence: when it detects, a PNP sensor puts +24 V on its output, and an NPN sensor connects it to 0 V. Everything else (how they are wired, which input they need and how to measure them) follows from that.
How each one is wired
Three-wire sensors almost always follow the same colour code: brown to +24 V, blue to 0 V and black is the output.
- PNP (sourcing): the load (the PLC input, a relay) goes between the black wire and 0 V. When it detects, the sensor sources current into the load.
- NPN (sinking): the load goes between +24 V and the black wire. When it detects, the sensor sinks the current to 0 V.
In Europe almost everything is wired with PNP sensors. NPN is more common on machines from Asia.
Which one does my PLC need?
It depends on where the input common goes. If the card common goes to 0 V, the input expects +24 V and needs PNP sensors (a sinking input). If the common goes to +24 V, it needs NPN sensors (a sourcing input). Many 24 V DC input cards, such as those of the S7-1200, accept both depending on where you wire the common.
Try both types on a PLC input, change the common and cause the typical faults:
How to tell which one you have
- Read the label or the part number. Almost every manufacturer prints "PNP" or "NPN" on the sensor body or in its datasheet.
- Measure it with a multimeter. Power the sensor (brown to +24 V and blue to 0 V) and measure DC volts between black and blue. If it reads about 24 V when it detects, it is PNP. If nothing changes, measure between brown and black: if it reads about 24 V when it detects, it is NPN.
Can I use an NPN where a PNP goes?
Not directly. The options are changing the card common (if it allows it and there are no other PNP sensors in the same group), adding an interposing relay or using a PNP-NPN signal converter. The cleanest option, if possible, is to replace the sensor with one of the right type.
Other guides
Overload relay or motor protection circuit breaker: which one? · What 4–20 mA means and why it does not start at zero · What is a contactor and what is it used for?
Found it useful? Share it with your class or your team: WhatsApp · Telegram · LinkedIn · Email