Sinking vs Sourcing (NPN vs PNP): PLC I/O Wiring Explained
Sinking vs sourcing and NPN vs PNP explained — what the terms mean, how to wire each to a PLC input or output, and how to avoid the classic wiring mistake.
Sinking and sourcing describe the direction that current flows through a PLC input or output terminal. NPN and PNP describe the transistor type inside a sensor and — by extension — which direction that sensor drives current. The four terms come as two pairs, and confusing them is the single most common wiring mistake made on the plant floor.
This guide unpacks both pairs, explains exactly how each configuration handles current, and shows you how to match a sensor to the correct PLC input card every time. It finishes with a step-by-step method for reading the input card's common (C/COM/M) terminal so you can identify the card type without hunting for a data sheet.
The Core Concept: Which Way Does Current Flow?
Every discrete PLC input or output circuit has current entering one terminal and leaving through another. The direction of that current — relative to the PLC terminal — is what "sinking" and "sourcing" describe.
Sinking means the PLC terminal is at or near 0 V (ground). Current flows into the terminal from the field device and exits through the common rail back to the supply negative. The PLC terminal acts as a drain — it pulls current down to ground.
Sourcing means the PLC terminal is at or near +24 V. Current flows out of the terminal, through the field device, and returns to the supply negative via the common rail. The PLC terminal acts as a source — it pushes current into the circuit.
A simple way to remember the difference:
| Term | PLC terminal voltage | Current at the terminal | Analogy |
|---|---|---|---|
| Sinking | Near 0 V (GND) | Flows into the terminal | Drain in a sink |
| Sourcing | Near +24 V | Flows out of the terminal | Water from a tap |
This current-direction logic applies equally to inputs and outputs, though the implications are slightly different for each.
NPN vs PNP Sensors: Which Is Which?
Discrete sensors — proximity switches, photoelectric sensors, inductive sensors, capacitive sensors — contain an internal transistor switch that connects the output wire to either the supply positive or the supply negative when the sensor activates. The transistor type determines which connection is made.
NPN Sensors (Current Sink)
An NPN sensor contains an NPN transistor whose collector connects to the output wire and whose emitter connects to the 0 V supply wire. When the sensor activates, the transistor turns on and connects the output wire to 0 V. The output wire is pulled down toward ground.
- Output wire goes to 0 V when active (logic 1 = low voltage at the output)
- Current flows from the load, into the sensor output wire, through the NPN transistor, out to the 0 V rail
- The sensor sinks current through its output
NPN sensors are sometimes called current-sinking sensors or open-collector sensors for this reason. The sensor's output terminal acts as a drain.
PNP Sensors (Current Source)
A PNP sensor contains a PNP transistor whose emitter connects to the +24 V supply wire and whose collector connects to the output wire. When the sensor activates, the transistor turns on and connects the output wire to +24 V. The output wire is pushed up toward the supply positive.
- Output wire goes to +24 V when active (logic 1 = high voltage at the output)
- Current flows from the +24 V supply, through the PNP transistor, out the sensor output wire, into the load
- The sensor sources current from its output
PNP sensors are sometimes called current-sourcing sensors. The sensor's output terminal acts as a supply.
NPN vs PNP at a Glance
| Property | NPN sensor | PNP sensor |
|---|---|---|
| Internal transistor | NPN (BJT) | PNP (BJT) |
| Output when active | Pulled to 0 V | Pushed to +24 V |
| Current through output | Into the sensor | Out of the sensor |
| Also called | Sinking sensor / open-collector | Sourcing sensor |
| Common in | Japan, Asia | Europe, North America |
For a broader look at the different sensor technologies where NPN and PNP variants appear, the types of industrial sensors guide covers proximity, photoelectric, and capacitive sensors in detail.
Sinking vs Sourcing PLC Inputs — and How They Pair
PLC input cards also come in two types, and the type is defined by where the common terminal (labelled C, COM, or M on the module) is connected inside the card.
Sinking Input Cards (Type 1)
On a sinking input card, the common terminal connects internally to the +24 V supply. When a field device activates, it provides a path to 0 V, pulling the input line down. Current flows from the +24 V common, through the opto-isolator inside the card, out the input terminal, through the field device, and down to 0 V. The field device sinks the current.
A sinking input card accepts a device that provides a 0 V output when active — which is exactly what a PNP sensor does. The PNP sensor sources +24 V through its transistor, the current flows through the input card's opto-isolator, and the common rail brings it back at +24 V.
Wait — that sounds backwards. Here is the reconciliation: on a sinking input card, the field device must sink (pull down), so you need a device that sources current. A PNP sensor sources current. That is the match.
Sourcing Input Cards (Type 2)
On a sourcing input card, the common terminal connects internally to the 0 V (negative) supply. When a field device activates, it provides a path to +24 V, pushing the input line high. Current flows from +24 V, through the field device, into the input terminal, through the opto-isolator, out the common terminal, and back to 0 V. The field device sources the current.
A sourcing input card accepts a device that provides a +24 V output when active — which is exactly what an NPN sensor does. Wait — NPN sensors pull to 0 V, not +24 V. So NPN sensors require sourcing inputs because the card supplies the +24 V and the NPN sensor pulls the return path to 0 V.
The Pairing Rule
This is the counter-intuitive part that trips up most beginners. The pairing rule is:
| Sensor type | Pairs with | Reason |
|---|---|---|
| PNP sensor (sources +24 V) | Sinking input card (common at +24 V) | Current leaves PNP output → through card → back to +24 V common |
| NPN sensor (sinks to 0 V) | Sourcing input card (common at 0 V) | Current leaves +24 V card input → through NPN output → back to 0 V common |
The rule feels reversed because the labels describe what the PLC terminal does, not what the sensor does. A sinking input sinks nothing — the field device does. The card is named from the perspective of the current leaving the common terminal.
A practical mnemonic used on many plant floors: PNP goes to a sinking card, NPN goes to a sourcing card. If you remember that one line, you will never cross-wire a sensor again.
For context on the contact states that these inputs represent in your ladder diagram, see the discussion of normally open vs normally closed contacts — the physical wiring type and the logical contact type are independent choices.
Wiring Diagrams Described: Inputs and Outputs
PNP Sensor to Sinking Input Card
The circuit from left to right:
- +24 V supply connects to the PNP sensor's supply (brown wire, IEC color coding).
- 0 V supply connects to the PNP sensor's negative (blue wire) and to the input card's 0 V rail.
- The PNP sensor's output wire (black wire) connects to the numbered input terminal on the card (e.g., I0.0).
- The card's common terminal (C or COM) connects to the +24 V supply rail.
When the sensor activates:
- The PNP transistor turns on.
- +24 V is applied through the transistor to the output wire.
- Current flows: +24 V supply → PNP transistor → black output wire → I0.0 terminal → card opto-isolator → COM terminal → +24 V supply (loop complete).
- The opto-isolator sees current and signals a logic 1 to the PLC CPU.
NPN Sensor to Sourcing Input Card
The circuit from left to right:
- +24 V supply connects to the NPN sensor's supply (brown wire) and to the numbered input terminal on the card (via the card's internal +24 V connection through the opto-isolator).
- 0 V supply connects to the NPN sensor's negative (blue wire) and to the card's common terminal (COM to 0 V).
- The NPN sensor's output wire (black wire) connects to the numbered input terminal on the card (e.g., I0.0).
When the sensor activates:
- The NPN transistor turns on.
- The output wire is pulled to 0 V through the transistor.
- Current flows: +24 V (from internal card supply through opto-isolator) → I0.0 terminal → black output wire → NPN transistor → 0 V → COM terminal → 0 V supply (loop complete).
- The opto-isolator sees current and signals a logic 1 to the PLC CPU.
Sinking Output Card Wiring
A sinking output card provides a 0 V path when activated. The load connects between the output terminal and +24 V. When the PLC turns the output on, the transistor inside the card pulls the output terminal to 0 V, completing the circuit through the load.
- Output terminal → load → +24 V supply
- Card transistor sinks current from the load output terminal to 0 V
Sourcing Output Card Wiring
A sourcing output card provides +24 V when activated. The load connects between the output terminal and 0 V. When the PLC turns the output on, the transistor pushes +24 V out through the output terminal, through the load, and back to 0 V.
- +24 V supply → card transistor → output terminal → load → 0 V supply
Regional Conventions: PNP in Europe, NPN in Asia
Sensor and PLC wiring conventions vary by geography, driven largely by the national standards and major PLC manufacturer practices that dominated each region as industrial automation matured.
| Region | Dominant sensor type | Typical PLC input card |
|---|---|---|
| Europe (IEC-influenced) | PNP (sourcing) | Sinking inputs |
| Japan / Asia | NPN (sinking) | Sourcing inputs |
| North America | Mixed; PNP increasingly dominant | Both types available |
European automation equipment — Siemens, Balluff, ifm, Sick — shipped predominantly PNP sensors and sinking-input modules because the IEC wiring philosophy kept the signal line at a positive voltage during normal operation, which was considered safer (a broken wire to 0 V would not cause a spurious input).
Japanese manufacturers — Keyence, Omron, Panasonic, Mitsubishi — followed NPN conventions because the JIS wiring standard took the opposite view: the signal line rests at 0 V and rises to +24 V only when active.
In practice, most modern sensor families are available in both NPN and PNP variants. Many current-generation PLC input cards are bipolar (also called "sink/source" or "type 3" per IEC 61131-2), accepting either sensor type without hardware changes. Always check the data sheet before assuming.
Understanding how this integrates with the broader PLC architecture is covered in the PLC programming basics fundamentals guide.
The Classic Wiring Mistake
The most frequent I/O wiring mistake in industrial automation is connecting a PNP sensor to a sourcing input card (or an NPN sensor to a sinking input card). Here is what happens:
Scenario: A technician wires a PNP proximity sensor to a sourcing input card. The sensor output goes to +24 V when active. The card's common is at 0 V. The sensor output wire connects to the input terminal.
When the sensor activates:
- The PNP output pushes to +24 V.
- The card input terminal is internally connected back to the +24 V card supply through the opto-isolator, and the common is at 0 V.
- Both sides of the circuit are now at +24 V — there is no voltage differential, so no current flows.
- The opto-isolator sees no current. The input does not trigger.
Result: the input never turns on, no matter how close the target is to the sensor. The sensor LED may still illuminate (it has its own internal indicator circuit), which causes additional confusion — the sensor appears to be working, but the PLC input is dead.
The damage scenario: In some mismatched configurations — particularly mixing different power rails or using a card without proper protection — the mismatch can push unexpected currents through the opto-isolator in reverse, potentially damaging the input card over time. Always verify before powering up.
How to diagnose the mistake:
- With the sensor activated, measure DC voltage between the sensor's black output wire and the card's 0 V rail. A PNP sensor should read +24 V. An NPN sensor should read near 0 V.
- Identify the card type from its data sheet or from the COM terminal connection (see next section).
- Confirm the pairing: PNP → sinking card (COM at +24 V); NPN → sourcing card (COM at 0 V).
The 4-20mA loop article illustrates the same discipline applied to analog signals — understanding which direction current must flow before touching the terminals.
How to Identify What You Have
When you are handed an unmarked PLC module or a sensor pulled from a parts bin, use these steps to determine which type it is before wiring.
Identifying the PLC Input Card Type
Step 1 — Read the label. Most cards print "SINK", "SOURCE", "TYPE 1", "TYPE 2", "NPN", or "PNP" on the module face or terminal strip label. Siemens SM 321 modules are labeled "SINK" or "SOURCE". Allen-Bradley 1769-IQ modules specify their type in the module number and data sheet.
Step 2 — Find the COM terminal and measure. With the card powered and no sensors connected:
- Measure DC voltage from the COM terminal to the 0 V supply rail.
- COM reads near +24 V → the card is a sinking input (needs PNP sensors).
- COM reads near 0 V → the card is a sourcing input (needs NPN sensors).
This single measurement identifies the card type without a data sheet.
Step 3 — Check IEC 61131-2 type marking. The international standard classifies discrete inputs as:
- Type 1: Current-sinking input (positive logic, COM at +V)
- Type 2: Current-sourcing input (negative logic, COM at 0 V)
- Type 3: Bipolar (accepts both NPN and PNP)
Identifying Sensor Type
Step 1 — Read the label. The sensor body or data sheet will state "PNP", "NPN", or "PNP/NPN" for configurable types.
Step 2 — Read the wire color. IEC 60947-5-2 defines standard sensor wire colors:
- Brown (+24 V supply)
- Blue (0 V / negative)
- Black (signal/output)
- White (second output or complementary output)
Step 3 — Measure the output voltage. Activate the sensor (move a target in front of an inductive sensor, for example) and measure the black wire relative to the blue wire:
- Black wire at +24 V → PNP sensor
- Black wire at near 0 V → NPN sensor
Step 4 — Check the wiring diagram. Every sensor data sheet includes an application wiring diagram that shows exactly how the brown, blue, and black wires connect to a load and supply. The diagram will confirm the output polarity.
Quick Reference: Matching Sensors to Cards
| Sensor output when active | Sensor type | Required card type | Card COM connection |
|---|---|---|---|
| +24 V | PNP | Sinking | COM → +24 V |
| 0 V | NPN | Sourcing | COM → 0 V |
For a deeper look at how PLCs handle digital I/O at the system level, the what is PLC programming guide explains the full scan cycle from physical input to ladder logic rung evaluation.
Frequently Asked Questions
What is the difference between sinking and sourcing?
Sinking and sourcing describe the direction of current flow at a PLC input or output terminal. A sinking terminal is held near 0 V and receives current from the field device — the current "sinks" into the terminal. A sourcing terminal is held near +24 V and pushes current out to the field device — it "sources" the current. The terms always describe what the PLC module does, not what the sensor does.
What is NPN vs PNP?
NPN and PNP describe the type of output transistor inside a sensor. An NPN sensor pulls its output wire down to 0 V when active — it sinks current. A PNP sensor pushes its output wire up to +24 V when active — it sources current. NPN sensors are common in Asian-manufactured equipment; PNP sensors dominate European equipment, though both types are now available worldwide.
Which sensor works with a sinking input?
A PNP sensor works with a sinking input card. The PNP sensor sources +24 V on its output wire, the current flows through the card's opto-isolator, and returns to the +24 V common rail inside the sinking input card. Remember the mnemonic: PNP → sinking card.
How do you know if a PLC input is sinking or sourcing?
Measure the DC voltage at the card's COM (common) terminal relative to the 0 V supply rail with the card powered. If COM is near +24 V, the card is a sinking input. If COM is near 0 V, the card is a sourcing input. Alternatively, read the card label (SINK/SOURCE or TYPE 1/TYPE 2) or consult the module's data sheet.
Summary
The terminology can feel backwards the first time you encounter it, but the logic is consistent once you anchor it to current direction:
- Sinking = terminal at 0 V, current flows in
- Sourcing = terminal at +24 V, current flows out
- PNP sensor sources current → pairs with a sinking input card (COM at +24 V)
- NPN sensor sinks current → pairs with a sourcing input card (COM at 0 V)
- To identify a card in the field, measure the COM terminal voltage; to identify a sensor, measure the black output wire when the sensor is active
Getting the pairing right takes one measurement and one data sheet check. Getting it wrong means an input that never fires — or, in edge cases, a card that eventually fails. Make verifying the COM terminal voltage part of your standard commissioning checklist and the classic wiring mistake disappears from your maintenance log.


