When you look at a proximity sensor, it can be either PNP or NPN, and both types may look exactly the same from the outside. The real difference lies in how they behave inside the circuit. To identify whether a proximity sensor is PNP or NPN, you first need to know how each one works.
An NPN proximity sensor is also called a sinking type. It works by connecting the output to the negative side of the circuit when it detects an object. So, when the sensor senses a target, the current flows from the load into the sensor and then to the ground. On the other hand, a PNP proximity sensor is called a sourcing type. It does the opposite — when it detects an object, it sends positive voltage through its output wire to the load. In simple words, NPN pulls the signal down to the ground, and PNP pushes the signal up to the positive side. That’s the main difference, and once you know this, identifying them becomes very easy.
Now, if you have a sensor in your hand and you are not sure which type it is, the first thing to do is check the label or marking on the sensor body. Manufacturers usually print “PNP” or “NPN” directly on it. But if the label is missing, you can test it with a small setup. Connect the brown wire to the positive supply and the blue wire to the negative. Then, use a small indicator light or a multimeter between the output wire (usually black) and the positive or negative terminal. If the light turns ON when the object is detected and the output is connected towards the negative side, it’s an NPN sensor. If it lights up when connected to the negative terminal, then it’s a PNP sensor. This simple test tells you exactly which type it is without needing any special tools.
In real-world use, NPN sensors are more common in Asian-made machines, while PNP sensors are widely used in European systems. The important thing is to match the sensor type with your control system. If your PLC or input device expects a PNP signal and you connect an NPN sensor, it won’t work correctly. So always identify the sensor type before wiring it, and remember this rule in simple words — NPN connects to ground when active, and PNP connects to positive when active.