What Are Digital Sensors?
OUTPUT TYPE // CURRENT SWITCHING // 24VDC INDUSTRIAL LOGIC
Core concept: A digital sensor has ONE job — detect something (metal, light, pressure, position) and switch a signal ON or OFF to the PLC. The difference between NPN and PNP is which direction current flows when that switch closes.
▼ NPN — Sinking Sensor
When the sensor detects its target, it pulls the output to 0V (GND).
▶ PLC (+24V) → PLC Input → Sensor → 0V GND
N = Negative (GND)
NPN pulls signal DOWN to ground → "sinking" the current
PLC supplies the voltage. Sensor completes path to ground.
▲ PNP — Sourcing Sensor
When the sensor detects its target, it pushes +24V to the PLC input.
▶ Sensor (+24V) → PLC Input → 0V GND
P = Positive (+24V)
PNP pushes signal UP to +24V → "sourcing" the voltage
Sensor supplies the voltage. PLC provides the path to ground.
⚡ The 3-Wire Standard
Most industrial digital sensors use 3 wires:
| Wire Color |
Function |
Connect To |
| ■ BROWN |
Supply power |
+24VDC |
| ■ BLUE |
Common / Return |
0V / GND |
| ■ BLACK |
Signal output |
PLC input terminal |
⚠ Wire color warning: Asian-manufactured sensors sometimes use Brown=+V, Blue=0V, Black=Output — but some deviate. Always verify with the datasheet. Never assume. Wrong polarity = dead sensor.
🧠 Key Difference — One Line
NPN SINKING
Output = switch to GND
Current flows INTO sensor
PLC input sees LOW when active
PNP SOURCING
Output = switch to +24V
Current flows OUT of sensor
PLC input sees HIGH when active
💡 SINK / SOURCE TRICK
"NPN Needs the return path (sinks to GND)" | "PNP Provides Power (sources +24V)"