I experienced the same as described in this question: A AD8603 is used as voltage follower to amplify the pH sensor signal to a microcontroller. As this opamp has a single supply and thus cannot output a negative voltage, the pH sensor is connected between a 600mV reference and the AD8603 non-inverting input (with a 1M resistor in series, as described in an Analog Devices application note).
For power supply I used vigortronix switched mode power supply modules that accept 230VAC as input and 5V for output.
Everything works as expected, except, when the pH sensor comes in contact with the liquid to be measured in a real production environment the output of the AD8603 clips to its supply voltage. The liquid (for the most part just water) runs through metal pumps that are connected to earth, so the potential of the liquid is about the same as the earth potential I'd say.
I was able to reproduce this behavior on my desk by holding a wire connected to earth in the glass with the testing liquid (pH buffer 7.0).
I replaced the vigortronix module with a simple linear power supply: transformer, rectifier, buffer capacitors and 5V voltage regulator and the problem is almost gone. I say almost, as I see a tiny fluctuation (0.1 pH at most) in the measured pH when I hold the wire connected to earth in the liquid but I'm not sure if this is caused by the wire.
I don't understand what is going on here. This circuit has no connection to earth, it is completely floating. I cannot connect earth to the ground of the circuit as that would short circuit the reference voltage (pH sensor electrode is connected to earth via liquid). But even if that was not the case, connecting earth to ground will introduce the ground loop.
What are switching power supplies doing that can cause this behavior?