In electrical wiring or maintenance work, we often come across a component called a sensor. Sensors have different functions and come in various types, such as magnetic switches, photoelectric switches, and pressure sensors. However, they can be classified into two main types: PNP and NPN. What is their differences and how do we identify and connect them?
PNP and NPN generally refer to three-wire sensors. (Note: “P” represents the positive pole, “N” represents the negative pole.) The characteristic that differs between them is the output state, which is determined by the output signal, namely high level and low level. PNP outputs a high level (1), while NPN outputs a low level (0).
PNP and NPN sensors usually have three wires: the positive power supply line (24V), the negative power supply line (0V), and the OUT signal output line.
For a PNP sensor, when a signal is triggered, the OUT terminal is connected to the power supply V+ and becomes conductive, equivalent to a high level output. As shown in the diagram below (Figure 1-1),
Figure 1-1: Internal output circuit of a PNP sensor
Therefore, when there is a load, usually a PLC, the output is a 24V positive pole, which forms a circuit with the 0V negative pole through the load.
Figure 1-2: External output circuit of a sensor
In actual sensor wiring, there are usually three-wire and four-wire configurations. The three-wire connection is shown in the diagram below (Figure 1-3).
Figure 1-3: Schematic diagram of three-wire connection
The four-wire configuration simply adds an additional output line, distinguishing between normally open and normally closed. In general, the black output wire is for normally open, and the white output wire is for normally closed.
Figure 1-4: Schematic diagram of four-wire connection
For an NPN sensor, when a signal is triggered, the OUT terminal is connected to the negative power supply 0V and becomes conductive, equivalent to a low level output. As shown in the diagram below (Figure 2-1),
Figure 2-1: Internal output circuit of an NPN sensor
The wiring diagram for connecting to a PLC is shown in Figure 2-2.
Figure 2-2: External output circuit of an NPN sensor
The three-wire connection for an NPN sensor is shown in Figure 2-3.
Figure 2-3: Three-wire connection of an NPN sensor
The four-wire connection for an NPN sensor is shown in Figure 2-4.
Figure 2-4: Four-wire connection of an NPN sensor
Difference between Two-Wire and Three-Wire Sensors
1. Different working principles: Two-wire sensors function like switches and do not have the distinction between NPN and PNP, while three-wire sensors have both NPN and PNP types.
2. Different wiring methods: Two-wire sensors have two wires, one connected to the positive pole and the other to the output signal. Three-wire sensors have two wires connected to the power supply (usually brown for positive and blue for negative) and an additional wire connected to the output signal (black for normally open or white for normally closed).
Note: Two-wire sensors have a much larger voltage drop than three-wire sensors, so it is important to consider the minimum voltage requirement for the load. Two-wire sensors must be used with a load, such as PLC IO modules or relay coils. Otherwise, connecting directly to a 24V power supply may cause damage.
In conclusion, PNP and NPN sensors are commonly used in electrical wiring and maintenance work. They can be identified and connected based on their output states, with PNP sensors providing a high-level output and NPN sensors providing a low-level output. Both types typically have three wires – positive power supply, negative power supply, and an output signal line.
For PNP sensors, the output is connected to the positive power supply when triggered, forming a circuit with the negative power supply through the load. The wiring can be done using three or four wires, with the additional wire distinguishing between normally open and normally closed.
In contrast, NPN sensors connect the output to the negative power supply when triggered, forming a circuit with the positive power supply through the load. The wiring options for NPN sensors are similar to those of PNP sensors.
It is important to note the difference between two-wire and three-wire sensors. Two-wire sensors function like switches and do not have the NPN and PNP distinction, while three-wire sensors have both types. Two-wire sensors require careful consideration of the voltage drop and should be used with a load to prevent damage.
Understanding the differences between PNP and NPN sensors and their wiring configurations is essential for proper installation and integration into electrical systems.