Home overhead water tanks are commonly used in areas with an inadequate municipal water supply or inconsistent supply due to power outages or infrastructure issues. They are typically installed on the roof of a building and are filled with water that can be used for domestic purposes such as bathing, washing, and flushing toilets. To refill an overhead water tank, a motor is used to pump fresh water in, either from a well, or from a municipal supply when it is available. These sources can not be counted on to deliver water of a quality that is safe for human consumption on a regular basis, so it must be monitored and treated appropriately before it is used in the household.
Aside from the source water itself, the tank also requires regular maintenance to prevent the growth of algae or other contaminants that may affect the quality of the water. Additionally, the tank must be regularly inspected for leaks or other issues that could lead to a catastrophic mechanical failure. Such a failure can cause significant damage to the building and harm to the occupants. Home overhead water tanks may be a great solution where water supplies are inconsistent, but they require a lot of monitoring and maintenance due to the myriad health and safety concerns they can raise.
Automated solutions exist that can help keep an eye on water tanks, but they tend to be lacking in many ways. Aside from being costly, they also frequently require a good deal of maintenance themselves, as being submerged in an aqueous environment wreaks havoc on them over time. Moreover, most devices are limited in what they can monitor, frequently only detecting water level. That still leaves a lot of manual inspections to the tank owner.
Electronics engineer Ashok R. recently posted a project that he created to address the problem of overhead water tank monitoring. Called Float Bot, his robotic tank monitor is ultimately planned to sense water level, water quality, temperature, motor status, and more. For the initial proof of concept, he decided to focus on water level, motor status, and recognizing when the tank lid is open. These feats were achieved simply by passing raw sensor data into machine learning models developed with Edge Impulse Studio.
The base for Ashok’s device was a pair of GoPro floating handle grips repurposed to serve as a tiny raft that floats at the top of a water tank. A Nordic Thingy:53 multi-protocol IoT prototyping development kit was installed on top of the floats. In addition to a 128 MHz Arm Cortex-M33 CPU with 1 MB of flash memory and 512 KB of RAM to power through machine learning inferences, the kit also comes loaded with tons of sensors and wireless communications transceivers. A SparkFun TFMini micro ToF LiDAR module was included for measuring the distance to objects, like the top of the tank. The Nordic Semiconductor nRF52840 DK single-board development kit was used for motor control.
The Matter protocol was used to wirelessly connect all of the components of the project. A Raspberry Pi 3 single-board computer was configured as a border router to connect all of the Matter-based devices to an external Wi-Fi network. After assembling the hardware, Ashok turned his attention to adding the intelligence to the system that would transform it into his dream water tank monitoring device.
The first step in that process involved collecting sample data to train the Edge Impulse machine learning classifiers. The nRF Edge Impulse smartphone app was linked to both the Nordic Thingy:53 and a project created in Edge Impulse Studio. After this initial setup, data collected from the Nordic Thingy:53’s sensors could be streamed to the project. This included accelerometer data (to determine motor status from wave oscillations), light sensor measurements (to check the open/closed status of the tank lid), and audio samples from the microphone (to capture the sound of air mixing with water in the pipe as the tank empties).
Separate impulses were designed in Edge Impulse Studio to analyze each type of sensor data. Ashok created simple impulses that extracted the most significant features from each type of data, then forwarded those features into a neural network classifier. He noted that by using the default parameters, he was able to get excellent results. In the case of the motor status classifier, for example, the average classification accuracy rate reached 98.5% on the first attempt. Similarly excellent results were achieved for each of the additional tasks Float Bot was to carry out.
The integration between Edge Impulse and the Nordic Thingy:53 through the nRF Edge Impulse smartphone app made short work of deploying the models to Float Bot by just tapping a few buttons. The app also gives an interface for viewing the results of inferences to verify that the system is working as expected.
Ashok put the completed device through its paces in a small tank of water, and he found that it was capable of detecting motor status, whether or not the lid was open, and also could recognize when the tank was emptying. He noted that it took a lot less time than he expected to achieve his goal because of the tight integration between all of the tools. He is planning to add more functionality in an upcoming version of Float Bot, like checking water quality and temperature.
In the future, Ashok believes that his device could also be used in agricultural storage tanks, tanker trucks, and more. Where would you put a Float Bot? What additional functionalities would that device need? It is likely easier than you think to bring that device that you have in mind to life. Check out Ashok’s project write-up for all the details that you need to get started.
Want to see Edge Impulse in action? Schedule a demo today.