Mini-lesson · 3 min read
NPN vs PNP in 3 minutes
The one electrical difference between sinking and sourcing sensor outputs, and the meter reading that settles it.
Both sensor types detect the same things; they differ only in what the black signal wire does at the moment of detection. A PNP ("sourcing") output switches +24 V onto the black wire: it sources current toward the PLC input. An NPN ("sinking") output pulls the black wire down to 0 V: it sinks current out of the input. Same job, opposite polarity at the pin.
- PNP = "Pulls uP": black wire goes to +24 V on detect. The convention on most North American and European machines.
- NPN = "Negative": black wire goes to 0 V on detect. Common on Asian-built equipment.
- Either way: brown is +24 V supply, blue is 0 V, black is the answer. Brown-to-blue only proves the sensor has power.
PNP (sourcing). When the carton enters the beam, the output closes between +24 V and the black wire: current flows out of the sensor, through the PLC input channel, and back to 0 V via COM. The black wire sits at +24 V while detecting.
switched signal current (conventional, +24 V → 0 V) sensor supply current (BN → BU)
NPN (sinking). Same detection, opposite flow: the output closes between the black wire and 0 V, so current comes from +24 V through the PLC COM terminal and input channel, out the IN terminal, and into the sensor. The black wire sits at 0 V while detecting.
switched signal current (conventional, +24 V → 0 V) sensor supply current (BN → BU)
Why the mismatch bites
A PLC input card is built for one convention. Fit an NPN sensor where a PNP belongs and every part still "works" (the sensor powers up, its LED fires on every carton), but the input channel waits for +24 V while the sensor switches toward 0 V, so the PLC never hears it. The tell: this fault appears immediately after a sensor replacement. The meter check: target present, black referenced to 0 V. A healthy PNP reads about +24 V; an NPN reads near 0 V.
The mismatch. The NPN sensor from the second drawing is wired to the input card from the first, which expects a PNP. The card ties COM to 0 V, so its channel turns on when +24 V arrives at IN. On detect the NPN output closes toward 0 V instead. Both ends of the input channel sit at 0 V, no current flows, and IN0 never lights. The sensor LED still fires on every carton.
sensor supply current (BN → BU)no switched signal current flows
Check yourself
Pick an answer to see why it’s right or wrong.