04/06/2026
Understanding PNP and NPN Sensor Wiring‼️
This diagram explains how to wire two of the most common types of 3‑wire sensors used in marine and industrial systems: PNP and NPN proximity sensors. Both start with the same basic power setup: an SMPS, or Switch Mode Power Supply, converts standard 230V AC power into stable 24V DC, which is safe and suitable for control circuits. For both sensors, the brown wire always connects to the positive supply, and the blue wire always connects to the negative or common supply. The main difference lies in how the black output wire works, which determines how you connect the load, such as an indicator light or alarm.
A PNP sensor is often called a “positive switching” or “sourcing” sensor because when it detects an object, it acts like a switch that connects its output to the positive 24V line. This means it sends out a positive voltage signal. To wire it correctly, the sensor’s black output wire connects to the positive side of the light or load, while the negative side of the load connects directly back to the power supply’s negative terminal. When activated, the sensor supplies power to complete the circuit and turn the light on.
On the other hand, an NPN sensor works in the opposite way; it is known as “negative switching” or “sinking.” When it detects something, it connects its output to the negative or 0V line instead. For this type, the black output wire connects to the negative side of the load, while the positive side of the light is connected straight to the 24V positive supply. When triggered, the sensor creates a path to ground, allowing current to flow through the load and turn it on. Mixing these two types up is a very common mistake, and while your voltage readings might look correct at first glance, incorrect wiring will stop the system from working properly, similar to how hidden resistance in terminals can cause faults even without visible damage.
The bottom section of the diagram shows how these sensors fit into a complete control system using a PLC, or Programmable Logic Controller, which acts as the brain of modern automated equipment. The same SMPS provides power to the PLC, the HMI or display screen, and the control buttons. Signals from sensors and start/stop buttons go into the PLC, which processes the information and sends commands through a relay card to safely control larger electrical devices like motors or alarms. This setup is standard on board ships, helping to ensure navigation, safety, and machinery systems operate reliably and efficiently.