The dashboard displays real time water level of my house's overhead tank. Tank level is updated every minute on arrival of sensor data from Raspberry Pi. The graph (below the tank animation) plots the water level readings for a selected date. Y-axis indicates the volume of water in the tank and X-axis denotes hour of the day
Since the real-time data changes marginally in a minute, you may find no change in the tank level. To appreciate the tank animation, check out this simulation. Or, just check this page again after few hours to notice the change.
Real Time Tank Level
You can replicate this Web GUI on a local webserver running on your LAN.
Watch this Video
Download Source Code
Read Full Article
Comments
Hi! sorry, I can't get the database to receive the data from the sensor, what could be causing this?
I hope you have updated the util.php file with credentials of your the database
Yes, I did, but it doesn't work.
Hello Mr Jitesh,
It is a great pleasure to come across your channel, this project of yours is awesome.
This is all that I have been searching for, I am looking to link it to Mycroft where it can announce the readings.
I would like to ask, for your YouTube video demonstration where you used a small bottle to showcase your application. Is this source code any different from what you have on your website? If yes, Do you have a place where we can access to the source code?
I tried to replicate the project step but for some reason, I am having issues such as the followings in sensor.py
1. It doesn't send the data to the MySQL page(I am using Xammp which I belived it's what you used)
2. result from the IDE are -negative readings
3. What is the purpose of the k and x
Is it because I am using Xammp?
Your Assistance is very much required.
God Bless
Mikel
Hi Mikel, i replied your email. I removed variable K from the code. and x is just to run the for loop 20 times. Actually, i am taking 20 readings from the sensor and then calculating the average to get a more accurate reading. Hope it simplifies the code and you should not get negative readings.
Hi and thank you for sharing the very useful project :)
Question: If I need to scale it up to monitor 5 tanks, what should be done? I guess that I would have to 1) connect each sensor to separate GPIO pins, 2) modify in some way the database and the webGUI code, 3) Create 5 cronjobs. Can you give an example of this project can be used to control multiple tanks? Thank you :)
If you want to monitor multiple tanks, you can have a look at this project
https://helloworld.co.in/demo/water-tank-widget/
But if you want to scale this project for 5 tanks, you are almost correct. you need to have 05 python scripts running on RPi through 05 cron tasks, each recording data from respective sensor and sending to the common database table. Just add a column, say sensorID, in level_log table to identify from which python script the data is coming.
https://github.com/jiteshsaini/Smart-Water-Tank
yes. Raspberry Pi Zero with wifi will do the job
The web part of this project is created using PHP and Mysql.. So, your hosting provider need to support that.
Ultrasonic distance sensor HC-SR04 is used in this project.
Every sensor has a different interface. You need to see the data sheet of the sensor to figure out the necessary details. But you can easily find the sample Python scripts for commonly available sensors on internet.
You mean tank level animation.. just ensure that you are connected to internet. The fusion chart APIs are fetched from internet and resposible for tank animation
I am coming from youtube video. I have a project ongoing of personal food computer and I needed to monitor the tank's water level, I will be trying to apply this solution and add it to my project. Thank you.
Great... All the best for your project.
Yes you can. It has wifi and ethernet stack built in. So it should be able to perform this task
Hi Maxi, Thanks. I have uploaded the source code. You can have a look at it here. You need to have a Webserver to use this code. That Webserver can be on a home pc / laptop also as shown in the video. You can contact me at jitesh@helloworld.co.in
Great.. All the best
post your comments here