The IOT based Water Level Indicator is the mini project under MCA course. The user can get water level through mobile app. The project is well suited for the following scenario:-
- one pump for all action; tank, sprinkler for farm and garden.
- valve locking system (One valve at a time).
- Use of moisture sensor for garden.
- Time based watering for farm.
- Need info on display, Android app.
The following image is the prototype of the project.
- Realtime water level, pump status and value status.
- Android app.
- Manual remote control pump control.
- Automatic sprinker system according to moisture content.
- LCD display for showing status.
- Show system log on Android app and Web app.
- Main board module.
- Water tank module.
- valve switching module.
- Raspberry Pi Zero W
- Relay (220V - 5V)
- LEDs - 2 (Red & green)
- Touch pads - 5
- Ultrasonic sensor - 1
- Atmega328p - 1
- Solenoid valve - 3
- Atmega328p - 1
Notes:-
- The communication between the modules is via I2C communication.
- All the data is stored in firebase.
- wire.h - for I2C communication
- wire.h - for I2C communication
- RPi_I2C_driver library (included with code) - for LCD
- RPi.GPIO library - for GPIO
- os - for running bash commands
- subprocess - for getting values from bash commands
- time - for sleep related functions
- datetime - for detecting current date and time
- pyrebase - for firebase connectivity
- socket - for working with web requests
- documentation/abstract: contains the project abstract.
- documentation/Diagrams: contains important figures drawn using draw.io, fritzing designs and exports and firebase design.
- project-reviews/Zeroth-review-presentation: contains presentation done for zeroth review.
- project-reviews/first-review: contains user stories submitted in first review.
- project-reviews/final-review: contains user stories submitted in final review.
- src - Contains the source code.
- android-app: contains the code for android app.
- main-board-module: contains code for Raspberry Pi Zero W.
- tank-module: contains embedded C code for Atmega328p. This micro-controller will be placed at water Tank.
- valve-switching-module: conatins embedded C code for ATmega328p. This micro-controller will be placed at the main pipeline junction.
- diagnostics: code to test each sensors used in the project.
The diagnostics include:-
- Main board
- I2C communication
- Internet status
- LCD display
- LED control
- Relay control
- Tank control
- I2C communication
- Touch pads
- Ultrasonic sensor
- Valve control
- I2C communication
- Moisure sensor
- Solenoid valve
- Install python3 requirements.
sudo pip3 install requirements.txt
To make the python code run at boot as background. Follow the following steps:-
-
Edit rc.local as adminstrator.
sudo nano /etc/rc.local
-
Add internetStatus.py python program to run at boot as background process along with astrik(&) symbol.
sudo python3 /home/pi/CET-MCA-S5-MiniProject-IOT_based_Water_Level_Indicator/diagnostics/main-board/internetStatus &
-
Save the rc.local file.
-
Reboot