Skip to content

This is an Internet of Things project created using Raspberry Pi to monitor the water level in a water tank and update a Web GUI or dashboard which can be monitored online

Notifications You must be signed in to change notification settings

jiteshsaini/Smart-Water-Tank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

Smart Water Tank with online monitoring dashboard (Web GUI)

Live Demo:- Watch the video on Yotube:

This is an IOT project implemented using Raspberry Pi and custom Web Application. I have revamped the Web Application code for better understanding.

As shown in the animation below, an ultrasonic sensor is fitted on top of the water tank. The sensor is connected to Raspberry Pi, which measures water level in the tank every minute. The water level reading is fed to a remote database. A Web Application running in the remote host makes use of this data to update the water level animation and the thin bar line graph.

How to use the code

water-tank

  1. This directory contains the code of Dashboard (Web GUI). It is required to be placed inside the public directory ("htdocs" or "www") of your webserver. You can install a Webserver such as XAMPP on your PC or Laptop and place 'water-tank' directory in 'htdocs' folder.

  2. Create a database with name 'water_level' using phpmyadmin utility and import the "water_level.sql" database file (present in 'water-tank' directory).

  3. Change the database connection settings in 'util.php' file as per your environment.

  4. Open browser and go to this URL "http://127.0.01/water-tank". You should see the dashboard

raspberry-pi

  1. Place this directory anywhere in your Raspberry Pi. This directory contains following files:-

    • 'sample.py' : A test program to check if you are able to communicate with the Web Application.
    • 'sensor.py' : Actual code that interacts with the ultrasonic sensor and uploads the data to Web Application.
    • 'setup_cron.sh': a bash script that helps you creating a cron task to run a python file through cron every minute.
  2. Edit the Web Server IP address in the python files as per the IP address of your Web Server.

  3. Create a cron job which runs the file 'sensor.py' or 'sample.py' every minute. So that the selected file is automatically executed every minute to upload the data to Web Application.

About

This is an Internet of Things project created using Raspberry Pi to monitor the water level in a water tank and update a Web GUI or dashboard which can be monitored online

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages