The 3 kΩ in series with the switch in the circuit represents a metal probe that gets connected to ground when water is present (switch open = no water; switch closed = water).
Due to the metal probe starting to corrode I need to use a bi-polar square wave (approx. -2.5 V to 2.5 V) to drive the resistor divider/metal probe. I achieved this by adding a differentiator circuit on the output of a 555. The output of the resistor divider is fed into a rectifier circuit to have a DC signal again. That DC signal is then fed into a unity-gain buffer to be able to read the value on an ADC, and also fed into a comparator to read the signal on an I/O pin. The op-amp used is an LMV324.
Problem: The op-amp circuit begins to work only when an oscilloscope probe (set to 10x) is connected to the input of the op-amp. With a probe on the input I can at least see values on the ADC and get an accurate reading on the I/O pin.
I assume if I were to use a 10 MΩ resistor to ground on the input signal of the op-amp it would fix this issue, but can someone explain why this is happening? I am relatively new to using op-amps.
Note: Everything up to the input of the op-amp has been tested and works as expected!