Troubleshooting a PNP sensor
A 3-wire proximity sensor, a target, and a PLC input that will not turn on. Six faults, a voltmeter, and the one distinction that trips everyone up: which wire the output switches, and which rail the load returns to. Toggle the target and follow the volts.
Before you start — job brief
A 3-wire sensor runs on 24 V DC and is safe to probe live — that is how you troubleshoot one. The catch is not voltage, it is wiring logic: a PNP sensor and an NPN sensor look identical and behave oppositely, and the load has to return to the right rail. Get that backwards and a perfectly good sensor never turns the input on.
- Know the sensor type — PNP sources +V, NPN sinks to 0 V — before you wire or replace it
- A PNP load returns to 0 V; an NPN load returns to +V
- The brown wire is +V, the blue is 0 V, the black is the switched output
- Nearby power wiring is still live — keep your leads clear of it
Sensor · click two points to read the voltage between them
Toggle the target and follow the volts.
Target
Readings taken
- No readings yet.
Your diagnosis
Three wires, and the one idea that unlocks them
A modern 3-wire DC sensor uses the same colour code almost everywhere: brown is +V, blue is 0 V, and black is the switched output. The sensor runs on the brown and blue, and it steers the black. Everything about troubleshooting one comes down to a single question that beginners find genuinely confusing: does the output switch to +V or to 0 V?
A PNP sensor sources — when it detects, it connects the black output to +V, so the output goes high. Its load returns to 0 V. An NPN sensor sinks — when it detects, it connects the black output to 0 V, so the output goes low. Its load returns to +V. They look identical, they cost the same, and they behave in exactly opposite ways. Wire a PNP sensor where the circuit expects an NPN — or return the load to the wrong rail — and a perfectly good sensor will never turn the input on.
Field note — PNP with a light on
The classic call: a new PNP sensor lights up when a part is present, its output measures a clean 24 V, and the PLC input still reads off. Nothing is broken. The input is set to sink — it expects the sensor to pull the point to 0 V, the way an NPN does — so a sourced 24 V has no return path through it. Match the pair: a PNP (sourcing) sensor needs a sinking input; an NPN (sinking) sensor needs a sourcing input. Most PLC input cards let you pick, or you land the module common on the matching rail.
Walk it with a voltmeter, in order
Every fault falls out of four quick checks against 0 V, done in sequence:
- Is the sensor powered? Brown to blue should read 24 V at the sensor itself. If the panel rail is 24 but the sensor reads 0, the supply wire is open — and the 24 V will be sitting across that break.
- Does it detect? The sensor's own indicator light should follow the target. Light but no output is a wiring or output fault; no light with a good supply means it simply is not seeing the target.
- Does the output switch? Black to 0 V should step between 0 and 24 as the target comes and goes. Stuck at 0 is a short to 0 V or a dead output; stuck at 24 is a short to +V, which holds the input on and never releases.
- Does it reach the input, and does the input turn on? If the output switches at the sensor but the input terminal reads 0, the signal wire is open. If the signal is present at the input and the input still won't come on, you are back to a sourcing/sinking mismatch.
When the sensor is innocent
The trap on a sensor call is the same as on a motor: the case where every electrical reading is perfect. Solid 24 V supply, continuous wiring, correct type — and the input still never comes on, because the sensor's light never comes on either. That is not an electrical fault. An inductive proximity sensor only responds to ferrous metal within its rated gap; a capacitive one drifts with buildup; a photoeye needs a clean lens and an unblocked beam. Check the sensing distance against the datasheet, the alignment, and the target itself before you condemn a sensor that is doing exactly what it should.
What normally goes wrong, in order
- Wrong type or wrong rail — a PNP where an NPN belongs, or a load returned to the wrong side
- A loose or broken output wire — output good at the sensor, missing at the card
- A lost supply leg leaving the sensor dark
- Moisture in a connector shorting the output high or low
- Drift and alignment — a good sensor that has simply stopped seeing its target
None of it is hard once the colour code and the sourcing/sinking rule are second nature. Brown feeds it, blue returns it, black carries the answer — and whether that answer is 24 or 0 is the whole personality of the sensor. Know which one you have, wire the load to the matching rail, and most sensor faults are a two-minute voltmeter job.