# How to detect distilled water?

I'm trying to create a circuit that detects water, however, I'm looking for a very accurate circuit that can even detect distilled water.

My current circuit uses an Arduino that has a pin constantly set to HIGH, it triggers an event when water touches two wires that shorts the circuit to ground, creating a LOW signal. Unfortunately, this only works for non-distilled water. I tested this circuit with water from my kitchen tap and it failed, which is surprising because my city uses well water and I didn't think it could be pure enough to not conduct electricity.

Is there a technique or design I can use to detect water, regardless of its purity?

• Do you need to detect the mere presence of water or measure the level in a container, for example? – JYelton Mar 28 '20 at 6:51
• Some ideas that come to mind, based on projects I've seen for this: An ultrasonic sensor to detect the water level, or a capacitive sensor. On the latter, there's an interesting video on the topic by Accidental Science, but I can't vouch for how well it would work in your application. – JYelton Mar 28 '20 at 6:59
• A float tends to be a reliable method if it is just the level of liquid. – Solar Mike Mar 28 '20 at 6:59
• Using two wires in this way is not a reliable method of level measurement. You'll also have issues with corrosion on the wires. Buy a cheap float switch - much more reliable solution which will detect all liquids regardless of conductivity! – Rohan Mar 28 '20 at 8:00
• The change in refraction in a prism or similar when water touches it can be very reliable. – Russell McMahon Mar 28 '20 at 11:42

I like Russell's suggestion of optical methods.

Another approach is a capacitance meter : water has relative permittivity of about 80, therefore measuring the capacitance between two insulated plates a fixed distance apart will show if there is some high permittivity liquid between them. It's fairly independent of water purity.

Couple of drawbacks :

• permittivity is temperature dependent (88 at 0C, 80 at 20C, 55 at 100C) so precision (e.g. using it to estimate depth, or the proportion of the plates submerged in water) would need some knowledge of temperature to compensate the error.
• Cannot easily distinguish water from other high permittivity liquids, although alcohols and hydrocarbons appear to have about half the permittivity of water
• A bit more complex than a simple resistive measurement.

Here is the type of sensor that @RussellMcMahon mentions (photo from here)

Other methods include capacitance, heat loss, and a simple mechanical float switch (usually a floating magnet operates a sealed reed capsule).

There is also the ancient one-shot flood detection method of putting an aspirin tablet in a clothespin. When the tablet dissolves, the contacts close.