Understanding Two-Wire Proximity Sensor Fundamentals
Two-wire proximity sensors are among the most common and cost-effective solutions for object detection in industrial automation. Unlike their three-wire or four-wire counterparts, these sensors simplify installation by combining the power supply and the switching signal into just two wires. This design inherently means the sensor itself consumes a small amount of current, known as the residual current or leakage current, even when in the "off" state. This characteristic is crucial for understanding their wiring and compatibility with programmable logic controllers (PLCs) and other control devices. They are available in both AC and DC versions, with DC types being more prevalent in modern control systems. The fundamental principle involves the sensor drawing operating power from the same loop it uses to switch the load, making correct wiring and load calculation paramount for reliable operation.

Key Components and Wiring Diagram Overview
A standard setup for wiring a DC two-wire proximity sensor involves a few key components: the DC power supply (commonly 10-30V DC), the sensor itself, and the load, which is typically the input module of a PLC. The wiring is inherently series-based. One wire from the power supply connects to the brown (or sometimes red) wire of the sensor, which is universally designated as the positive (+) lead. The other wire from the sensor, typically blue or black, is the signal/output wire. This blue wire does not connect directly to the power supply's negative terminal. Instead, it connects to one terminal of the load (e.g., the PLC input channel). The completion of the circuit is achieved by connecting the other terminal of the load back to the negative (-) terminal of the power supply. This creates a complete loop where the sensor acts as a variable switch controlling current flow to the load.
Step-by-Step Wiring Procedure for DC Sensors

Begin by ensuring the power is completely disconnected and locked out. First, identify the sensor's specifications, particularly its operating voltage range and nominal switching current. Connect the positive lead from your DC power supply (e.g., 24V DC) to the brown wire of the sensor. Next, take the blue (output) wire from the sensor and connect it to the positive terminal of your load device. For a PLC sinking input module, this is the specific input point (e.g., I0.0). Finally, connect the negative terminal of the load (the common terminal of the PLC input module) back to the negative terminal of the DC power supply. It is critical to verify that the load's impedance is within the sensor's specified limits. If the load resistance is too high, the sensor may not receive enough operating current; if it is too low, excessive current could damage the sensor.

Critical Considerations for Load Compatibility
The most common pitfall in two-wire sensor installation is neglecting the load current requirements. The sensor has a minimum operating current (typically 2-5 mA) and a maximum switching current (often 100-200 mA). The connected load must draw a current within this window when the sensor is "on." If the PLC input or relay coil has an impedance that draws less than the sensor's minimum current, the sensor may not turn on fully, leading to a weak signal or chattering. Conversely, exceeding the maximum current will damage the sensor. Always consult both the sensor datasheet and the load device's specifications. Many modern PLC input modules have a sufficiently low input impedance, but it is not guaranteed. Using a pilot relay or an external resistor in parallel with the load may sometimes be necessary to ensure the current falls within the correct range.
Addressing Leakage Current and PLC Inputs
As mentioned, a two-wire DC sensor allows a small leakage current (usually less than 1.5 mA) to flow even when no target is present. While this current is minimal, it can be enough to weakly energize a high-impedance PLC input, causing it to register a false "ON" signal. To mitigate this issue, several strategies are employed. First, ensure your PLC input module is designed for two-wire sensor compatibility, often labeled as "leakage current immune." If using a standard input, a bleeder resistor (or power-off resistor) can be installed in parallel with the PLC input. This resistor, typically in the range of 10-20 kΩ, provides an alternative path for the leakage current, preventing it from charging the input circuit's capacitance and triggering a false state. Calculating the correct resistor value involves Ohm's law based on the PLC's threshold voltage and the sensor's specified leakage current.
Troubleshooting Common Wiring Issues
Several symptoms can indicate wiring