Industrial Tech #NPN#PNP

NPN vs PNP Sensors: Wiring, Sinking vs Sourcing, and How to Tell Them Apart

NPN and PNP sensors look identical but wire differently. Here is the plain-English difference between sinking and sourcing and how to wire each to a PLC.

J.D. Sweeney June 20, 2026 9 min read

Two proximity sensors sit in a parts bin. They are the same size, the same brand, the same M12 body, and they detect the same target at the same distance. One is NPN, one is PNP, and if you wire them the same way to your PLC, one of them works and one of them does nothing. This is one of the most common sources of confusion for anyone new to industrial controls, and it trips up plenty of experienced people too. The concepts are simple once you stop thinking about transistors and start thinking about which wire does the switching.

The Core Idea: Which Wire Switches

Every 3-wire DC sensor — inductive prox, photoelectric, capacitive — has three connections: power (usually brown, +24 V), common (usually blue, 0 V), and the output signal (usually black). The sensor’s job is to switch that black output wire when it detects something. The only question that matters is: when the sensor activates, does the output connect to the positive rail or to the negative rail?

  • A PNP sensor switches the output to +24 V when active. It sources current out to the load. People call it “sourcing” or “switching positive.”
  • An NPN sensor switches the output to 0 V (ground) when active. It sinks current from the load back to common. People call it “sinking” or “switching negative.”

That is the entire difference. PNP delivers a positive voltage on the signal wire when triggered. NPN delivers a path to ground on the signal wire when triggered. Everything else about the sensor is identical.

Sinking and Sourcing, Without the Jargon

The words “sinking” and “sourcing” describe the direction current flows, and they cause endless confusion because the sensor and the PLC input are opposites of each other.

Think of it as a handshake. Current has to flow in a complete loop from +24 V, through the sensor, through the PLC input, and back to 0 V. Someone has to push the current (source it) and someone has to receive it (sink it).

  • A PNP (sourcing) sensor pushes current out its output wire. It needs a sinking input on the PLC to receive that current and pass it to ground.
  • An NPN (sinking) sensor pulls current in through its output wire to ground. It needs a sourcing input on the PLC, where the PLC supplies the current and the sensor provides the path to ground.

The rule of thumb that saves you every time: a sourcing sensor needs a sinking input, and a sinking sensor needs a sourcing input. They are mirror images, and they must be matched.

How to Wire Each One to a PLC

PNP (Sourcing) Sensor — the Global Default

PNP is the most common configuration worldwide, especially in European-designed equipment and most modern PLCs.

  • Brown wire to +24 V
  • Blue wire to 0 V
  • Black (output) wire to the PLC input terminal
  • The PLC’s input common (sometimes labeled COM or 0 V common) is tied to 0 V

When the sensor activates, it sends +24 V down the black wire into the PLC input. The input sees a positive voltage and turns on. This is the safer and more common arrangement, partly because of fault behavior: if a sourcing sensor’s signal wire shorts to the grounded machine frame, the input simply reads off rather than falsely reading on.

NPN (Sinking) Sensor

NPN is common on older equipment and a lot of Japanese-designed machinery.

  • Brown wire to +24 V
  • Blue wire to 0 V
  • Black (output) wire to the PLC input terminal
  • The PLC’s input common is tied to +24 V

When the sensor activates, it pulls the black wire down to 0 V. The PLC input, which is fed from +24 V on its common, now has a path to ground through the sensor, and current flows. The input turns on.

Notice the only wiring difference at the PLC is whether the input common is tied to 0 V (for PNP) or +24 V (for NPN). Many modern PLC input cards let you choose by simply wiring the common to one rail or the other, which is why matching sensor type to the available input cards matters when you spec a system.

How to Tell Which One You Have

If the sensor is unmarked or you are staring at a mystery part, here is how to identify it:

  1. Read the datasheet or the body print first. Most sensors are stamped “PNP” or “NPN,” or show a wiring symbol. The symbol with the output transistor connected toward the load and the load going to 0 V is PNP; the reverse is NPN.
  2. Use a multimeter. Power the sensor with +24 V (brown) and 0 V (blue). Set your meter to DC volts. Put the black lead on the sensor’s 0 V and the red lead on the black output wire. Trigger the sensor with a target. If the output jumps to about +24 V, it is PNP. If it stays near 0 V, move on to the next test.
  3. Confirm NPN. Connect a load — even just a known-good 24 V indicator or a resistor to +24 V — between +24 V and the black output. Trigger the sensor. If the output now pulls to near 0 V and current flows through the load, it is NPN. NPN outputs often read floating or ambiguous with a bare voltmeter because they need a load tied to the positive rail to complete the circuit.

The voltmeter-alone test is the fast field check: PNP shows a clean voltage swing to +24 V on trigger, NPN does not.

NO vs NC Is a Separate Question

Do not confuse NPN/PNP with normally open versus normally closed. NPN/PNP is about which rail the output switches to. NO/NC is about whether the output is active when the target is present (normally open, switches on when detected) or absent (normally closed, switches off when detected). A sensor can be any combination: PNP-NO, PNP-NC, NPN-NO, NPN-NC. You pick the output type to match your PLC inputs and the NO/NC behavior to match your logic.

Practical Advice for the Field

If you are standardizing a plant or building a new panel, pick one type and stick to it — almost always PNP-NO for new work, because it dominates the market, matches most modern PLC default wiring, and fails safe to ground. Keeping a consistent type means one spare sensor fits any location and nobody has to think about input commons during a 2 a.m. line-down call.

When you are stuck integrating a mismatched sensor into existing inputs, you have three options: swap the sensor for the correct type, change the input card’s common wiring if the card supports it, or use an interposing relay to convert between the two. The relay trick is ugly but it works, and sometimes at midnight working is all that matters.

Get the sinking-versus-sourcing handshake straight in your head — sourcing sensor to sinking input, sinking sensor to sourcing input — and the rest of the confusion melts away.

Related Articles