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

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.

When it comes to wiring a sensor, you can think of the “N” as standing for “Negative” and the “P” as standing 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 carrying 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.

36 Replies to “Industrial Sensing Fundamentals – Back to the Basics: NPN vs PNP”

  1. nur salihah says:

    Thank you for your great article!

  2. Great. It’s clear and simple. Add explanation of push-pull output would be a bonus to the reader. Thanks.

  3. Great article. I needed a quick reference for a refresher

    1. Henry Menke says:

      Thanks for the positive feedback, tlane. It’s nice to know that you found this information helpful!

  4. Andre Bureau says:

    Thank you for the explanation, I was thinking the NPN sensors were normally used when the sensor and the PLC do not work on the same voltage. Can a 12VDC NPN sensor trigger a 24VDC NPN PLC input? Also, in dangerous environments is it probably better to have a 0VDC to activate something in case of a short circuit?

    1. Henry Menke says:

      The switching logic PNP or NPN are not related to the supply voltage of the sensor or the operating voltage of the input. Referring to the NPN wiring diagram above, note that the sensor supply voltage and the high side of the load are connected to the same point and are therefore at the same voltage.

      In hazardous or explosive atmospheres, special care must be exercised to determine the classification of the hazard and to employ components with an approved protection method certified for the classification at hand. Refer to this previous post for more information.

  5. Nadeeth Hamzah says:

    Thank you. Even a non-technical person can understand your explanation.

  6. Informative better exploration on diagrams . very good pnp non means direction of current. Good . remember diodes and how they work.

  7. Bhoopendra says:

    What are the applications for NPN and PNP sensors?

  8. CristianN says:

    Thank you for that good explanation! It was very helpful for me.

  9. good explanation, thank you sir

    1. Very clear explanation! Thank you, sir.

  10. 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?

    1. 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?

      1. Love this answer!!!

  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. 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

    1. 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

  13. MOHAMED SHARAF says:


  14. simple explanation ,you just made it clear.



  16. pretty good explanation.

    But why use this tyrpe of sensor?

    where are they required?

    whats wrong with mechanical relay?

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

  18. good for understanding for fresh engineers

Leave a Reply