NPN vs PNP Sensor Wiring Explained
Send your PLC input type and the target distance — we confirm NPN or PNP and the sensor size.
NPN or PNP — which proximity sensor do you need? This one-minute animation shows 3-wire DC sensor wiring (brown +V, blue 0 V, black output), how a PNP output sources and an NPN output sinks current, and how to match the sensor to the PLC input.
Chapters
Key points
- 3-wire DC sensor: brown = +V, blue = 0 V, black = output.
- PNP sources current: on detection the output switches to +24 V and current flows through the load to 0 V.
- NPN sinks current: on detection the output switches to 0 V; the load sits between +24 V and the output.
- Match the sensor to the PLC input by its common terminal: NPN to an input whose common is wired to +24 V, PNP to an input whose common is wired to 0 V.
Key data from this video
| Item | PNP | NPN |
|---|---|---|
| Brown wire | +V | +V |
| Blue wire | 0 V | 0 V |
| Black wire | Output | Output |
| Output type | Sources current | Sinks current |
| Output on detection | Switches to +24 V | Switches to 0 V |
| Load connection | Between output and 0 V | Between +24 V and output |
| PLC input to match | Sinking input | Sourcing input |
Questions and answers
What is the difference between NPN and PNP sensor outputs?
A PNP sensor sources current: on detection its output switches to +24 V. An NPN sensor sinks current: on detection its output switches to 0 V.
What do the brown, blue and black wires on a 3-wire sensor mean?
Brown is +V, blue is 0 V and black is the output.
How do I choose NPN or PNP for my PLC input?
Match by the input common terminal: use NPN for an input whose common is wired to +24 V and PNP for an input whose common is wired to 0 V. Input cards are named differently by each maker, so go by the common wiring.
Where is the load connected on an NPN sensor?
The load sits between +24 V and the output. On a PNP sensor, current flows through the load to 0 V.
Transcript
NPN or PNP: which sensor do you need?
A 3-wire DC sensor has a brown wire for +V, a blue wire for 0 V, and a black wire for the output.
A PNP sensor sources current. When it detects the target, the output switches to +24 V, and current flows through the load to 0 V.
An NPN sensor sinks current. When it detects the target, the output switches to 0 V. The load sits between +24 V and the output.
So match the sensor to the PLC input by its common terminal: an NPN sensor needs an input whose common is wired to +24 V, and a PNP sensor needs an input whose common is wired to 0 V. Input cards are named differently by each maker, so go by the common wiring.
SEGMENsensor proximity sensors: NPN or PNP, NO or NC. Learn more at segmensensor.com.