Connecting a 2-Wire Proximity Sensor to a PLC: What Can Go Wrong

A two-wire proximity sensor and a PLC input form a circuit; you cannot determine electrical compatibility by looking at either device in isolation.

A two-wire proximity sensor requires a load current. A PLC’s digital input pin may not sink enough current (PNP sensor assumed). However, the system may provide just enough current to place the PLC on the edge of stability.

Refer to this prerequisite article for a discussion on characterizing PLC input characteristics. Also refer to this article for a review of PNP and NPN sensors.

Key Takeaways

  • A two-wire sensor and a PLC must be evaluated as a single circuit. Both sensor and PLC requirements must be met.
  • The PLC doesn’t get the full 24 VDC when the sensor is on: 21 VDC is a representative value when we consider the sensor’s residual voltage.
  • The sensor has a leakage current of 0.8 mA. This seemingly insignificant current causes significant problems for PLCs with high input resistance.
  • This article considers at-the-margin behavior. What works for one PLC may not work for another.
  • Expect the unexpected up to and including a PLC where the indicator LED says yes but the internal logic says no.

This article is part of the DigiKey Field Guide for Industrial Automation

Location: Understand It → Sensors.
Difficulty: :wrench: Technician — difficulty levels explained
Author: Aaron Dahlen | MSEE | Senior Applications Engineer, DigiKey, Author bio.
Last update: 01 Sep 2026


Figure 1: Image of a 2-wire proximity sensor with brown and blue wires.

As a case study we will explore the 2-wire OMRON E2E-X2D1-N proximity sensor.

Sensor Specification

We begin with the sensor’s datasheet where we learn:

  • Load current = 3 to 100 mA
  • Residual voltage = 3 VDC max
  • Leakage current = 0.8 mA

These specifications reflect the sensor’s simplified internal construction shown in Figure 2. Here, the sensor’s electronics package is represented as a block driving a PNP output transistor. It takes a minimum current to operate the electronics. Consequently, there will always be a voltage drop across the brown and blue wires. From this we can make several claims:

  • Leakage current describes the OFF state current required to run the sensor’s electronics package. This includes the always-on sensing electronics, LED driver, and transistor driver.
  • Together, the minimum load current and the 3 VDC drop describe the sensor’s ON state conditions. The voltage drop is required for continued operation of the electronics package, indicator LED, and the driver for the PNP output transistor.

Bottom line: A 2-wire sensor is not a contact. Don’t treat it like one. When on, there will be a voltage drop across it. When off, there is leakage current. The PLC does not see a clean 24 VDC or a clean 0 VDC signal.

Figure 2: Block diagram of the sensor’s electronics.

PLC Complications

The operational requirements of the two-wire sensor are not necessarily compatible with the PLC’s digital input. To illustrate, consider the wiring diagram shown in Figure 3.

PLC Input Resistance

The value of the PLC input resistance becomes the limiting factor. As an example, consider the Crouzet PLC input resistance as characterized in this article. The 11.7 kΩ current calculation for the Crouzet PLC is as follows:

I_{Sensor} = \dfrac{24 - 3}{11.7 k\Omega} \approx 1.8 mA

This is well below the sensor’s minimum requirement.

Tech Tip: The input current for a PLC is a balance between low energy consumption (high resistance) and reliable detection with switch contact closure with emphasis on the current required for dry contact wetting. This is not a universal specification. Consequently, a sensor with a 3 mA minimum load requirement will work for some but not all PLCs.

Figure 3: Wiring diagram of a PLC and a two-wire proximity sensor.

PLC Input Voltage Thresholds

The sensor’s voltage must be considered for both operating states:

  • ON state: The fact that the sensor has a residual voltage drop of 3 VDC when in the ON state requires attention. Returning once again to the representative Crouzet PLC, we see that this is a minor concern. As shown in Figure 4, a logic TRUE is associated with an input voltage above 11 VDC. In this case, the PLC sees a 21 VDC input signal relative to the return rail. This is well within the window.

  • OFF state: We must carefully consider the 0.8 mA (max) leakage in the OFF state. For our purposes, let’s assume the sensor operates as a constant current source. If, from Figure 3, we assume a 4.7 kΩ resistor in parallel with 11.7 kΩ, the resulting drop across the parallel combination is 2.7 VDC. This is well within the PLC’s FALSE window as shown in Figure 4. However, things are more interesting when the PLC’s 11.7 kΩ input resistance is the only load. As already established, this is a violation of the 3 mA minimum current requirement. The resulting voltage drop is 9.36 VDC. That places us into the undefined region shown in Figure 4. Based on the hysteresis, the PLC may detect the ON state of the sensor but not the OFF state until the voltage drops below about 9 VDC. Stated another way, we have effectively constructed a latch that will appear to randomly turn off with things like power supply fluctuations. Again, we find ourselves with a maddeningly difficult system to troubleshoot.

V_{OFF​}=0.8mA(11.7kΩ)=9.36VDC

Figure 4: Diagram showing the PLC’s logic thresholds where 11 VDC and above is a logic-1 while 9 VDC and below is a logic-0.

Mitigation

There are multiple ways to solve this problem:

  • Favor three-wire proximity sensors. The dedicated supply wires provide power to the sensor’s electronics. The sensor’s output is compatible with most PLC digital inputs. There is also a crisp near-24 VDC output voltage when in the ON state as the PNP transistor driver is derived from the rails as opposed to the residual on voltage.

  • Select components only after carefully comparing the sensor’s current requirements to the PLC’s input resistance. While this is excellent advice for greenfield installations, it may cause hardship down the road. There is a real chance that a technician will install a different sensor in the future. For example, a larger diameter sensor with increase the detection range or a sensor from a different manufacturer could be installed.

  • Select an external load resistor with a wide current margin. Don’t assume 10 kΩ is the universal load (folklore) as that only provides 2.1 mA. For this particular example, I recommend a 4.7 kΩ resistor as it is the next size down in the E3 series and sinks 4.5 mA before we even consider the PLC’s parallel input resistor. Be sure to check my numbers against the sensor’s and PLC’s datasheets as the 4.7 kΩ could be just as wrong as the 10 kΩ load resistor.

I_{Load Resistor} = \dfrac{24-3}{4700} \approx 4.5 mA

As for resistor mounting, consider using dedicated terminal blocks for a 1/4 W resistor such as the Weidmüller 1833100000 plug which installs into the 2429850000 block as shown in Figure 5.

The ON state power dissipation will be approximately 100 mW. The resistor shown in Figure 5 is rated for 0.25 W. Note that some of the resistor’s heat will be conducted through the 2.3 x 1.0 mm (measured) metal conductors in the Weidmüller plug.

Figure 5: Weidmüller plug and block with a 4.7 kΩ 1/4 W resistor preassembly (left) fully assembled (right).

Tech Tip: Observe that reliable sensor operation hinges on a few milliamps. Since our system is operating on the edge of both the PLC and the sensor, we should expect the unexpected. There are stories about PLCs that are maddeningly difficult to troubleshoot. Imagine the challenge when the local indicator LED responds to the sensor state but the PLC’s internal logic does not agree with the LED. How many PLC cards would you change before you reconsidered your approach?

This is the forge of the graybeard.

About this Author

Aaron Dahlen, LCDR USCG (Ret.), is a Senior Applications Engineer at DigiKey in Thief River Falls. His background in electronics and industrial automation was shaped by a 27-year military career as both technician and engineer, followed by over a decade of teaching.

Dahlen holds an MSEE from Minnesota State University, Mankato. He has taught in an ABET-accredited electrical engineering program, served as coordinator of an electronic engineering technology program, and instructed military technicians in component-level repair.

Today, he has returned to his home in northern Minnesota, completing a decades-long journey that began with a search for capacitors. Read his story here.