NPN and PNP outputs: the practical difference
NPN and PNP identify the switching output of a DC sensor. A PNP output supplies current to the connected load when active, so it is described as a sourcing output. An NPN output provides a path from the load toward the negative supply when active, so it is described as a sinking output. For a proximity sensor connected to a PLC, the output type must match the input circuit and its common connection.
Choose the output after checking the PLC input documentation. Housing size, sensing distance and the colour of an indicator do not identify whether a sensor is NPN or PNP. Similar-looking sensors can have different electrical outputs and cannot automatically be exchanged.
PLC input compatibility
| Sensor output | Active-state current path | Typical compatible PLC input | Typical input common |
|---|---|---|---|
| PNP, sourcing | Positive supply through the sensor output to the PLC input | Sinking input circuit | 0 V |
| NPN, sinking | Positive supply through the PLC input to the sensor output and then 0 V | Sourcing input circuit | Positive DC supply |
Some PLC input modules support both arrangements; others have fixed input circuits or groups that share a common. Manufacturer terminology may describe either the input circuit or the type of sensor it accepts. Follow the current-path diagram and terminal assignments in the exact input-module manual before selecting the sensor.
Typical three-wire connections
On many three-wire DC proximity sensors, brown connects to the positive supply, blue connects to 0 V, and black is the switching output. These are common conventions, not a substitute for the model wiring diagram. Confirm the permitted supply range and cable or connector assignment for the exact part number.
- PNP example: connect brown to the approved positive DC supply, blue to 0 V, and black to the PLC input terminal. For a conventional sinking PLC input, the input common is connected to 0 V.
- NPN example: connect brown to the approved positive DC supply, blue to 0 V, and black to the PLC input terminal. For a conventional sourcing PLC input, the input common is connected to the positive DC supply.
- Connector versions: use the pin numbers printed in the datasheet. A three-wire cable diagram does not establish the pinout of every M8 or M12 connector.
Power down before changing connections. Verify the supply and input ratings, maximum sensor load current, polarity and shared-reference requirements. A sensor output is intended to drive a compatible input or rated load; it must not be connected directly between the supply rails.
NPN/PNP and NO/NC describe separate choices
NPN or PNP specifies how the output switches current. Normally open (NO) or normally closed (NC) specifies its logical response to a target. An NO sensor normally activates its output when a target is detected. An NC sensor normally changes from an active output to an inactive output when the target is detected. Check the manufacturer's timing chart and any startup behaviour.
Both NPN and PNP products can be available with NO, NC or complementary outputs. Replacing an NPN NO sensor with an NPN NC sensor changes the input logic even though the electrical output family matches. Record both properties in the bill of materials and confirm how the PLC programme interprets the signal.
Flush mounting is a different specification
Flush, or shielded, mounting and non-flush, or unshielded, mounting describe the sensing face and surrounding metal-clearance requirements of an inductive sensor. These mechanical characteristics do not determine whether the output is NPN or PNP. A correct electrical match can still perform poorly if the mounting arrangement is wrong.
Compare the mounting diagram, specified target material, sensing distance, hysteresis and spacing from nearby sensors. Do not assume that every sensor with the same M12 or M18 thread has the same usable sensing distance or can be embedded in the same metal bracket.
A selection sequence for replacements
- Record the complete existing sensor part number and the PLC input-module model.
- Check NPN/PNP output, NO/NC operation, supply voltage and output-current limits.
- Confirm the number of wires and whether the device is a DC three-wire, DC two-wire, AC or other sensor type.
- Compare housing dimensions, thread, cable or connector, mounting style and target distance.
- Check operating temperature, ingress protection, switching frequency and application conditions.
- Confirm the proposed wiring against both datasheets before commissioning.
Do not apply a three-wire diagram to a two-wire sensor. Two-wire devices have different connection requirements and can introduce off-state leakage current and an on-state voltage drop that matter to a PLC input.
Troubleshooting a sensor that does not change the PLC input
First confirm power at the sensor using the specified terminals and voltage range. Next check whether the sensor indicator changes when the correct target enters the specified detection zone. If the indicator changes but the PLC does not, inspect the output type, input common, input threshold and terminal assignment. Also check whether a shared input group has been wired for the other output arrangement.
An unloaded transistor output can float when inactive. A high-impedance meter reading alone does not prove that the output can drive the input correctly. Use the manufacturer's recommended test circuit and a compatible load. If the input is continuously active, check NC operation, leakage current, wiring faults and unintended metal detection before changing programme logic.
Compare models and request a quote
Browse inductive and capacitive proximity sensors and compare each model's published specifications. For a replacement enquiry, provide the existing part number, PLC input details, supply voltage, required sensing distance, mounting drawing and connection type. Compatibility should be confirmed for the exact application.
Technical references
OMRON: NPN and PNP sensor output explanation; Banner Engineering: sourcing and sinking outputs; OMRON E2E NEXT datasheet: model-specific wiring examples.