In many applications where water is involved we need to measure water level. There are many ways of measuring water including floaters, capacitance, resistance based meters. More advanced are optical, pressure based methods. Some of them depend on properties of liquid while other are quite universal. If you want reliable method for most cases, the you should stick with non contact methods that doesn’t involve touching devices to liquid. One of great methods involve ultrasound. A simple and cheap rangefinder can do the trick pretty well. PeterHaban have constructed simple water level mater based on well known HC-SR04 Ultrasonic rangefinder module that is attached to Arduino Uno.
Ultrasonic module simply measures sound wave propagation time that consists of froward and reflected parts. By knowing time and sound speed in the air it is possible to measure the distance to the object – in this particular case to surface of water. Measurement resolution can reach below centimeter which is really great for most cases. Peter used this level meter on his rainwater harvesting tank. He added this sensor to wireless sensor node where he collects temperature, light level and now water level. All data is then sent to MySQL database for convenient storage and graphing.