Why we set out to build the prototype:
Water level monitoring of overhead tanks in residential, office and community water tanks are mostly done by human monitoring and sometime with wired water level monitoring systems. Most of the time the overflowing tank is the prompt for the pump operator to switch off the motor. In large residential complexes and office complexes people are employed to operate the motor 24x7. The wired solutions are not very reliable and wireless solution like short range RF and blue-tooth do not have the range to transmit sensor data to gateways for converting to actionable information.
Cellular IoT is a workable solution to overcome the limitations of other solutions by leveraging amazon web services to offload the processing and precise smartphone dashboard monitoring of water levels to assist pump operators and the possibility of completely automating the pump operations without human assistance. Video demonstration:Goal:
This project attempts to build a cellular IoT-based solution for water level monitoring. A model of the system is included in the figure.
A separate tube is attached to the tank and a plastic ball floats inside the tube. An ultrasonic sensor placed just above the tube along with associated electronics is used to sense the distance of the ball, thereby infering the water level.
Things needed for setting up the system:
- Raspberry Pi Zero W
- Soracom SIM and Huweii 3G USB dongle (Provided as a part of IoT starter kit from Soracom)
- Relay to automate pump functionality
- Ultrasonic sensor
Setting up ultrasonic sensor:
Raspberry pi zero W connected to Ultrasonic sensor and relay. Relay connected to Motor (M)
Setting up ultrasonic sensor with Soracom
Source code to automate relay depending on water level: GistSetting up backend infrastructure:
We use python + flask + flask restplus to create a REST api to allow for storing/retreival of water level data, which can be used by the smartphone dashboard to automatically update in real-time.
Amazon Elasticbeanstalk is used for application deployment.
Source code: LinkSetting up smartphone dashboard:
Retrofit is used the API manager to make HTTP requests and update the dashboard in realtime.
The limits for low level and high level for water level is set through the software and on reaching the low level the pump is started and on reaching the high level pump is stopped automatically.
Source code: Smartphone dashboard
With the information stored we can generate reports on average consumption, total water consumed per day/per month/per annum which can be leveraged to do a predictive analysis.
The hometown we live in (Chennai) is suffering from huge water scarcity. We envison this project to help goverment officials for efficient allocation of water resources.