Smart Drainage Monitoring System and Clog Detectionwith IoT
Smart Drainage Monitoring System and Clog Detectionwith IoT
Abstract— The fundamental right to inhabit a clean and salubrious environment is universally
acknowledged. Many developing nations, including Bangladesh, grapple with the recurrent issue
of flooding caused by obstructed drainage systems, which in turn gives rise to unsanitary
conditions. This dire situation can lead to health complications as the atmosphere becomes
contaminated by sewage gases. Stagnant water on roadways serves as a breeding ground for the
proliferation of Aedes mosquitoes, a major contributor to the escalating health crisis. Detecting
these drainage issues manually is arduous, and often, the mess only becomes apparent once the
drains are already blocked, flooding entire areas. To address this critical problem, we propose
the development of an advanced warning system that employs GSM (Global System for Mobile
Communications) and IoT (Internet of Things) technologies. Our system is designed to
preemptively avert such incidents, protecting public health. Key components of our system
include MQ135 and MQ2 gas sensors to detect sewage gas, an ultrasonic sensor for gauging
sewage water levels, and a flow sensor to monitor the rate of water flow. When the water level in
the drains surpasses a predetermined threshold, our system will trigger an alert mechanism,
sending real-time notifications via GSM to the relevant authorities. These alerts will specify the
areas in need of immediate attention and provide precise geographic coordinates using GPS data.
Additionally, both government agencies and the general public will have access to real-time data
through an online platform, such as Thingspeak. Importantly, our system allows users to fine-
tune the threshold values according to their preferences. By ensuring that authorities are
promptly notified and by offering real-time data accessibility, our system aims to enhance the
overall well-being of the community, enabling residents to lead healthier lives.
Index Terms— Drain Water, GSM SIM808, IoT, Alert system, MQ135, MQ2, Ultrasonic Sensor,
DHT 11 Temperature Sensor, Flow Sensor, ESP32, GPS Module.
I. INTRODUCTION
Inadequate drainage systems pose a significant health risk, giving rise to a multitude of diseases such as
campylobacteriosis, typhoid, hepatitis-A, and gastroenteritis. These diseases have the potential to transmit through
both direct and indirect means. Indirect transmission occurs when individuals come into contact with contaminated
surfaces or materials, creating a pathway for disease transmission. Moreover, stepping on polluted sewage or drain
water can inadvertently carry pathogens from one location to another, facilitating the spreading of infectious
3659
designed to trigger an alarm in the event of the manhole cover being tampered with, simultaneously notifying local
residents and relevant authorities by sending alert messages [13]. In a paper authored by M. SK and S. Rao (2014),
a model for an IoT-based underground drainage and manhole monitoring system was presented. Their system
featured the utilization of an LCD display to convey warning messages. To detect the unauthorized opening of a
manhole lid, a buzzer warning sensor was incorporated. Additionally, temperature detection sensors were
employed to assess the status of the manhole lid. However, it's important to note that their system did not offer
real-time data display, nor did it provide a solution for situations in which individuals were not in proximity to the
LCD during an emergency event [14]. In contrast, the research conducted by G. Gowthaman et al. (2018)
introduced a system that harnessed IoT technology, Magnetic Float Sensors, and Arduino for the purpose of
sewage level detection and alert notifications via messages and emails. However, it's important to note that this
system did not address the critical issue of monitoring and mitigating dangerous gases like CO2 and methane,
which can emanate from sewage and pose significant environmental and health hazards to the community [15]. In
the study by K. Viswanadh et al. (2019), their system incorporated NodeMCU, a Flow Sensor, and the Blynk
Application, comprising the Blynk app, Blynk server, and Blynk libraries. However, it's essential to note that their
system did not offer real-time data monitoring, which is a key aspect of our proposed solution [16].
B. Proposed Model To Overcome The Limitations
Upon a comprehensive review of prior research, it has come to our attention that there is a pressing need for a
system that not only offers real-time data monitoring but also enables remote alerts in the absence of direct
supervision. While real-time data is essential for continuous tracking, it also plays a critical role in proactively
assessing the levels of various elements within the drainage system, including gases, water, sewage, and more.
This proactive monitoring allows for the anticipation of elements approaching critical thresholds, thereby enabling
preventive measures. Our proposed system in this paper is characterized by its cost-effectiveness and user-
friendliness, leveraging affordable components that are readily accessible. This solution effectively addresses the
limitations observed in existing models by furnishing real-time data concerning the levels of critical elements,
such as gases, water, sewage, and others. Furthermore, in the event of any of these elements surpassing predefined
threshold values, the system ensures prompt alerts, delivering messages accompanied by precise location
information.
III. PROPOSED SYSTEM
A. Methodology
"Fig. 1" illustrates the block diagram of our proposed model. In order to provide real-time visibility into critical
parameters like water level, sewage gas levels, and sewage levels, our proposed model is engineered around the
ESP32 platform, enabling the presentation of live data on a monitor via ThingSpeak. Furthermore, for enhanced
user-friendliness and the betterment of the environment and human well-being, we have integrated the GSM
SIM808 and GPS components. The ESP32 serves as the central processing unit, facilitating the connection of
various sensors, GSM, and GPS to relay the current status. This setup ensures that we can promptly ascertain
whether sewage levels have exceeded predefined thresholds. Our system allows for both public and private access
to the website, affording flexibility to accommodate security concerns or maintenance requirements. Additionally,
data sharing with other ThingSpeak account holders can be effortlessly facilitated, streamlining maintenance
3660
activities. In the event of a connection loss, the graphical representation on the website will not be displayed. In
the event that the graphical representation is not visible, it should serve as an indicator that an issue may be present,
signaling the need for authorities to take corrective actions.
B. Hardware And Software
The hardware design is visually represented in "Fig. 2". The hardware components in this system are carefully
selected to monitor and assess crucial parameters within the drainage system. These include a Drain Water Sensor
for water level measurements, a GSM SIM808 Module for communication, gas sensors such as the MQ135 and
MQ2 for the detection of hazardous gases, ultrasonic sensors to gauge distances, a DHT11 Temperature Sensor,
and a Flow Sensor to track water flow rates. Additionally, the system is equipped with an ESP32 microcontroller
responsible for data processing and decision-making, a GPS Module to enable precise location tracking, an alert
system comprising a Buzzer, and a 16x2 LCD screen for user notifications display. Various supporting components
contribute to the overall functionality of the system. In parallel, the software components play a pivotal role in
ensuring the system's seamless operation. The firmware and programming logic are intricately designed to
facilitate data collection, decision-making processes, and the processing of sensor data. Information collected by
the sensors is efficiently transmitted and securely stored in the cloud-based platform, Thingspeak, utilizing various
protocols, enabling comprehensive data analysis. The system also integrates a clog detection algorithm, which
harnesses sensor data to identify obstructions or irregularities within the drainage system. Additionally, an alerting
logic is incorporated to trigger notifications through the buzzer and display pertinent information on the LCD
screen as the need arises.
a) ESP32 Dev-KIT V1: The ESP32 microcontroller, as depicted in "Fig. 3" plays a central and pivotal role within
the system, serving as the IoT device's cognitive hub. Distinguished by its dual-core processor and robust
connectivity features, including Wi-Fi and Bluetooth capabilities, the ESP32 stands as an indispensable component
for handling data processing, communication tasks, and control operations.
b) GPS (Global Positioning System): As illustrated in "Fig. 4" the GPS is a satellite-linked navigation system
renowned for its ability to furnish precise time and location-based data to a GPS receiver situated anywhere on or
in proximity to the Earth's surface.
3661
c) DHT11 Sensor: The DHT11 sensor, depicted in "Fig. 5" comprises a capacitive humidity sensing component
and a thermistor designated for temperature measurement. Within this sensor, a moisture-sensitive dielectric
material is sandwiched between two electrodes, forming a humidity-sensing capacitor. Variations in humidity
levels prompt changes in the capacitance value of this component.
d) MQ135: The MQ135 sensor, featured in "Fig. 6" is engineered to detect and quantify various noxious gases,
including ammonia, carbon dioxide, and methane. This sensor relies on the fundamental principle of resistance
modification in reaction to the presence of specific gases. It assumes a pivotal role in safeguarding the environment
and ensuring the timely identification of gas-related concerns within drainage systems.
e) Gas Sensor: As depicted in "Fig. 7" the MQ-2 gas sensor stands out as a versatile and economical component,
adept at detecting a range of gases including methane, propane, carbon monoxide, and hydrogen. Its operation
hinges on the phenomenon of resistance alterations when it encounters specific gases. This sensor enjoys extensive
utility in scenarios such as gas leakage detection, air quality surveillance, and safety systems.
f) GSM Module: The SIM900 GSM Module, featured in "Fig. 8" is designed to facilitate communication within
the 900MHz frequency band. It's important to note that network providers often use specific frequency bands, and
these bands may vary by region and country. In our context, as we are in India, a significant portion of mobile
network providers in our country operate within the 900 MHz band.
g) Ultrasonic Sensor: The ultrasonic detector, as illustrated in "Fig. 9" is an apparatus designed to gauge the
distance to an object by utilizing sound waves. This detection mechanism operates by transmitting a sound wave
at a known frequency, and subsequently, measuring the time it takes for the sound wave to return.
h) Liquid Crystal Display LCD: The Liquid Crystal Display (LCD), depicted in "Fig. 10" represents a unique
combination of solid and liquid states of matter. It serves as an electronic display module featuring a 16x2 LCD
screen, denoting its capacity to display 16 characters across 2 rows.
i) Buzzer: The buzzer, as portrayed in "Fig. 11" functions as an auditory alert system, emitting sound alerts upon
activation. Its role is to amplify user awareness and promote swift responses to significant events identified by the
IoT drainage monitoring system.
j) ThingSpeak
ThingSpeak shown in “Fig. 12” is a cloud-based Internet of Things (IoT) platform developed by MathWorks. It
enables users to collect, store, analyze, and visualize data from IoT devices and sensors. With ThingSpeak, users
3662
can create IoT applications and dashboards, making it a valuable tool for monitoring and managing sensor data.
The platform supports various data acquisition methods, including MQTT, HTTP, and TCP/IP, and provides built-
in tools for real-time data analysis and visualization, making it a popular choice for IoT projects and research.
C. Proposed System Design Flow
The flowchart diagram in “Fig. 13”, depicts the entire process of the suggested system design.
3663
Figure 15. Display after establishing mobile connection to GSM module Figure 16. Sensor readings on LCD
Once the connection is established message will be sent to the registered mobile number as “Your Mobile Number
Registered”. If any parameter reaches the set point, then message will be sent to registered mobile number for
example “Level Reached” and also buzzer sounds if not it does not send any message to registered mobile number
but displays the values on LCD display which can be observed in the “Fig. 15” and “Fig. 16”.
Here, the graph in “Fig. 17” shows the Water level distance of the drainage system on LIVE after every 30seconds.
We tested 7 or 8 times and got real-time data update on our server. And the graph in “Fig. 18” is showing the Gas
level of the drainage system on LIVE after every 30seconds. We tested 7 or 8 times and got some real-time data
update on our server. The increase in readings in the graph indicates the increase in Gas level in the environment
(drainage system).
B. Data Table
TABLE I. DATASET FOR WATER LEVEL TABLE II. DATASET FOR GAS
Level Notification SMS
Distance Notification SMS
0 < value <=100 Gas level low No
0 < value <=100 Water Empty No
100 < value <=200 Gas level low No
100 < value <=300 Water Low No
300 < value <=500 Water Medium No 200 < value <=400 Gas level medium No
Value > 400 Gas level high Yes
Value > 500 Water High Yes
3664
In this system, a water sensor is utilized to monitor water levels. If the distance to the water level is below 500
meters, the GSM module remains inactive, refraining from sending any SMS or updates. However, upon detecting
a change in water level, the system transmits a notification to the server, indicating the status as either "Water
Empty," "Water Low," "Water Medium," or "Water High.” In instances where the water level exceeds 500 meters,
an alert is generated to notify the server about the elevated water level. Simultaneously, an SMS is dispatched to
the relevant authority, signaling that the established threshold has been surpassed, as detailed in “Table. 1”.
If the level of Gas changes, then GSM will notify the local server about the state of Gas, i.e. if low, medium, or
high. If the value is less than or equal to 400 then the CO2 level is normal, GSM will not send any SMS. But if the
level is more than 400, then GSM will send SMS to the authority as shown in “Table. 2”. Moreover, in the case
of water levels surpassing 500, an alert indicating "Water Level High" is triggered. Additionally, temperature
readings are acquired using a DHT11 sensor, and if the predetermined threshold is met, an alert reading "High
Temperature Detected" is transmitted along with the location. Furthermore, flow rate monitoring is employed, and
if the threshold is exceeded, an alert with the message "Clog Detected" and the location details are relayed as
shown in “Fig. 19”. Using the latitude and longitude, the exact location can be found by using Google Maps.
V. CONCLUSIONS
The prevailing issue of an inadequate drainage system poses a considerable threat to public hygiene and
environmental well-being. It is exacerbated by the accumulation of harmful gases, including CO2, CO, CH4, NH3
and others. Our device has been meticulously crafted to address the challenge of controlling drain water overflow,
particularly in densely populated regions where plastic blockages in drains are common place. Our solution
incorporates GPS technology to precisely determine the location of the drainage system, while a Wi-Fi-based setup
ensures that the nearest authority receives daily updates regarding water levels, sewage gas concentrations, and
sewage distances within the drainage system. This proactive approach empowers authorities to take timely action
in preventing drain overflows. In a bid to foster transparency and accountability, local residents are granted read-
only access to the website. For security reasons, we have exclusively reserved full control access to the system for
the authorities only, as we believe this approach is essential to maintain system integrity and effectiveness. Local
residents, on the other hand, have limited access, restricted to viewing the information on the website as per our
design.
REFERENCES
[1] "How a Working Drainage System Saves You from Diseases," Benjamin Franklin Plumbing Fort Worth, Available:
https://benjaminfranklinplumbingfortworth.com/plumbing-blog/working-drainage-system-saves-diseases/, Accessed:
Jan. 21, 2020.
[2] "Poor Drainage Contributing Factor to Rise in Dengue Cases in Kelantan," The Sun Daily, Available:
https://www.thesundaily.my/archive/1143446-MRARCH267960, Accessed: Feb. 2, 2020, 2014.
[3] M. Kamruzzaman, "Dengue Reaches 'Epidemic Proportions' in Bangladesh," Anadolu Agency, Available:
https://www.aa.com.tr/en/asia-pacific/dengue-reaches-epidemic-proportions-in-bangladesh/1540832, Accessed: Jan. 19,
2020.
[4] "Envision2030: 17 Goals to Transform the World for Persons with Disabilities," United Nations, Available:
https://www.un.org/development/desa/disabilities/envision2030.html, Accessed: Jan. 12, 2020.
[5] Mishu, "Drainage Problem in Dhaka City and Needs More Awareness Program," Halchall (Blog), Available:
http://bdhalchall.blogspot.com/2008/01/drainage-problem-in-dhaka-city-and.html, Accessed: Mar. 2, 2020, 2008.
[6] "Health Problems Caused by Sewer Gas," Burton Plumbing Co., Available: http://www.burtonplumbingco.com/health-
problems-caused-by-sewer-gas/, Accessed: Jan. 13, 2020.
[7] Samiha Sultana, Ananya Rahaman, Anita Mahmud Jhara, Akash Chandra Paul, and Jia Uddin. “An IOT Based Smart
Drain Monitoring System with Alert Messages”, In Intelligent Human Computer Interaction: 12th International
Conference, IHCI 2020, Daegu, South Korea, November 24–26, 2020, Proceedings, Part II. Springer-Verlag, Berlin,
Heidelberg, 84–95.
[8] One More Death in Manhole," The Daily Star, Available: https://www.thedailystar.net/backpage/onemore-death-
manhole-1374478, Accessed: Jan. 16, 2020, 2017.
[9] G. M. et al., "IoT-Enabled Underground Drainage Monitoring System Using Water Flow Sensor," International Research
Journal of Engineering and Technology, vol. 6, no. 3, pp. 2427-2430, 2019.
[10] Y. Rjeily et al., "Smart System for Urban Sewage: Feedback on the Use of Smart Sensors," in 2017 Sensors Networks
Smart and Emerging Technologies, IEEE, Beirut, 2017.
[11] B. M. et al., "Underground Gutter Drainage Monitoring Using GSM," International Journal of Advanced Research in
Management, Engineering, and Technology (IJARMATE), pp. 174-181, 2016.
3665
[12] C. R. et al., "Smart Real-Time Manhole Monitoring System," International Research Journal of Engineering and
Technology, vol. 6, no. 7, pp. 934-938, 2019.
[13] N. Nataraja et al., "Secure Manhole Monitoring System Employing Sensors and GSM Techniques," in 3rd IEEE
International Conference on Recent Trends in Electronics, Information & Communication Technology, IEEE, Bangalore,
2018.
[14] M. SK and S. Rao, "Automated Internet of Things for Underground Drainage and Manhole Monitoring System for
Metropolitan Cities," International Journal of Information and Computation Technology, vol. 4, no. 12, pp. 1211-1220,
2014.
[15] G. Gowthaman et al., "Sewage Level Maintenance Using IoT," International Journal of Mechanical Engineering and
Technology, vol. 9, no. 2, pp. 389-397, 2018.
[16] K. Viswanadh et al., "Underground Drainage Monitoring System Using IoT," Journal of Emerging Technologies and
Innovative Research (JETIR), vol. 6, no. 4, pp. 21-26, 2019.
3666