IOT based Water Distribution Automation and Waste Water Treatment System
Water is the most precious and a basic need of all the living beings but now a days ,due to increment in relocation from a provincial territory to urban ranges, population in urban areas has expanded quickly. This increase has made water a crucial problem worldwide. It has affected water distributio
2025-06-28 16:33:52 - Adil Khan
IOT based Water Distribution Automation and Waste Water Treatment System
Project Area of Specialization Internet of ThingsProject SummaryWater is the most precious and a basic need of all the living beings but now a days ,due to increment in relocation from a provincial territory to urban ranges, population in urban areas has expanded quickly. This increase has made water a crucial problem worldwide. It has affected water distribution, interrupted water supply, water conservation, water consumption and also water quality.This also has affected the shortage of water for animal feeds and agricultural purposes.
These problems have more badly affected our country Pakistan and other developing countries worldwide because of less water resources & lack of proper management in distribution. Hence, there is need of not only a proper monitoring and controlling system but also making wastewater to be reused. This system is intended to overcome the distribution problems and treat wastewater to be reused for irrigation purposes.
This project focused on the use of Fourth Industrial Revolution (4IR) technology “Internet of Things (IoT)” for development of intelligent water distribution system along with wastewater treatment system to fill the gaps. A prototype is developed to simulate the operation of a water distribution and treatment of wastewater. The developed prototype consists of a supplier unit, two consumer units and a treatment unit. We have used different IoT devices like water flow sensor, ultrasonic sensor, turbidity sensor, PH sensor, relays, solenoid valves, Wi-Fi modules and Arduino microcontrollers. For cloud data storage and analysis , we are using Thingspeak’s open IoT platform. A smartphone application is also developed using MIT App Inventor for monitoring and controlling.
Project Objectives- Design a multi-consumer automated water distribution system.
- Design an IoT system for data communication & analysis.
- Develop a GUI for remote monitoring & control.
- Design a wastewater treatment system.
The project was implemented in two phases. In first phase, we developed a prototype for simulating water distribution. It comprises a supplier and two consumers unit. Each unit consists of a flow sensor, ultrasonic sensor, solenoid valve, Wi-Fi module and Arduino microcontroller as a major part in hardware and smartphone application in software. Ultrasonic sensor is used to determine the level of water in tanks. Supplier end has additional water pump which carries water into overhead tank.
As supplementary parts, we have used LCD for displaying processed data on water meter. We have used relays and snubber diode to control water pump and solenoid valve. We have also used RTC (Real Time Clock) module to keep stamps of date/time as data is collected and processed.
On supplier unit, solenoid valve will remain open during distribution and it can be turned off for maintenance purposes. As the water level in overhead tank reaches any extreme (minimum or maximum), Arduino will actuate the water pump to do respective action (turn ON or OFF). Then water flows through distribution lines and flow sensor measures the amount of water supplied and displayed on LCD and supplier’s dashboard. Supplier also has the facility of analyzing sensors data and can operate pump and valve using mobile app.
On consumer side, solenoid valve will remain close by default and he/she can turn it ON through smartphone app. As valve opens, water flows through the consumer lines and into the underground/sink tanks. During this flow, flow sensor and ultrasonic sensor will be sensing the water consumed and water level in tanks respectively. As water level reaches its defined maximum limit, valve will be turned off automatically so to avoid overflow and wastage of water. Consumer will also be able to see data about consumed water, water level and control the valve. Consumer’s bill is also estimated from data of daily consumption.
In second phase of project, we developed a prototype for treatment of wastewater specifically greywater. The prototype implements chemical mixing, settling, sand filtration and chlorination as part of greywater treatment. IoT sensors i.e. temperature, turbidity and PH sensor are used to collect and monitor the quality of treated water. IoT actuators like motorized valves/solenoid valves are used to control the flow of operation. IoT enables us to access, analyze and perform process-specific actions remotely.
Benefits of the Project- Simplified management of water supply and distribution.
- One stop monitoring of all facilities i.e. water levels, water flow, pump and valve status.
- No need of regular manual operations.
- Monthly estimated bill prediction on your phone.
- Improved decision making based on real time data.
- Water quality and flow monitoring.
- Control water wastage.
- Reuse treated water for greywater applications like non-veg irrigation, washing, bath etc.
Final deliverable of our project consists of hardware as well as software.
Hardware:
For hardware deliverable, it consists of ultrasonic sensor, water flow sensor, relay module, RTC module, LCD and an Arduino microcontroller packaged as a Smart Water Manager.
1-Ultrasonic Sensor:
Ultrasonic sensor (SR04) is a DC 5V,15mA module used for sensing water level. It can measure as close as 2cm and as far as 4m distance with measuring angle of 15 degrees.
2-Water Flow Sensor:
Water flow sensor (YF-S201) is a module which measures the flow of any liquid unidirectionally. It has max current of 15mA and operates in range of DC 5-18 V. It allows maximum pressure of 1.75 Mpa with the accuracy of 1-25 L/min.
3-Relay module:
Relay module is used to control water pump/motor or solenoid valve. It consists of DC 5V relay capable of handling up to 250V AC ,30V DC and 10 A. It is a 5V module with operating current of approx. 70mA.
4-RTC:
Real time clocks (RTC), as the name recommends are clock modules. The DS1307 real time clock (RTC) IC is an 8 pin device using an I2C interface. The DS1307 is a low-power clock/calendar with 56 bytes of battery backup SRAM. Battery input for any standard 3V lithium cell or other energy source. Battery voltage should be between 2V and 3.5V for suitable operation. A lithium battery or coin cell with 48mAhr or greater will backup the DS1307 for more than 10 years in the absence of power at 25ºC.
5-LCD:
Liquid Crystal Display (LCD) is used for displaying various sensors data & actuators status as meter display. We used a 20*4 LCD which has 16 breakout pins. It can operate on both 5V and 3.3V DC. It is used here in write mode as commonly used for same.
6-Microcontroller:
Arduino MC is the main controller which allows us to implement our defined logic/program in the system. We used Arduino Mega and Arduino UNO on supplier and consumer units respectively. ATMega2560 has operating range of 7-12V DC. It has 54 pins for digital I/O and 16 pins for analog I/O. It has flash memory of 256 KB. UNO has same operating voltages but a smaller number of
I/O pins.
Software:
For software deliverable, we have Thingspeak cloud channels and a smartphone
app developed on MIT App Inventor.
1-Thingspeak:
On Thingspeak, we have setup separate channels for supplier, consumers and treatment unit for simplicity and make system easily manageable. Thingspeak’s cloud free program has limitation of 15 sec delay in updating data on channel. So, we have a compromise here.
2-Android App:
For mobile application, we have a single app with a branding screen, login screen and respective dashboard for supplier, consumer and treatment utility. A supplier when logins with his/her credentials is shown his/her dashboard as well as options for viewing information about consumers. Similarly, when a consumer login with his own credentials is shown respective dashboard from where he can monitor and control easily. In the sameway, supplier has respective dashboard for water treatment.
| Item Name | Type | No. of Units | Per Unit Cost (in Rs) | Total (in Rs) |
|---|---|---|---|---|
| Total in (Rs) | 52840 | |||
| Arduino MEGA | Equipment | 1 | 1200 | 1200 |
| Arduino UNO | Equipment | 2 | 700 | 1400 |
| Node MCU ESP32 | Equipment | 1 | 900 | 900 |
| Relay Module | Equipment | 8 | 90 | 720 |
| Water Flow Sensor | Equipment | 5 | 500 | 2500 |
| RTC Module + Coin cell | Equipment | 3 | 230 | 690 |
| Ultrasonic Sensor + Bracket | Equipment | 5 | 220 | 1100 |
| pH Sensor Module | Equipment | 1 | 5200 | 5200 |
| AC Water Pump | Equipment | 1 | 500 | 500 |
| Turbidity Sensor | Equipment | 1 | 3000 | 3000 |
| DC Submersible water pump | Equipment | 5 | 300 | 1500 |
| 20*4 LCD Module | Equipment | 4 | 575 | 2300 |
| Esp 8266 WiFi Module | Equipment | 3 | 300 | 900 |
| Solenoid Valve + M.S Adapters | Equipment | 5 | 1060 | 5300 |
| LM 7812 | Equipment | 3 | 15 | 45 |
| LM 7805 | Equipment | 3 | 10 | 30 |
| LM 317 | Equipment | 3 | 20 | 60 |
| Bridge Rectifier IC | Equipment | 3 | 20 | 60 |
| Transistor 2n3904 | Equipment | 8 | 5 | 40 |
| Transistor 2n3906 | Equipment | 6 | 5 | 30 |
| Capacitors | Equipment | 20 | 4 | 80 |
| Diodes | Equipment | 5 | 2 | 10 |
| Resistors | Equipment | 25 | 1 | 25 |
| Heat Sinks | Equipment | 10 | 12 | 120 |
| Acrylic Sheet Jars | Equipment | 9 | 2250 | 20250 |
| Chlorine Tablets/Liquid | Equipment | 2 | 150 | 300 |
| PCB fibre sheet | Equipment | 2 | 600 | 1200 |
| 18V Centre Tapped Transformer | Equipment | 2 | 500 | 1000 |
| Hardboard Sheet | Equipment | 2 | 500 | 1000 |
| Pipes | Miscellaneous | 10 | 20 | 200 |
| Elbows | Miscellaneous | 8 | 35 | 280 |
| T-connectors | Miscellaneous | 2 | 20 | 40 |
| Clips | Miscellaneous | 22 | 20 | 440 |
| Nozzles | Miscellaneous | 9 | 40 | 360 |
| Nipples | Miscellaneous | 6 | 10 | 60 |