1. Überblick & Funktionsprinzip
A 3-wire NPN (sinking / open-collector) sensor switches its Black output terminal down to 0 V (Blue) via an internal low-side NPN transistor. It is widely used in Asian machinery, Mitsubishi/Omron sourcing-DI PLC panels, and 5 V / 3.3 V microcontroller interfaces.
Because the collector is left open (unconnected to +Vcc inside the sensor), an NPN output CANNOT source voltage by itself. The load or pull-up resistor must be wired between +Vcc and the Black wire so current flows from +Vcc → Load → INTO the sensor → 0 V.
Triggered (Active Low / Sinking): The internal NPN transistor saturates (Vce_sat ≈ 0.2–0.8 V). Full load voltage (Vcc − Vce_sat) appears across the pull-up load or PLC sourcing optocoupler, turning it ON while the Black terminal sits near 0 V.
Standby (OFF / Pulled High): The NPN transistor cuts off. With a pull-up load present, no current flows across the load, so the Black wire rises cleanly to +Vcc (no voltage drop across load → PLC input is OFF).
Open-collector superpower (easy level shifting!): Because the NPN collector only pulls to 0 V, you can power the sensor from 12–24 V while pulling its Black output up to 3.3 V or 5 V through a 4.7 kΩ resistor — letting a 24 V industrial sensor talk directly to an MCU sharing 0 V ground (verify datasheet has no internal pull-up to 24 V!).

2. Step-by-step: Wiring an NPN sensor to a PLC or Microcontroller
1Connect PLC DI common (COM / S/S) to +24 V DC (Sourcing DI)
For an NPN sensor, the PLC digital input common terminal MUST connect to +24 V DC so the input card supplies current out of the channel terminal into the sensor Black wire.
2Add a pull-up resistor if bench-testing or wiring to an MCU
When testing an NPN sensor on a bench without a PLC, connect a 2.2 kΩ–10 kΩ pull-up resistor between Brown (+Vcc) and Black. Without it, Black floats in OFF state and multimeter readings will confuse you.
3Check sinking current & resistor wattage rating
Calculate I_L = (Vcc − Vce_sat) / R_L and verify I_L ≤ sensor Imax (typically 100–200 mA) and resistor power P = I_L²·R_L stays well below half its wattage rating (e.g. < 125 mW for a 1/4 W resistor).
4Inspect cable routing to prevent frame-ground false triggers
Route Black output cables away from sharp metal edges and moving pinch points: any unintended short from Black to 0 V chassis will immediately energize the load as a false ON signal.
3. Fehlersuche & Multimeter-Diagnose
| Symptom | Ursache | Multimeter-Prüfung | Abhilfe |
|---|---|---|---|
| Multimeter reads ~0 V on Black both WITH and WITHOUT target | Missing pull-up resistor / open-collector floating output | Connect a temporary 4.7 kΩ resistor from +Vcc to Black and re-measure | Keep pull-up resistor or wire into PLC sourcing DI (COM = +24 V) |
| PLC input stays permanently ON even with sensor unplugged | Black signal wire pinched/shorted to grounded machine chassis (0 V) | Measure continuity from disconnected Black wire to 0 V / frame ground | Replace damaged cordset; consider migrating critical interlocks to PNP or NAMUR |
4. Häufige technische Fragen (FAQ)
Why is an NPN sensor called a "sinking" output?
In conventional current flow (+ to −), when the NPN sensor turns ON, load current flows FROM +Vcc, through the load, and INTO the sensor Black wire toward 0 V — the sensor acts as a current sink.
What pull-up resistor value should I use with an NPN sensor?
For 24 V logic, 2.2 kΩ to 4.7 kΩ (0.5 W) draws 5–11 mA with strong noise immunity. For 3.3 V / 5 V MCU inputs, 4.7 kΩ to 10 kΩ (0.25 W) is ideal unless high-speed encoder pulses (>20 kHz) require 1–2.2 kΩ.
Can I wire an NPN sensor directly to a 24 V Sinking PLC input?
Not directly — both the sensor and PLC try to connect to 0 V so no current flows. Use a 2.2 kΩ pull-up resistor to +24 V (inverts logic: target = PLC LOW) or an interposing relay / signal converter.
Does an NPN sensor have a built-in pull-up resistor?
Many industrial M12 sensors include a weak internal pull-up (typically 10 kΩ to +Vcc) so bench meters see Vcc when OFF, while true open-collector encoders have none. Always check the datasheet before wiring to a 3.3 V MCU!
Can two NPN sensors be wired in parallel for wired-OR?
Yes! Tying multiple open-collector NPN outputs to one shared pull-up resistor creates natural wired-OR (active-low): any triggered sensor pulls the shared line to 0 V without fighting the others.
Why do I need a flyback diode when an NPN sensor drives a relay?
When the NPN transistor turns OFF abruptly, the relay coil inductance generates a high-voltage inductive kickback (+60 V to +200 V) that can punch through the sensor output transistor. An anti-parallel 1N4007 across the coil clamps the spike safely.
5. Zugehörige Rechner, Leitfäden & weitere Schaltungen
- Rechner für den Spannungsfall der Sensorversorgung
- Rechner für Impulsausgänge
- NAMUR vs. PNP vs. NPN: Schaltausgänge, Verdrahtung & CSV-Referenz
- PNP-Schaltausgang (3-Leiter, Plus-schaltend) — Schaltung & Simulator
- NAMUR 2-Leiter Eigensicherheits-Schaltung (IEC 60947-5-6)
- Gegentakt (HTL/TTL Push-Pull) & Open-Drain Sensorausgang
- Optokoppler-Trennung & Relais-Freilaufdiode (Sensoreingang)
- 24-V-Sensoreingangsschutz (PMOS-Verpolschutz, TVS & PTC)
- Potentialfreier Kontakt: Hardware-Entprellung & Benetzungsstrom
- 2-Leiter 4–20 mA Stromschleife & geschützter Empfänger
- 3-Leiter vs 4-Leiter Aktiver Analog-Messumformer (0–10 V)
- Spannung-zu-4–20 mA Stromsender (OPV + Längstransistor)
- NTC-Spannungsteiler + OPV-Impedanzwandler & RC-Filter