PNP vs NPN – Sourcing vs Sinking Simulator
PNP vs NPN – Sourcing vs Sinking PLC Output Explained with Simulator
When working with PLC panels, one of the basic concepts every instrumentation engineer and technician should understand is the difference between PNP and NPN outputs.
You may have come across terms such as sourcing, sinking, positive switching and negative switching while checking PLC output cards, proximity sensors and field wiring.
Although these terms may look confusing initially, the concept is quite simple once you understand how current flows through the circuit.
In this article, we will understand the difference between PNP and NPN, how sourcing and sinking outputs work, and how to identify their current paths using an interactive simulator.
1. What Is Sourcing?
Sourcing means that a device supplies positive voltage to the connected load.
In a typical 24 V DC PLC output circuit, a sourcing output switches the positive supply (+24 V) to the load.
This is commonly associated with a PNP transistor output.
How it works:
- One side of the load is connected to 0 V.
- The other side is connected to the PLC sourcing output.
- When the PLC output turns ON, +24 V is supplied to the load.
- Current flows from the positive supply, through the load and towards 0 V.
Example:
Suppose a PLC output is connected to a 24 V DC indicator lamp.
When the output turns ON, the PLC output supplies +24 V to the lamp. The lamp receives current and illuminates.
When the output turns OFF, the positive supply is disconnected from the load and the lamp turns OFF.
This is called a sourcing output because the PLC output provides current to the load.
2. What Is Sinking?
Sinking means that a device provides a path for current to return to 0 V.
In a typical 24 V DC PLC output circuit, a sinking output switches the negative side of the circuit.
This is commonly associated with an NPN transistor output.
How it works:
- One side of the load is connected to +24 V.
- The other side is connected to the PLC sinking output.
- When the PLC output turns ON, the output provides a path to 0 V.
- Current flows from +24 V, through the load and into the PLC output towards 0 V.
Example:
Consider the same 24 V DC indicator lamp.
One side of the lamp is connected to +24 V. The other side is connected to the NPN PLC output.
When the output turns ON, the transistor switches the output towards 0 V. Current flows through the lamp, and it illuminates.
When the output turns OFF, the current path is interrupted and the lamp turns OFF.
This is called a sinking output because the PLC output provides the path for current to flow towards 0 V.
3. Difference Between PNP and NPN
The main difference is how the output switches the electrical supply to complete the load circuit.
PNP – Sourcing Output
- Switches positive voltage (+24 V).
- Supplies current to the load.
- Load is connected between the output and 0 V.
- Current flows out of the PLC output when ON.
- Commonly used in positive-switching DC circuits.
NPN – Sinking Output
- Switches the negative side (0 V).
- Provides a return path for current.
- Load is connected between +24 V and the output.
- Current flows into the PLC output when ON.
- Commonly used in negative-switching DC circuits.
4. Understanding Current Flow
This is the most important point to remember.
PNP – Sourcing:
+24 V → PLC output → Load → 0 V
The PLC output supplies positive voltage to the load.
NPN – Sinking:
+24 V → Load → PLC output → 0 V
The PLC output completes the path to 0 V.
Both arrangements can operate the same type of DC load, provided the output ratings and wiring are suitable.
5. How to Use the PNP vs NPN Simulator
The interactive simulator displays two circuits side by side:
- Sourcing (PNP)
- Sinking (NPN)
You can switch the PLC output ON and OFF and observe the voltage indication, current flow and lamp status.
Step 1: Understand the Circuit
On the left side, observe the PNP sourcing output.
On the right side, observe the NPN sinking output.
The red line represents +24 V, while the blue line represents 0 V.
Step 2: Click Output ON
Click the OUTPUT ON button.
Observe both circuits:
- The PNP output switches +24 V to the load.
- The NPN output switches the load return path to 0 V.
- Both indicator lamps illuminate.
- Current flows through both loads.
Notice that the current flows through the load in both circuits, but the PLC switches a different side of the electrical supply.
Step 3: Click Output OFF
Click the OUTPUT OFF button.
Observe the changes:
- Both indicator lamps turn OFF.
- The PNP output changes to 0 V in the simulator.
- The NPN output changes to +24 V in the simulator.
This helps you understand why the voltage indication at the output terminal is different between sourcing and sinking arrangements.
Step 4: Run Auto Demo
Click AUTO DEMO to automatically switch the output ON and OFF.
Watch the current-flow animation and compare both arrangements.
Use the Full Screen option to view the circuit more clearly.
6. Where Are PNP and NPN Used in Industrial Plants?
PNP and NPN arrangements are commonly found in PLC digital input and output circuits.
Some practical applications include:
Proximity sensors: Inductive and capacitive proximity sensors are available with PNP and NPN output configurations. The correct type must match the PLC input circuit.
Photoelectric sensors: These sensors use transistor outputs to provide switching signals to PLC inputs.
PLC digital input modules: Input module wiring must be compatible with the sensor output type.
PLC transistor output modules: Sourcing and sinking output modules are used to operate DC loads such as indicator lamps, relay coils and other compatible devices.
Limit switches and electronic switches: Electronic switching devices may use PNP or NPN output arrangements depending on the application.
7. Important Points During PLC Wiring
Before connecting a PNP or NPN device, check the following:
- Verify whether the PLC input or output module is sourcing or sinking.
- Check the sensor output type before connecting it to a PLC input.
- Confirm the 24 V DC supply polarity.
- Check the common terminal arrangement of the PLC module.
- Verify the load current and output module rating.
- Check the wiring diagram provided by the manufacturer.
- Never assume that all PLC modules have the same input or output configuration.
Incorrect wiring can result in a sensor not being detected, an output load not operating or damage to equipment if electrical ratings are exceeded.
8. Interview Questions
Q1. What is the difference between PNP and NPN?
PNP provides positive voltage to the load, whereas NPN switches the load towards 0 V.
Q2. What is a sourcing output?
A sourcing output supplies positive voltage to the connected load.
Q3. What is a sinking output?
A sinking output provides a current return path towards 0 V.
Q4. Can a PNP sensor be connected to an NPN-compatible PLC input?
Not necessarily. The sensor output and PLC input circuit must be electrically compatible. Check the manufacturer’s wiring diagrams before connecting them.
Q5. What happens when a PNP output turns ON?
The output switches positive voltage to the load, allowing current to flow through the load towards 0 V.
Q6. What happens when an NPN output turns ON?
The output switches towards 0 V, allowing current to flow from the positive supply through the load and into the output.
Conclusion
PNP and NPN are two common transistor switching arrangements used in industrial automation.
The easiest way to remember the difference is:
- PNP = Sourcing = Switches +24 V
- NPN = Sinking = Switches 0 V
Once you understand the current path, identifying PNP and NPN wiring becomes much easier.
Use the interactive simulator to switch the outputs ON and OFF, observe the lamp indications and compare how current flows through both circuits.
This simulator is a simplified educational model of PLC transistor output circuits. Actual wiring and terminal voltage behaviour depend on the module design and manufacturer specifications.
