Industrial Sensing Fundamentals – Back to the Basics: NPN vs PNP

Written by: Andrew Bollinger

What’s the difference and why should anyone care? If you’re confused by the terms PNP and NPN, then hopefully this post will shed some light on the differences between the two.  In the context of this post, they refer to the construction of a sensor’s transistor and whether it has a p-type or n-type semiconductor.

The “N” stands for “Negative” and the “P” stands for “Positive”.  With respect to sensors, an NPN device is one that can switch the negative side of the circuit while a PNP device switches the positive side.

The next question to ask is, what direction do you want the current to flow?

PNP sensors are sometimes called “sourcing sensors” because they source positive power to the output. NPN sensors are sometime called “sinking sensors” because they sink ground to the output. 

 The term “load” identifies the device the sensor powers. The load could be a lamp, pneumatic valve, relay or PLC input.



Additional Details:

Types of Discrete Electrical Outputs – The majority of sensors used today use Solid-State outputs, not mechanical relays

The drawing below shows 2 wires for sensor power and 2 for the switch. Most sensors use only 3 wires by having one wire do double duty, carrying both power and output signals. This is similar to a bathroom with only one line caring water to both the sink and toilet as opposed to individual lines for each. Solid-state discrete sensors functions similar to a switch, but current only flows in one direction. Solid-state devices are reliable, economical, small and fast. The only drawback is, that you have to know the direction of current flow. NPN and PNP are technical terms for the type of transistor used to switch the output. The type of transistor determines the direction of current flow.

For additional information about NPN-PNP devices, connections, and working with PLC’s check out the following from the Industrial Electrical and Maintenance forum.

About Mark Sippel

Mark Sippel is the North American Product Marketing Manager for Object ID and Photoelectric sensors with Balluff NA.
This entry was posted in All posts, Inductive Proximity Sensors, Photoelectric Sensors and tagged , , , , , , , . Bookmark the permalink.

14 Responses to Industrial Sensing Fundamentals – Back to the Basics: NPN vs PNP

  1. dabke says:

    good for understanding for fresh engineers

  2. Pingback: Industrial Sensing Fundamentals – Light/Dark Operate « SensorTech

  3. saran says:

    pnp type sensing explaination is good ,thank you for update this.
    +91 9952027771

  4. Jamsher Khan says:


  5. Ian says:

    pretty good explanation.

    But why use this tyrpe of sensor?

    where are they required?

    whats wrong with mechanical relay?

  6. AARON K says:


  7. alfred says:

    simple explanation ,you just made it clear.


  8. maheboob hussain says:

    Thank you



  10. Kenneth Gann says:

    I think it is explained rather well. I still have my problem… Looking for a NPN/PNP sensor that will pick up on plastic. (photoelectric) or something along that line. Trying to use older rate indicators with newer sensors. Just not happening

    • Jack Moermond says:

      Kenneth, thank you for your interest in Balluff sensors. Your application sounds very interesting, however, I think we have several different technology solutions to solve this application including capacitive and photoelectrics. I would suggest that you contact our technical support group to discuss this. Please call us at 1-800-543-8390 or email

  11. Miguel Guedes says:

    Nice website and good explanaition, however I still dont know in which situation should I use each other. They have diferences, but why should I use one instead of the other? What do I gain using one or the other?
    Does choosing PNP vs NPN have a diference while connected to a PLC? Which one is best?
    I´m a fresh electrical engineer but I studied energy prodution and transmission mainly.

  12. John B says:

    Nice explanation, however could someone explain the pros and cons of using one over the other? I typically see Japanese controls that require NPN sensors. Why wouldn’t they use PNP?

    • Henry Menke says:

      Good questions Miguel Guedes and John B. Thanks for commenting.

      Industrial automation is a field that, for all its sophistication, is sometimes slow to change and legacy methods sometimes die hard. I’ve heard two arguments advanced to explain the existence of NPN sensors.

      1) Early solid-state bipolar junction transistors were more commonly available as NPN, which were load-sinking. So early solid-state sensors were more likely to use NPN transistors in their switched outputs, so they were load-sinking.

      2) The most basic type of “sensor” was once an ungrounded hot “whisker” wire energized by a load such as a relay. The machine bed was connected to ground. When a metal part, such as a piece of sheet steel or a stamped metal part, made contact with the whisker wire, the circuit became grounded and the relay pulled in. This was a load-sinking connection.

      I’ve heard some theories about the ease of trouble-shooting PNP vs. NPN control circuits. With PNP, if a load wire shorts to ground, the short can be found relatively easily because there may be visible damage due to the higher-than-normal current that would flow in the absence of a load impedance. An unprotected, unfused sensor may also have its output blown. If the PNP sensor has integrated thermal, latching, or pulsing short-circuit protection, the existence of a short circuit condition on the load wire will be apparent at the sensor.

      In the case of a short to ground in an NPN circuit, there is no abnormal current flow; the load is simply pulled in regardless of the sensor state. This could prove to be somewhat difficult to detect, because if the sensor associated with the grounded load wire is examined, it will be found to have no fault.

      In the modern industrial world, NPN is considered more common and popular in the Asia-Pacific region simply because of legacy practice and the desire for backward-compatibility. That is, the use of NPN sensors leads to the continued use of more NPN sensors. PNP is more popular in Europe and much of North America, but note that in North America NPN is quite prevalent in Asian transplant facilities and is often found in the metal stamping industry.

      We’d like to hear from those of you out there who are experienced industrial controls experts. What’s your take on the legacy background of NPN vs. PNP sensors and the pros & cons of each approach in today’s industrial control environment?

What do you think?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s