I've been attempting to design a circuit that will observe a connector and light an LED when there is a sensor connected to the connector. The LED will be off when the connector is left open.

The sensors that plug into the connector are 4-20 mA loop (aka process) sensors such as [this one.](https://autosen.com/en/Process-Sensors/Flow-sensors/Vortex-flow-sensor-G3-4M-AS007). On the PCB, the connector for the sensor is in series with a 130 Ω resistor, which allows an ADC to measure the voltage and calculate the current.

I did not want the LED circuit to interfere with the current output of the sensor, as this would of course interfere with the readings, so I opted to use an op-amp that had a very high input impedance. I came up with this circuit (the current source is in place of the sensor):

[![Comparator op amp circuit design](https://i.stack.imgur.com/HSmvg.png)](https://i.stack.imgur.com/HSmvg.png)

I expected the voltage across the 130 Ω resistor (V+) to be approximately 0.52 V when the sensor is connected and outputting 4 mA, and the voltage at V- to be 0.45 V, therefore lighting the LED when the sensor is connected.

When I built this circuit, I used a [TL071](https://www.ti.com/lit/ds/symlink/tl071.pdf?ts=1669126930957&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTL071) as it's what I had handy. The LED was permanently lit, whether I disconnected the sensor or not. I can't figure out why, but I sense (forgive the pun) that I'm overlooking something very simple.

Does anyone have any suggestions? Perhaps the op-amp is unsuitable, or maybe there's an altogether simpler way of detecting the connection.

EDIT: I powered the op-amp at VCC- -> 0 V and just now figured that might be the problem, as Vout won't have reached 0 V. Can anybody confirm that this is the problem?