When you need a mechanism to detect the water level within a container or tank, you have several different options. Most people opt for a simple float or probe that sits in the water, while others use optics to sense when the water is reaching an undesired level.
This device built by [Danilo Abbasciano] uses a Parallax Ping sensor instead. If the sensor is placed at the top of a well, cistern, or other water container, it can accurately calculate the height and volume of the fluid inside. This is done by using the Ping’s readings in conjunction with a few values already known to the user, namely the dimensions of the container.
In his implementation, the readings are relayed to a simple LCD panel for easy viewing, and a small piezo speaker is used to sound an alarm when the water level reaches a predefined threshold. This sort of measuring device can be quite useful in situations where a contact-based sensor would be subject to chemicals and corrosion, or where contamination is a concern.