Zhejiang Xinsenzheng Automation Co., Ltd.

Industrial Sensor Manufacturer OEM & Application Support Factory-direct Supply
NPN vs PNP Sensors

NPN vs PNP Sensors: How to Choose the Right Output.

Understand the difference between NPN and PNP sensor outputs, how they connect to PLC inputs, and what information to check before ordering proximity, photoelectric or fiber optic sensors.

  • Sinking vs sourcing output explained
  • PLC input compatibility and wiring logic
  • NO, NC, 2-wire, 3-wire and 4-wire basics
  • Selection checklist for OEM and replacement orders
View Sensor Selection Guide
NPN vs PNP sensor output selection for industrial automation
Match the PLC inputThe correct sensor output depends on how the controller input is wired
NPNSinking
PNPSourcing
PLCInput match
For BuyersUseful before buying replacement or OEM sensor models
Wiring FocusedExplains output logic in practical machine terms
Error PreventionAvoid powered sensors that do not trigger PLC inputs
XSZ SupportSend wiring photos or PLC input details for model matching
Quick Answer

What is the difference between NPN and PNP sensors?

NPN and PNP describe the transistor output type of a DC sensor. The main difference is the direction of current flow to the PLC input or load.

NPN sensor output

  • Often described as a sinking output.
  • The sensor switches the load or PLC input toward 0V.
  • The PLC input commonly receives positive voltage through its input circuit.
  • Often used in systems where NPN inputs are the machine standard.
VS

PNP sensor output

  • Often described as a sourcing output.
  • The sensor switches positive voltage to the load or PLC input.
  • The PLC input commonly returns to 0V through its input circuit.
  • Common in many European and international automation systems.
Wiring Logic

Think about what the sensor sends to the controller input

For most 3-wire DC sensors, brown is power positive, blue is 0V, and black is the switching output. The output wire is where NPN and PNP behave differently.

NPN sinks current

When ON, the output path connects toward 0V. The PLC input must be suitable for this sinking output style.

PNP sources current

When ON, the output path provides positive voltage to the PLC input or load.

PLC input must match

A sensor can power on normally but still fail to trigger if the PLC input type does not match the sensor output.

Comparison Table

NPN vs PNP sensor output comparison

Use this table as a quick buyer reference when comparing datasheets or replacing an installed sensor.

ItemNPN SensorPNP SensorBuyer note
Output styleSinking outputSourcing outputMatch the PLC input type
ON-state behaviorOutput pulls toward 0VOutput provides positive voltageCheck wiring diagram, not only product name
Common wordingNPN, sink, open collectorPNP, source, positive switchingTerms vary by brand and datasheet
Typical 3-wire colorsBrown +V, blue 0V, black outputBrown +V, blue 0V, black outputColor is usually similar; output logic is different
Can replace each other?Not directly in most systemsNot directly in most systemsChanging output type may require PLC wiring changes
Selection priorityUse when the controller input is designed for NPNUse when the controller input is designed for PNPController input decides the safer choice
Replacement Orders

Replacing a sensor? Check the existing machine before choosing NPN or PNP.

If you are replacing a damaged sensor, the fastest path is to identify the installed output type and wiring method. Do not choose only by sensor shape or sensing distance.

  • Read the model label on the old sensor if it is still visible.
  • Check whether the wiring diagram shows NPN, PNP, NO or NC.
  • Confirm the PLC input module type and input common wiring.
  • Take a photo of the terminal block before removing the old sensor.
  • Match cable, connector, sensing distance and installation size together.

Old sensor model

The suffix often indicates NPN, PNP, NO, NC or cable type, but naming rules differ by brand.

PLC input common

The input common wiring helps reveal whether the system expects sinking or sourcing signals.

Terminal photo

A clear photo of brown, blue and black wires can prevent wrong replacement orders.

PLC Matching

The PLC input side decides whether NPN or PNP is correct

When buyers say a sensor is not working, the sensor is often powered correctly but the output is not compatible with the PLC input circuit.

Check 2

Input common wiring

The common terminal connection is a practical clue to whether the input expects positive or negative switching.

Check 3

Voltage level

Confirm the sensor supply voltage and PLC input voltage range before connecting the output wire.

Check 4

Input current

The sensor output capacity and PLC input load must be compatible for stable switching.

Check 5

Logic setting

The PLC program may expect signal ON when the target is present or absent.

Check 6

Field standard

OEM machines often standardize NPN or PNP across the whole machine to reduce maintenance errors.

NO and NC

NPN or PNP is not the same as NO or NC

NPN/PNP describes the output transistor type. NO/NC describes the output state when the target is detected or not detected. Buyers need to confirm both.

NPN or PNP

  • Defines the electrical switching direction.
  • Must match the controller input circuit.
  • Usually selected according to machine wiring standard.
  • Wrong choice can prevent the PLC input from turning ON.
+

NO or NC

  • Defines the output state relative to target presence.
  • NO often turns ON when the target is detected.
  • NC often turns OFF when the target is detected.
  • Wrong choice can invert the machine signal logic.
Wire Count

Do not confuse output type with wire count

Industrial sensors may be 2-wire, 3-wire or 4-wire. The wire count affects installation and replacement compatibility.

Sensor wiringTypical useWhat to confirmReplacement risk
2-wire sensorSimple series connection with loadAC or DC version, leakage current and voltage dropMay not replace a 3-wire sensor directly
3-wire sensorMost common DC NPN or PNP sensorsBrown +V, blue 0V, black output by common conventionNPN and PNP versions are not interchangeable
4-wire sensorNO and NC outputs in one sensor or dual output optionsWhich wire is NO, which wire is NC and output typeWrong output wire can invert signal behavior
Connector typeM8, M12 or custom connector systemsPin assignment, cable length and straight or angled connectorSame connector shape can have different pin functions
Product Scope

Which sensor products commonly need NPN or PNP selection?

NPN and PNP output selection is common across many DC industrial sensor families, especially when connecting to PLCs, counters or machine controllers.

Proximity sensors

Inductive, capacitive, analog-adjacent and special proximity sensors often offer NPN or PNP switching outputs.

Photoelectric sensors

Through-beam, retro-reflective, diffuse and background suppression sensors commonly require output selection.

Fiber optic amplifiers

The amplifier provides the switching output, so the amplifier output type must match the PLC input.

Magnetic switches

Pneumatic cylinder switches may have different output types, wire counts and connector options.

Color mark sensors

Packaging and printing applications need correct output logic for registration or mark detection.

OEM sensor sets

For repeat orders, standardizing the output type reduces wiring errors across machines.

Selection Workflow

How to choose NPN or PNP before ordering

Use this simple order when selecting a new sensor or replacing an installed model. It keeps wiring compatibility ahead of product appearance.

01

Check controller input

Confirm whether the PLC or controller input expects NPN or PNP signals.

02

Confirm output logic

Select NO, NC or dual output according to the machine signal requirement.

03

Match the sensor model

Then choose sensing distance, shape, cable, connector and environmental rating.

Avoid Wrong Orders

Common NPN and PNP sensor selection mistakes

Most output problems can be avoided by checking controller input and wiring logic before selecting the model suffix.

Risky approach

  • Choosing by appearance, thread size or sensing distance only.
  • Assuming NPN and PNP versions are interchangeable.
  • Replacing a 3-wire sensor with a 2-wire sensor without checking leakage current.
  • Ignoring whether the signal should be NO or NC.
  • Using a cable connector without checking pin assignment.
VS

Better approach

  • Start with PLC input type and wiring diagram.
  • Confirm output type, output logic and wire count together.
  • Use the old model number or terminal photo for replacement orders.
  • Check the controller program expectation before changing NO or NC.
  • Standardize one output type for OEM machine series where possible.
Troubleshooting

Sensor powered on, but the PLC input does not change?

If the sensor indicator turns on but the controller does not receive the signal, check output compatibility before assuming the sensor is faulty.

Power LED is on

Likely cause: Power wiring is correct but output type may not match the PLC input.
First check: Confirm NPN or PNP compatibility.

PLC input stays OFF

Likely cause: Output wire is connected to the wrong input circuit or common terminal.
First check: Review the PLC input module wiring.

Signal is inverted

Likely cause: NO and NC logic is different from the machine program expectation.
First check: Confirm target-present signal logic.

Works on bench test

Likely cause: Test load wiring differs from the actual PLC input wiring.
First check: Test with the real controller input.

Replacement does not work

Likely cause: Similar housing but different output type, wire count or connector pinout.
First check: Compare full model suffix and wiring diagram.

Multiple sensors fail

Likely cause: Machine standard or common wiring is misunderstood.
First check: Verify one known-good sensor on the same input module.

XSZ support for NPN and PNP sensor output selection
Get Wiring Support

Send these details before ordering NPN or PNP sensors.

For replacement or OEM orders, a few wiring details help XSZ recommend the correct output type and avoid field installation problems.

PLCInput module model, input common and voltage
SensorOld model number, NPN/PNP, NO/NC and wire count
WiringTerminal photo, cable color and connector pinout
TaskTarget type, sensing distance, environment and quantity
FAQ

NPN vs PNP Sensors FAQ

What is the main difference between NPN and PNP sensors?
NPN sensors provide a sinking output that switches toward 0V. PNP sensors provide a sourcing output that switches positive voltage to the PLC input or load.
Can I replace an NPN sensor with a PNP sensor?
Usually not directly. The PLC input wiring and input type must match the sensor output. Replacing NPN with PNP may require wiring or input module changes.
Which is better, NPN or PNP?
Neither is universally better. The correct choice is the output type that matches the controller input, machine wiring standard and maintenance requirements.
Is NO or NC the same as NPN or PNP?
No. NPN and PNP describe the electrical output type, while NO and NC describe whether the output is normally open or normally closed relative to target detection.
What information should I send to choose the correct output?
Send the PLC input type, input common wiring, supply voltage, old sensor model number, wiring diagram or terminal photo, and whether the machine needs NO or NC output.
Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar
Compare