Prediction and Prevention of Water Pollution by Industries Using IoT Based Monitoring System
Prediction and Prevention of Water Pollution by Industries Using IoT Based Monitoring System
Abstract—The ever-increasing water pollution level due to availability of many anti-pollution laws, indicates the lack
industries, pose a serious threat to the masses and once of the mechanism for holding a potential source
detected, it requires a significant amount of time for the responsible. This calls for an immediate attention to the
remedial measures. The proposed IoT solution discusses a major pollution contributing sources and assessment of
device, capable of determining the water pollution level caused their contribution to the overall pollution. Among the
by an industry, near water bodies. The system would also be contributing factors to water pollution, the focus has been
able to predict when the pollution level tends to cross the kept on the industrial belt near the river as they are the
threshold value set by C.P.C.B. India in future. This major contributing factors as per the existing research. The
information would eventually help in taking proactive use of LoRa in IoT devices for wireless data transmission is
remedial measures.The proposed device consists of four major not uncommon. LoRa's performance is evaluated using
sensors: pH sensor, turbidity sensor, flow sensor, and
three key parameters: code rate, spreading factor, and
temperature sensor. These sensors would measure the water-
parameters in real-time and send that data to Google Firebase bandwidth. Lora has five forward error correcting code
(database) either through the WiFi module or, through the rates, allowing for the recovery of bits of information that
LoRa transmitter installed in the proposed device. Through have been corrupted by interference [1].
LoRaWAN, all of these devices, which will be put at various The proposed system has been created keeping in mind
industry-wastewater-outlets, will be wirelessly connected to a all the aforementioned points in mind. There has always
central hub. The goal is to use an optimized algorithm to make been a need to identify the amount of pollution level in the
the system more energy efficient. The database would retain water in real-time and consequently, hold an industry
real-time data for two purposes: displaying it in the mobile responsible for the same, backed with proof. Once the
app and using it in LSTM time-series forecasting (Machine major contributing sources have been identified, necessary
Learning model) to predict when pollution levels could surpass action can be undertaken to put a check on the wastewater
the threshold.
release into the river.
Keywords—IoT, water pollution, LoRaWAN, turbidity, pH, Subsequent sections describe the rest of the paper as
Machine Learning, time-series forecasting, LSTM, mobile
follows. Section II gives the background for the work and
application, real-time, Google Firebase
benchmarks required. Working flowchart and prototype
I. INTRODUCTION for water pollution monitoring is explained through
section III and section IV. Results are described in section
The major problem that wreaks havoc in the healthy V. Next section mentions the application of the project and
lives of people nowadays is the unavailability of clean finally, the paper is concluded through the last section.
water for consumption. The water streams like rivers, lakes
are getting polluted at an ever-increasing alarming rate.
This indiscriminate pollution of the water bodies despite the
505
Authorized licensed use limited to: Odisha University of Technology and Research. Downloaded on August 06,2025 at 14:59:56 UTC from IEEE Xplore. Restrictions apply.
Table 1. shows the threshold values of various water- architecture of the device which has been proposed.
pollutants set by the C.P.C.B. for the water usage in various
household and industrial purposes. This data has been used
in the implementation of the proposed device.
TABLE 1. Threshold of water pollutants set by C.P.C.B. [16]
506
Authorized licensed use limited to: Odisha University of Technology and Research. Downloaded on August 06,2025 at 14:59:56 UTC from IEEE Xplore. Restrictions apply.
2) Power Calculation: As we are using Li-Ion
Battery (2500 mAh), the power calculation is done with
some suitable assumption based on Industrial standards.
The equation used for power calculation is:
Power required = total power of
sensors
Battery power = (no. of days) * (Power required) The
total battery life comes out to be approximately 3 months.
This has been possible because of the algorithmic
optimization of the activation time of the sensors. In
comparison with the original battery life, the optimization
ofpower has increased the average battery life 20 times.
3) Mobile-App for real-time data viewing: To view
the sensor data in real-time a mobile application has been
created which is connected to Google Firebase. The data in
the application is updated as soon as Firebase receives a
change in the parameter value.
4) ML algorithm implementation: To predict the
future level of pollution in order to alert the industries in
advance using time series forecasting - LSTM (Long Short
Term Memory). LSTM has been preferred because of the
Figure 2. Flowchart of the operation
availability of memory cell, and peep-hole connections. The
LSTM allows control of the large number of weights of the
network, thus making it suitable for random data.
IV. PROTOTYPING Long Short Term Memory i.e. LSTM is a kind of RNN
The microcontroller used for the implementation is and each cell of LSTM consists of 4 gates namely - Input
NodeMCU (ESP8266) because it is cost-efficient and Modulation Gate, Input Gate, Forget Gate and Output Gate
comes with an in-built WiFi Module. All the four sensors - having the cell structure shown in figure 3 -
Flow Sensor (YF-S201), Turbidity Sensor (SKU-62828),
pH Sensor (SKU-235871), Temperature Sensor
(DS18B20) - are connected with the NodeMCU. The
sensors are powered by the Li-Ion Battery (2500 mAh). The
assembly of the device has been depicted in Figure 4. The
sensor read data is being transmitted to the Google Firebase
database through the in-built WiFi module (in the case of
availability of WiFi signal) or through the LoRa Module (in
the case of unavailability of WiFi signal i.e. when the
device is installed at a remote location). There is a central
secure LoRa receiver module which receives the data from Figure 3. LSTM Cell structure
the remote devices having LoRa transmitter module
installed in them. The size of the dataset used to train the model is 1000. It is
The Flow Sensor will always remain active during the further subdivided into two groups - training set (650 data
operation of the device and will trigger the remaining points) and validation set (350 data points).
sensors whenever the device detects a wastewater The model consists of three layers having 200 nodes
discharge. This technique of selective activation of sensors having ReLu as an activation function using Adams as an
ensures the battery optimization. Once all the sensors have optimizer. Present model is trained using 100 epochs and a
been activated, they start recording the respective data and batch size of 128. All these parameters can further be
send the same to the remote Firebase database through tweaked in order to achieve a better performance.
LoRaWAN.
Once the data is received in the database, it is sent to the V. RESULTS
mobile app for the real-time viewing and it is also utilized While testing the device, the surrounding conditions
for predictive analysis using time-series LSTM Algorithm. were kept as much similar to the actual scenario as possible.
1) Sensor Integration with NodeMCU: The circuit The following results were obtained after careful
diagram of the device is shown in Figure 4. It includes the experiments under multiple experimental environments.
interfacing of all the 4 sensors with the NodeMCU. The The components have been closed packed together
sensors are connected with the help of a 3x8 mux IC, due to during the assembly to enhance the compactness of the
less number of analog pins in the microcontroller. device. The water-proofing of the device to sustain in
507
Authorized licensed use limited to: Odisha University of Technology and Research. Downloaded on August 06,2025 at 14:59:56 UTC from IEEE Xplore. Restrictions apply.
various water conditions has been taken care of.
The performance of the model is being judged on the
basis of RMSE that is Root mean square error. RMSE is the
standard deviation of the prediction errors. RMSE values in
the range 0.2 to 0.5 indicate that the model can reasonably
predict the data. The implemented LSTM model has been
tested to have a RMSE (Root mean square error) of 0.657.
Table 2. shows the accuracies obtained in prediction of
values for respective sensors.
TABLE 2. Accuracy of predicted values
pH 1.25 96.60
Figure 6. Real v/s Predicted value of Turbidity Sensor
Temperature (C) 1.59 91.04
The mobile application provides real-time insights into
Turbidity (NTU) 1.47 90.22 the data sent by each device in the device-network. Real
time alerts are notified in the phone itself and necessary
The model can be further optimized with the availability actions can be taken if needed.
of field data. The actual and predicted values of different VI. APPLICATION
parameters like pH (Figure 4.), Temperature (Figure 5.) and
Turbidity (Figure 6.) are as follows: The IoT device proposed as the solution to the problem
statement is majorly targeted at the industrial wastewater
releasing industries near the river bodies. The detailed
applications are mentioned as follows:
A. Industrial belt near the river like Yamuna: We plan to
install this device near the opening of the industrial
wastewater release pipeline. The device will be in
standby state always and it will get triggered once the
wastewater is released by the concerned industry. If
the data received by our device senses a spike in the
pollution level, then it will alert the concerned
authorities.
B. Useful in monitoring the water pollution in real-time
in any industry: This device can be installed in any
industry which can be considered as a potential
contributor to the rising water pollution. In this way,
the concerned authorities can keep a track and assign
Figure 4. Real v/s Predicted value of pH Sensor responsibility to the particular industry with full
confidence.
C. Unlawful wastewater release in a particular water
body can be detected efficiently: Installing this device
in static water bodies near industrial areas can also be
helpful to determine which particular industry is
causing a spike in the pollution unlawfully.
VII. CONCLUSION
The significance of this project may be seen by looking at
the ever-increasing amounts of water contamination caused
by industrial effluents. Water pollution may be significantly
reduced if we can identify the specific industries that are
contributing to rising pollution levels and report them to the
appropriate authorities. Although the implementation of the
prediction algorithm has been tested to have an RMSE value
Figure 5. Real v/s Predicted value of Temperature Sensor
of 0.657, there might be some false-positives in the real-
508
Authorized licensed use limited to: Odisha University of Technology and Research. Downloaded on August 06,2025 at 14:59:56 UTC from IEEE Xplore. Restrictions apply.
world implementation. This shortcoming can be countered (MACS). IEEE, 2018.
[7] Jan, Farmanullah, Nasro Min-Allah, and Dilek Düştegör. “Iot
once real-time data is received and appropriate based smart water quality monitoring: Recent techniques, trends
modifications to the learning algorithm are implemented. and challenges for domestic applications.” Water 13.13 (2021):
This device is expected to work well within the standard 1729.
industrial environment. This device can be further modified [8] Adu-Manu, Kofi Sarpong, et al. “Smart river monitoring using
wireless sensor networks.” Wireless Communications and Mobile
externally in order to scale the application of this device in Computing 2020 (2020).
drastic conditions. The algorithm followed to determine the [9] Kamaruidzaman, N. S., and Siti Nazahiyah Rahmat. “Water
responsible industry has included all the threshold standards monitoring system embedded with internet of things (IoT) device:
set by the governmental agency C.P.C.B. a review.” IOP Conference Series: Earth and Environmental
Science. Vol. 498. No. 1. IOP Publishing, 2020.
ACKNOWLEDGMENT [10] Moparthi, Nageswara Rao, Ch Mukesh, and P. Vidya Sagar.
“Water quality monitoring system using IoT.” 2018 Fourth
This work is supported by Shri G.S Institute of International Conference on Advances in Electrical, Electronics,
Technology and Science. We would like to show our Information, Communication and Bioinformatics (AEEICB).
gratitude to our faculties for their valuable feedback. We IEEE, 2018.
would also like to extend our heartfelt regards to our family [11] Warungase, Parag, et al. “IOT Based Water Monitoring System.”
[12] Madhavireddy, Vennam, & B. Koteswarrao. “Smart Water
and friends for their constant support throughout. Quality Monitoring System Using Iot Technology.” International
Journal of Engineering & Technology [Online], 7.4.36 (2018):
REFERENCES 636-639. Web. 18 Feb. 2022.
[1] Noreen, Umber, Ahcène Bounceur, and Laurent Clavier. “A study [13] Lambrou, Theofanis P., et al. “A low-cost sensor network for
of LoRa low power and wide area network technology.” 2017 real-time monitoring and contamination detection in drinking
International Conference on Advanced Technologies for Signal water distribution systems.” IEEE sensors journal 14.8 (2014):
and Image Processing (ATSIP). IEEE, 2017. 2765-2772.
[2] Geetha, S., and S. J. S. W. Gouthami. “Internet of Things enabled [14] Pasika, Sathish, and Sai Teja Gandla. “Smart water quality
real time water quality monitoring system.” Smart Water 2.1 monitoring system with cost-effective using IoT.” Heliyon 6.7
(2016): 1-19. (2020): e04096.
[15] Dinesh Sharma, GS Tomar, “Energy Efficient Multitier Random
[3] Sabari, M., et al. “Water Quality Monitoring System Based on
DEC Routing Protocol for WSN: in Agriculture”, Wireless
IoT.” 5th International Conference on Devices, Circuits and
Personal Communication, Vol.120, No.1, pp.727-747, 4th May
Systems (ICDCS). IEEE, 2020.
2021.
[4] Maheshwari, Kartik, and Adrija Chakraborty. “Water Quality
[16] Demetillo, Alexander T., Michelle V. Japitana, and Evelyn B.
Monitoring System Implemented With IoT.” International Journal
Taboada. “A system for monitoring water quality in a large
9.7(2021).
aquatic area using wireless sensor network technology.”
[5] Manimegalai, R. “An IoT based smart water quality monitoring
Sustainable Environment Research 29.1 (2019).
system using cloud.” 2020 International conference on emerging
[17] Cpcb.nic.in. 2022. CPCB | Central Pollution Control Board.
trends in information technology and engineering (ic-ETITE).
[online] Available at: <https://cpcb.nic.in/water-quality-criteria/>
IEEE, 2020.
[6] Bilal, Muhammad, et al. “A study on detection and monitoring of
water quality and flow.” 2018 12th International Conference on
Mathematics, Actuarial Science, Computer Science and Statistics
509
Authorized licensed use limited to: Odisha University of Technology and Research. Downloaded on August 06,2025 at 14:59:56 UTC from IEEE Xplore. Restrictions apply.