Skip to main content

IoT in the home: Liquid Volume Measurement

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.
  1. Our IoT tools are: A Raspberry pi (or Pi Zero) and Python is our programming language
  2. A laser precision "ruler" to measure the diameter and height of tanks
  3. Ultrasonic Range Sensor HC-SR04 
  4. 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 = 
     where r = half of the diameter (d)
  • 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.
  • Volume of water in tank is then computed as
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!!!!!!!


Comments

  1. This is interesting. Kudos to that solution.

    ReplyDelete
  2. Interesting write-up sir... brings the next question; how can IOT stop future leakage-occurences?
    smiles

    ReplyDelete
    Replies
    1. 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

Post a Comment

Popular posts from this blog

IoT in Security: Visitor Car Register

During the 2017 Christmas holiday, I went to Ibadan . I drove through University of Ibadan , the premier University in Nigeria. At the main gate of the institution, a security guard on duty handed me a plastic "tally" as a proof of entry. I think another copied down my car plate number. I drove through the school: passed by the famous Trenchard Hall, the University Bookshop, the Our Lady Seat of Wisdom Catholic Church,  the Chapel of Resurrection , the Abadina Schools and exited through the gate on Abadina Road. At the gate, the security guard on duty simply collected the same "Tally" I was given at the main gate and that was all. I drove off the grounds of the University. Four days later, I entered through the Abadina gate, drove through the school and exited through the main gate of the school. A few questions came to my mind: Is there any reliable information captured that says I passed through the school? 10 years from now, will there still be infor

Remote Power Management: IoT for Street Lights

Source: http://www.centrinity.com While I was running for my life, after I exited the Lekki Treadmill and jogged into Alexander Road, Ikoyi, Lagos, Nigeria, I came across a 20ft "portakabin" container that seems to be someone's place of abode. I figured out that he is the one manning the generator that powers the street lights for Alexander/Bourdillon roads. I thought to myself, what if this man's job can be performed by a series of IoT devices and this man can be gainfully employed somewhere else which will allow him sleep comfortably in a bed under a real roof. What does he do? He switches on the generator when there is no public power and switches off the generator when he is aware that public power has been restored He switches on (or ensures this) street light when it is dark   he is the first responder if there is an issue on site However, let us evaluate replacing that function totally with IoT devices: Automatic Generator Start/Shutdown: