I'm trying to measure the resistance of water. My first attempt was to just use a voltage divider and measure the voltage between the water and a known resistance using the ADC on a microcontroller. The resistance of the water changed while measuring, probably because the electrodes are displacing the ions.
I think using a PWM signal with a virtual ground will solve this, though I have to filter out the PWM signal before measuring with the ADC. The problem is that the filter circuit affects the voltage divider, and always stabilizes at 2.5V no matter the resistance of the water.
The circuit I'm testing:
Is there another way to filter out the frequency of the PWM after the voltage divider, so I can measure the DC level on the ADC?