My neighbour and I share a set of water tanks - 2 units of 750 gallon tanks. Without any warning, the rate of water consumption seemed to have increased. Instead of having to pump water up once in two days, it became twice a day - morning and evening daily.
I got worried because of the impact on electricity cost and wear and tear on the pumps themselves. There are two possible reasons for this: increase in our water consumption or a leak from the piping system.
The former is easier to swallow than the latter which may require "breaking up" the building to access the pipes buried in the walls
IoT to the Rescue
How can technology help? How can IoT point to the root cause of this simple yet expensive problem? (solution may even be more expensive or not solving a leak on time may even be so so expensive)
How many litres of water did we consume daily? When did we consume the water most - morning, afternoon or evening? So, how many litres were we consuming before and now?
I certainly did not have answers to these questions.
Let me start by using IoT to measure the quantity and pattern of water usage.
I got worried because of the impact on electricity cost and wear and tear on the pumps themselves. There are two possible reasons for this: increase in our water consumption or a leak from the piping system.
The former is easier to swallow than the latter which may require "breaking up" the building to access the pipes buried in the walls
IoT to the Rescue
How can technology help? How can IoT point to the root cause of this simple yet expensive problem? (solution may even be more expensive or not solving a leak on time may even be so so expensive)
How many litres of water did we consume daily? When did we consume the water most - morning, afternoon or evening? So, how many litres were we consuming before and now?
I certainly did not have answers to these questions.
Let me start by using IoT to measure the quantity and pattern of water usage.
- Our IoT tools are: A Raspberry pi (or Pi Zero) and Python is our programming language
- A laser precision "ruler" to measure the diameter and height of tanks
- Ultrasonic Range Sensor HC-SR04
- Float switch to ensure tank does not get too full and damage the ultrasonic range sensor
This project is rather a simple one with the following steps:
- Use the ruler to determine the diameter and height H of the tank. This article presumes a cylindrical tank. If you use a cube /cuboid tank, kindly adjust the volume formula as such. The following links can help you.
- Volume of the cylinder =
- The H is the height of the tank from the position of the sensor to the base and h is the distance measured by the ultrasonic sensor with the Raspberry Pi.
- The sensor works based on the principle of reflection of ultrasonics. The sensor simply records the time t it took the burst of ultrasonics to hit the water surface after traversing distance h and reflect back. Ultrasonics travel at 34,300 cm/s speed.
- Distance h = (velocity x time)/2 = (34,400 x t )/2 . Note that the ultrasonic would have traversed the distance h twice within the time t reported thus necessitating the division by 2.
A python script was written to read the time t and compute height h and volume on the raspberry pi every 15 minutes to create a 96-point daily curve (there are 96 occurrences of 15 minutes in a day). This was then saved into a MySQL table.
A graphing application plotly was used to analyse the data.
Guess what we found, volume was consistently reducing even between midnight and 5am when everyone was sleeping. There was a leak in the tank!!!!!!!
Oooose.
ReplyDeleteOmalicha!
ReplyDeleteThis is interesting. Kudos to that solution.
ReplyDeleteThanks guys!!!
ReplyDeleteInteresting write-up sir... brings the next question; how can IOT stop future leakage-occurences?
ReplyDeletesmiles
Imagine a nanite (nano machine) that can crawl to the leak point - small enough to follow the directional flow of water and spins a web using nano threads to close the leak. If we can imagine it, then it can be built
Delete