I am trying to build a centre-off model railway controller, no reversing switch. I am working on the overload/short detection part of the circuit based on sensing the voltage across a 0R68 resistor. I want to trigger at about 1A, i.e. approx. 0.7V across Rsense. The current flow will be bi-directional.
The "detection" is done by two comparators using diodes to give the 0.7V references, which worked fine. My next step was to use a rail-to-rail OpAmp to invert/shift the negative pulses to positive ones. In working through a circuit in LTSpice I hit "Simulate" before I'd hooked everything up and ... it did exactly what I need! But it bugs me that the inverting input of the OpAmp is floating. When I try to connect it I cannot get the correct result.
Could someone please explain how/why this works? And am I OK to let the input float?
Diagram and waveforms below.
Thanks,
Duncan