.
New Article: ESP32 online Web Remote Watch: Video

Live Demo: Smart Water Tank

  share with someone if you find it useful

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

  • from Jennifer , 2 years ago

    Hi! sorry, I can't get the database to receive the data from the sensor, what could be causing this?

    • from Spark , 2 years ago

      I hope you have updated the util.php file with credentials of your the database

      • from Jennifer , 2 years ago

        Yes, I did, but it doesn't work.

  • from Mikel , 2 years ago

    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

    • from Spark , 2 years ago

      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.

  • from freakqnc , 2 years ago

    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 :)

    • from Spark , 2 years ago

      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. 

  • from awil ahmed suliman , 3 years ago
    bro can i get its articles
  • from vacano , 3 years ago
    Fantastic project! Do you think the Raspberry Pico can do the job too ? I would love to use one that I have laying around for a while.
    • from Spark , 3 years ago
      No, Raspberry Pico doesn't have wifi ethernet. It cannot send data to a remote web server
  • from Aashish Manandhar , 3 years ago
    I want to know the used code for this system
    • from Spark , 3 years ago

      https://github.com/jiteshsaini/Smart-Water-Tank

      • from Malk , 3 years ago
        hi sir why did you delete your content on github?
        • from Spark , 3 years ago
          Not deleted. It's there
  • from Hussain , 3 years ago
    Would raspberry pi zero suffice fornthis?
    • from Spark , 3 years ago

      yes. Raspberry Pi Zero with wifi will do the job

  • from Claude Nshokano , 3 years ago
    Hello, I need to do make this project but with an other cloud like cloud4RPi or Google Cloud. How can I proceed for that ???
    • from Spark , 3 years ago

      The web part of this project is created using PHP and Mysql.. So, your hosting provider need to support that. 

  • from , 3 years ago
    NICE
  • from Pramit , 3 years ago
    Excellent project I will build by following your guidelines Can you share what exact sensor you used (it's part number) If I want to add humidity and temperature sensors and amonia or nitrogen sensors to pi what all changes required.
    • from Spark , 3 years ago

      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.

  • from intj , 3 years ago
    wonderful project . i have a problem in simulation portion .. cant detect realtime animation..
    • from Spark , 3 years ago

      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

  • from , 3 years ago
    good
  • from Naziha , 4 years ago
    Hey,
    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.
    • from Spark , 4 years ago

      Great... All the best for your project.

  • from bob , 4 years ago
    can we use nodeMCU instate ?
    • from Spark , 4 years ago

      Yes you can. It has wifi and ethernet stack built in. So it should be able to perform this task

  • from maxi , 4 years ago
    sir, your project is very nice. i have not knowledge about how to upload the code which get from fusionchart. what are the software use for it?please give me your mail adress.
    • from Spark , 4 years ago

      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

      • from Maxi , 4 years ago
        Thank you sir.
        • from , 4 years ago
          sir, i download your codes and extract them.now i dont know what to do?please explain in step by step.thank you.
  • from raghu , 4 years ago
    nice
  • from bingo , 4 years ago
    bogo
  • from Abdellah , 4 years ago
    Bonjour, Merci pour l'animation et la vidéo sur YouTube. Je vous demande de bien vouloir étudier la possibilité de faire un nouveau code Python en utilisant la librairie "GPIOZERO". Merci de me répondre sur l'adresse: abdellah.drissi@gmail.com
  • from Rajesh Jaswal , 4 years ago
    Awesome ... i have it rigged up PI level an working ... the linking up to DB/Portal is yet to be done
    • from Spark , 4 years ago

      Great.. All the bestyes

  • from Spark , 4 years ago

    post your comments here

Post Comments