An electrical circuit for measuring the resistance of a liquid between a first and second electrode, the first electrode connected to a first terminal Vta of the electrical circuit, and the second electrode connected to a second terminal Vtb of the electrical circuit, comprising: a capacitor C1 connected on a first end to the first terminal and a capacitor C2 connected on a first end to the second terminal a known reference resistance Rref connected on a first end to a second end of capacitor C1 switching means for connecting either a) a first reference voltage V+ to a second end of Rref, and a lower second reference voltage V- to a second end of C2 to form a first switch configuration or b) the first reference voltage V+ to the second end of C2 and the lower second reference voltage V- to the second end of Rref to form a second switch configuration and measuring means for measuring a voltage Vsense at the connection between C1 and Rref wherein the electrical circuit is configured to determine the value of the resistance of the liquid based on the known reference resistance Rref and the observed voltage Vsense for each of the first and second switch configurations.