3 Wire Connection of PNP and NPN Sensors

Most industrial proximity sensors (inductive, capacitive, ultrasonic and photoelectric) are solid state.

The term solid state refers to the type of components used within the sensor. Solid state electronic components such as transistors or MOSFETs are used to switch the output of the sensor upon detection of an object.

Two specific types of 3 wire sensors are available: PNP and NPN. The difference is a result of the internal circuit design and type of transistors used. A key point to observe is that PNP and NPN has nothing to do with whether the sensor is normally open (N/O) or normally closed (N/C), i.e. a PNP sensor may be either N/O or N/C as can an NPN be either N/O or N/C.

Please note that the subject of this article is specifically related to wiring PNP/NPN outputs for sensors, not to give a detailed understanding of transistor technology. A PNP is connected to the positive supply, which “sources” current from the positive through the sensor and back to ground. A NPN is connected to ground which, when activated, allows current to flow from the load to ground which can be looked at as “sinking” current.


Why two types?

The selection of a PNP sensor verses an NPN sensor is determined by the nature of the circuit the device is to be used in. When used in a traditional relay type control circuit, it is normally possible to use either the PNP or the NPN type of sensor as shown below. PNP sensors tend to be more commonly used.

Wiring

Traditional relay type control circuit:

Use with a programmable logic controller (PLC).

When selecting a sensor to be used with a PLC, it is very important that the sensor matches the type of PLC input card to be used.
Two types of input cards exist, those that ‘sink’ current (also known as positive logic) and those that ‘source’ current (also known as negative logic). It is worth mentioning, that whilst the terms sinking / sourcing and positive / negative logic are well known in some industries, they are not always commonly used terms. It is therefore important to identify the type of sensor to be used with the PLC card based on the PLC manufacturer’s documentation and / or wiring diagrams.

Most common in Europe is the ‘sinking’ type of input, these will be used with the PNP sensor as shown below. Less common nowadays are input cards that ‘source’, these were popular in Asia and require the NPN type of sensor in order to operate correctly. Many modern PLC input cards can be configured and wired to be either ‘sinking’ or ‘sourcing’ although it will usually necessitate all inputs on a particular input card being configured the same.

NOTE the dotted lines in the following diagram is optional and may or may not be required, depending on your hardware/setup. The key wires to take note of are solid red, black and blue wires.

Source - Schneider Electric FAQ - What is the difference between PNP and NPN when describing 3 wire connection of a sensor?


PNP Outputs

Also referred to as a sourcing output, a PNP output provides the current to the attached load. The electrical load is connected between the sensor output and the negative (common) side of the power supply. The output voltage is the same as the supply voltage.

Line diagram of PNP (sourcing) output circuit with brown wire on top, blue wire in middle connected to black wire on bottom with load

NPN Outputs

Because they provide the ground to the circuit, NPN outputs are also known as sinking outputs. In this case, the electrical load is connected between the sensor output and the positive side of the power supply. The output voltage is a ground signal. In NPN outputs, the current flows opposite that of PNP outputs.

Line diagram of NPN (sinking) output circuit with blue wire on top, brown wire in middle connected to black wire on bottom with load

The Different Sensor Output Types

Different sensors will have different types of outputs. Bipolar sensors contain both PNP and NPN transistors in a dual output configuration. If you’re not sure which output type you need, you can connect one or the other. Only one output, however, is typically connected to the PLC.

Sensors with complementary outputs will be either PNP or NPN. These devices have two output wires, one being open and the other being closed.

A push-pull output contains both PNP and NPN output transistors on the same circuit. If the circuit is on and sending a PNP signal, it will send an NPN signal when turned off (and vice-versa). Sensors with a push-pull output have a polarity setting that allows the user to choose which output is active when the sensor actuates.

When to Use PNP and NPN

Depending on what part of the world you’re in often dictates what type of discrete output you’ll use. In Asia, roughly 90 percent of outputs use NPN. In Europe, about 90 percent of outputs are PNP. In the United States, there is about a 60/40 NPN to PNP split.

A PLC will be looking for either a PNP or NPN signal, so make sure you are using the correct sensor output to match the particular signal the PLC requires for your specific application. This information will be in the PLC documentation and wiring diagrams.

Source - Banner Engineering - PNP vs NPN: What Makes These Outputs Different


DigiKey Products

Click Here for DigiKey Sensors
Click Here for DigiKey PLC Products
Click Here for DigiKey Industrial Automation and Controls
Click Here for DigiKey Industrial Supplies