Home Blog Blog Details

How do NPN and PNP sensors convert to each other?

June 05 2025
Ampheo

Inquiry

Global electronic component supplier AMPHEO PTY LTD: Rich inventory for one-stop shopping. Inquire easily, and receive fast, customized solutions and quotes.

QUICK RFQ
ADD TO RFQ LIST
NPN and PNP sensors are both types of transistor-based output sensors, commonly used in industrial automation for proximity, photoelectric, or other sensing applications.

NPN and PNP sensors are both types of transistor-based output sensors, commonly used in industrial automation for proximity, photoelectric, or other sensing applications. They differ in how they connect to a controller or PLC (positive vs. negative switching). Converting between them requires understanding of their wiring and signal logic.

How do NPN and PNP sensors convert to each other?


1. Difference between NPN and PNP Sensors

Feature NPN Sensor (Sinking) PNP Sensor (Sourcing)
Current flow From load to sensor From sensor to load
Switches Negative (GND) to load Positive (VCC) to load
Output type Open Collector to GND Open Collector to VCC
Typical in Japan/Asia Europe/USA

2. Why You May Want to Convert

  • Your PLC or controller only supports one type (e.g., only PNP inputs).

  • Standardizing sensor types in a mixed system.

  • Replacing a sensor with the opposite type.


3. How to Convert:

A. Use an Interface Relay

Easiest and most reliable method:

  • Use a relay or optocoupler between the sensor and input device.

  • The relay will isolate the signal and allow any type of sensor to control any type of input.

Example: Converting NPN to PNP

  • NPN sensor drives relay coil (when ON, it sinks current).

  • Relay contact connects V+ to PLC input → Emulates PNP behavior.

B. Use a Transistor Inverter Circuit

For low-cost or embedded solutions:

  • Use an NPN/PNP transistor pair or logic inverter circuit.

  • Converts sinking output into sourcing, or vice versa.

Example: NPN to PNP Converter:

  • NPN sensor output → base of PNP transistor.

  • When sensor turns ON (pulls low), PNP transistor conducts, pulling output high.

C. Use a Logic Converter Module

  • Many automation vendors sell signal converter modules that convert NPN ↔ PNP.

  • These often include opto-isolation and reverse polarity protection.


4. Important Considerations

  • Power supply polarity must match the input system.

  • Always check the input type of your PLC (sinking or sourcing).

  • Watch for voltage level compatibility (e.g., 24V vs 5V logic).

  • Some sensors can be configured as either NPN or PNP (selectable models).


 Example Conversion Diagram (Simplified):

NPN Sensor → PNP PLC Input (Using Relay):

css
 
[+24V] ─────┬─────────────┐
            │             │
         [Sensor]     [Relay]
         NPN Output → Coil
            │             │
          [GND]       Contact → PLC Input
                            │
                          [+24V]
Ampheo