← Back to all lessons
Wiring 2
Free

Wiring 2 — NPN / PNP Sensors (Sinking & Sourcing)

What you'll learn

Industrial 3-wire DC proximity sensors normally use this IEC colour convention (always verify the device datasheet):

Lab time: ~12 minutes.

Lesson briefing

NPN / PNP Sensors — Sinking & Sourcing

Industrial 3-wire DC proximity sensors normally use this IEC colour convention (always verify the device datasheet):

  • Brown (BN) — 24 VDC supply positive.
  • Blue (BU) — 0 V / DC common.
  • Black (BK) — signal output to the PLC input.

The supply wiring (BN and BU) is identical for both NPN and PNP sensors. The only difference is what the black wire does when the sensor detects a target. In the panel wiring that you add in this lab, use red for +24 V, blue for 0 V, black for signal/control, and green/yellow for PE. The brown/blue/black colours above describe the sensor's factory-fitted cable.

NPN — sinking output

When an NPN sensor is active, its output transistor connects the black wire to 0 V: it sinks current. A compatible sourcing PLC input supplies current through its input circuit and the NPN output to 0 V, so that input channel turns ON.

PNP — sourcing output

When a PNP sensor is active, its output transistor sources +24 V onto the black wire. A compatible sinking PLC input returns that current to 0 V, so the input channel turns ON. PNP sensors are common with modern positive-logic IEC control systems.

Wiring both onto the same PLC

This training PLC models X0 as a sourcing input for the NPN sensor and X1 as a sinking input for the PNP sensor. Both sensors share the same +24 V and 0 V distribution buses, and their black wires land on those separate channels.

A real fixed-common input module often cannot mix NPN and PNP devices in one common group. Use separate configurable input groups, a universal input module, or an interface relay as the manufacturer's wiring diagram requires. Never assume that a PLC "handles either" polarity automatically.

Practical tip: always read the sensor nameplate before wiring. A polarity mismatch can let the sensor LED operate while the PLC input never turns on. Also bond DC common to PE only when the machine's documented SELV/PELV and grounding design explicitly requires it.

Hints

Hint 1

Brown wire (+V terminal) always connects to the +24 V supply bus — this is true for both NPN and PNP sensors.

Hint 2

Sign up to unlock the full hint sequence.

Hint 3

Sign up to unlock the full hint sequence.

Hint 4

Sign up to unlock the full hint sequence.

This lesson uses 8 placed components on the lab canvas. Components are vendor-neutral (no proprietary trademarks); the wiring rules apply to any equivalent industrial part.

Sign up free to start

This foundation lab is included on Free — sign up takes a minute.

Sign up free to start →

You might also like

Competency and practice field guide

PLC sourcing and sinking wiring lesson: practice plan

Direct answer

The learner can draw conventional current from positive to return, identify which side sources and sinks it and wire compatible commons without relying on color alone.

Written for pLC wiring beginners connecting three-wire sensors and transistor outputs to compatible input and output circuits.

a supervised industrial electrical bench used to trace 24 VDC control power, terminals, relay contacts and PLC I/O with a correctly selected meter while studying PNP, NPN, sourcing and sinking current paths
System map / 02

NODE 01observable

Scope

Supply polarity, source, load, sink, PNP transistor, NPN transistor, input circuit, common terminal, leakage, threshold, conductor function and normal state.

NODE 02observable

Signal path

Positive supply through sourcing element, PLC input or load and sinking element to 0 V with corresponding device indication and software state.

NODE 03observable

Baseline practice

Each target-present and target-absent state produces the predicted current path, input voltage and tag value.

NODE 04observable

Edge cases

Wrong common, PNP-to-PNP mismatch, NPN-to-NPN mismatch, reversed supply, open signal, leakage, shared supply, short and power return.

NODE 05observable

Fault practice

A terminology, supply, polarity, transistor, common, wiring, threshold, channel or tag-interpretation mismatch.

NODE 06observable

Transfer to the job

Compatibility verified from current schematics and tested with the intended module and device.

Answer surface / 07

What is the difference between sourcing and sinking?

A sourcing side supplies conventional current toward a load; a sinking side provides the return path toward the lower potential.

Is PNP always sourcing?

A PNP sensor output is commonly described as sourcing current, but verify the complete device and input circuit instead of relying on a label alone.