Which do you love more—NPN or PNP?

This is a fun question because we get to play with context. The OP did not specify the context, so we get to answer both ways—the perfect learning moment.

We can explore transistors (Figure 1) or industrial sensors (Figure 2).

NPN and PNP transistors

The terms NPN and PNP are closely associated with transistors and their construction. For instance, the Jellybean 2N3904 is a popular NPN transistor. Its 2N3906 complement (not compliment) has a PNP construction. In this case, NPN and PNP refer to the physical construction of the transistor where N and P describe the [silicon sandwich(Transistor Basics | DigiKey) used to construct the transistor.

Figure 1: A collection of TO-92 packaged 2N3906 PNP transistors.

Tech Tip: The schematic for the NPN transistor is easy to remember as “Not pointing In.”

NPN and PNP industrial sensors

The terms NPN and PNP also apply to industrial sensors. These are typically used in conjunction with a Programmable Logic Controller (PLC).

A deeper exploration reveals that these sensors feature NPN and PNP drive transistors (or equivalent) in their output circuitry. This NPN vs PNP designation is critical, as it determines how the sensor will interface with the PLC. If the wrong part is ordered, it will take considerable effort to make the equipment operational as described in this engineering brief.

Figure 2: Panasonic proximity sensor with an NPN on the left and type PNP on the right.

Tech Tip: It’s easy to remember that the P type sensor “Pulls up" while the N types are “Negative” creatures that pull everything low.

Which do I love more?

Clearly the one that would fail without me!

There is a clear bias toward NPN transistors in education and introductory microcontroller projects. The NPN transistor is easier to understand as the collector (Not Pointing In) shares the same ground as the microcontroller. An example is included in this article featuring the assembly shown in Figure 3.

This is easy to understand as the load will be turned on when the transistor’s base is turned on. Things are more complex with the PNP, as the load will be turned on when the base is pulled low. The concept quickly escalates when the driver voltage (microcontroller) and load’s supply are different. For example, a 3.3 VDC microcontroller can turn on a 24 VDC load using an NPN transistor provided the 3.3 VDC and 24 VDC sources share the same ground. This is not directly possible using a PNP transistor as the 3.3 VDC microcontroller would need to “reach up” and control the PNP transistor’s base. Such a circuit would require an intermediate NPN transistor helper.

As for the sensors, there is an undeniable bias toward PNP devices. Technicians and engineers like to think in terms of positive logic. When a sensor is on, we expect the output to be high. For a typical 24 VDC PLC application we associate “off” with no voltage and 24 VDC with “on.” We keep things positive with the PNP senor pulling up as opposed to the negative logic with the “downer” (negative) NPN sensors.

Figure 3: Prototype of the Arduino Nano 33 IoT microcontroller driving a Schneider LC1D09BD contactor via a BDX33C Darlington transistor.

Parting thoughts

The NPN and PNP designation determines which way the current flows through the device.

Way back in the early days of electronics, we had vacuum tubes which only allowed current to flow in one direction. Engineers had many clever ways to get around this deficiency.

Today, the NPN and PNP transistor providing a liberating design experience.

Which do I love more—NPN or PNP?

Both!

Together they provide the foundation of nearly every electronics circuit.

Happy Engineering Week!

Sincerely,

Aaron

About this author

Aaron Dahlen, LCDR USCG (Ret.), serves as an application engineer at DigiKey. He has a unique electronics and automation foundation built over a 27-year military career as a technician and engineer which was further enhanced by 12 years of teaching (interwoven). With an MSEE degree from Minnesota State University, Mankato, Dahlen has taught in an ABET-accredited EE program, served as the program coordinator for an EET program, and taught component-level repair to military electronics technicians. Dahlen has returned to his Northern Minnesota home and thoroughly enjoys researching and writing articles such as this.