IoT and Wireless Sensor Networking-based
IoT and Wireless Sensor Networking-based
10, 2021
Abstract: Contaminated water became a major issue for our country over the last few
decades. One of the main reasons behind this scenario is urbanization and industrialization.
Every industry should have an Effluent Treatment Plant (ETP) for treating industrial
wastewater and safe disposal to the environment. We implement a system that monitors
whether an industry uses ETP or not. To monitor ETP, we need to monitor the untreated
wastewater quality. The traditional way offers us a method that is time-consuming and
inefficient. To solve this problem, we adopt a model based on Wireless Sensor Networking
(WSN), which allows us to keep track of the water quality parameters in real-time. This paper
proposes a water quality monitoring system that uses WSN and Internet of Things (IoT) based
devices to monitor different parameters of water: temperature by a temperature sensor,
turbidity by a turbidity sensor, and pH by a pH sensor. Moreover, the microcontroller of
Arduino Uno R3 collects the parameter values from these sensors and transmits the values
to the IoT based cloud server using the GSM module. The GSM module is also used to alert
the supervisors by sending SMS in case of an emergency. Integrating modules such as
sensors, Arduino Uno R3, GSM module, enhances the purpose of the desired system. Finally,
we calculate the Water Quality Index (WQI) for the pH and turbidity data to report the water
quality status. Also, we compare the WQI status with our cloud status, and it shows excellent
performance.
Keywords: water quality; wireless sensor networking; IoT; smart sensor; GSM module;
Real-time; plant monitoring; artificial intelligence
‒ 205 ‒
I. Khan et al. IoT and Wireless Sensor Networking-based Effluent Treatment Plant Monitoring System
1 Introduction
Water is one of the most vital assets for humankind. Without water, no plants or
animals on earth would survive. The industry has been growing every year on the
back of spiraling demand from domestic and export markets. But because of the
growing rate of industry in developing countries like Bangladesh, water is
constantly being polluted. Water is mostly being polluted because of the industries
discharging untreated waste and effluent into the rivers and cannels. Water related
diseases cause 3.4 million deaths each year across the globe, according to WHO
Water Day Report. Defiled water is also responsible for the degradation of
agricultural land, soil fertility loss, and increases pressure on groundwater. About
200 rivers of Bangladesh directly or obliquely received a large amount of untreated
industrial wastes. The World Bank claimed that in Bangladesh, approximately $6.5
billion losses due to untreated water, which is 3.4% of the GDP in 2015. There are
many factories and industries in our country. According to a Bangladeshi daily
newspaper (The daily star), the textile industry will be discharging 203 billion liters
of polluted water into the river’s water every year from 2021. ETP is one of the best
solutions to sanctify untreated water discharged by industries and factories.
According to The Daily Star, currently, 5000 ETPs are initiated in factories and
industries, which cover approximately 70% of the textile units [1]. It also said that
Bangladesh has around 1,200 weaving mills, 5,000 export-oriented dyeing
factories, and 450 spinning mills.
We will monitor the quality of water on the industrial water discharged site.
To ensure whether the water is contaminated or not, we need real-time data analysis
because the sample is continuously changing. If we want to monitor this water
through the lab, then the cost will be high, and efficiency will be lower. In modern
times, the wireless sensor network is used in many sectors. Wireless sensor
networks have received considerable attention not only in environmental sectors but
also in industrial sectors [2-6]. WSN provides a massive advantage on cost because
the installation and maintenance expenses are low, and the device that we use is
cheaper, which required no writing [7-11]. That’s why environmental and industrial
monitoring largely depends on WSN technology [12-14]. We can apply this
technology in water quality monitoring, which will provide us with the best
approach to real-time data acquisition, processing, and transmission. In this paper,
we proposed a complete WSN water quality monitoring system that will allow us
to monitor the ETP. This system consists of a set of sensors such as pH, temperature,
turbidity, an Arduino Uno R3 microcontroller, GSM module, IoT based cloud
server (Thingspeak). This system measures different parameters of water, such as
pH, temperature, and turbidity. In the results and discussion section, we proved that
the system has a great prospect in industrial ETP plant monitoring. In this paper,
Section 2 discusses the literature survey on surveying water quality. Then, Section
3 illustrates the method we have implemented. After that, our data collection
procedure is in Section 4. Section 5 discusses the results obtained through this
system and finally, Section 6 brings a conclusion.
‒ 206 ‒
Acta Polytechnica Hungarica Vol. 18, No. 10, 2021
2 Literature Survey
In this paper, our fundamental goal is to monitor the effluent treatment plant in real-
time using a wireless sensor network. So, our primary concern is to examine water
to determine the water quality parameters such as pH, temperature, and turbidity.
The following papers proposed various methods to check the quality of water.
This study delineated an efficient IoT-based system for measuring water quality by
determining temperature, pH, turbidity, and water level [15]. Here, the data is
transmitted to a webpage using GPS and GPRS modules. Another work proposed
an intelligent sensor interface for industrial WSN in the IoT environment.
They monitored water purity in the pond using a light intensity sensor, digital
temperature sensor, turbidity sensor by distributing multiple nodes in different
areas. They utilized ZigBee wireless communication, a short communication
method, for communication purposes [16]. Further, this paper claimed a cost-
effective, low-power transmission system for water quality monitoring in lakes
around ANNABA reagent. They considered different parameters such as pH,
conductivity, temperature, oxygen concentration, measured by other Arduino-based
sensors. The authors suggested a personal computer (PC) as a base station and
developed a GUI using MatLab software for visualizing data [17]. This study
described an automated agricultural monitoring system (iAgriMon) that uses a
hybrid IoT and WSN architecture to monitor temperature and humidity parameters
in a greenhouse setting [18]. For improving agricultural ecosystems, a web portal is
used to analyze the obtained data. In addition, the researchers propose an intelligent
irrigation control system that uses wireless sensor networks, a customized server,
and a Wemos D1 small (as the main microcontroller) [19]. They applied the T-test
statistical tool to see if the results are acceptable. They also compared their method
to the traditional approaches, where results suggested that the proposed method
outperformed all the other methods. This research described a system that employs
WSN technology in the IoT platform for water resource irrigation and proper water
resource usage in Precision Agricultural Farming (PAF) [20]. According to IoT-
based applications, these studies presented the novel framework based on leading
technologies such as Blockchain, Software-defined networks to innovative fields
through IoT platforms [21, 22]. Another research claimed that throughput
maximization, latency reduction, a high signal-to-noise ratio, a low mean square
error, and increased coverage area promote communication between different IoT
sensors. They showed that their outcomes outperform traditional IoT-based farming
methods [23]. In similar work, Temperature, dissolved oxygen, and pH are
measured by the system, which sends the data to a cloud internet platform via a
router gateway and can be tracked by smart devices in real-time. This studied
offered an upgraded WSN that applies a proposed algorithm in a tomato-growing
greenhouse [24]. They monitored Temperature, humidity, Carbon Monoxide,
Carbon dioxide, and light intensity and let users set minimum and maximum
setpoints and time and date-based irrigation management. They focused on tomato
crop yield has grown by 30%, while Methane Gas, water, and electricity use have
‒ 207 ‒
I. Khan et al. IoT and Wireless Sensor Networking-based Effluent Treatment Plant Monitoring System
‒ 208 ‒
Acta Polytechnica Hungarica Vol. 18, No. 10, 2021
Finally, they compared the proposed system result with a standalone RFID system
[35]. In addition, they considered a sum throughput technique to present the joint
maximization of energy harvest and information transmission rate where wireless
information and power transfer are used to harvest the energy from radio frequency
sources [36]. Similarly, they propose an online monitoring water quality system
using WSN in Indonesia [37]. They evaluated water quality using Zigbee wireless
communication. The pH and turbidity sensors determine whether water quality is
good or bad [38]. They observed flood and water quality using IoT. They combined
various sensors such as weather monitoring, soil moisture monitoring, and fire
alarm to implement their method [39]. They projected an intelligent water quality
monitoring system to prevent the contamination of the water. They build a
monitoring center where data is analyzed. For data transmission, they used the
GPRS method [40]. Furthermore, they planned a low-cost and real-time water
quality monitoring system used in remote lakes, rivers, and other water bodies.
They proceeded with DO and pH sensors and developed a mobile application to
check the system efficiency [41]. On the other hand, these studies focused on
machine learning and deep learning methods to classify water quality conditions.
They also calculated the water quality index from various sensors [42, 43, 44, 45].
Figure 1
Basic Diagram for Water Quality Monitoring System
‒ 209 ‒
I. Khan et al. IoT and Wireless Sensor Networking-based Effluent Treatment Plant Monitoring System
Figure 2
Real-Time Water Quality Monitoring System using WSN
3.1.1 pH Sensor
A pH sensor is a scientific device that is used to measure the hydrogen ion activity
in water. The pH sensor determines pH by measuring the voltage level or the
difference of the solution in which it is immersed. The logarithmic scale of pH starts
from 0 to 14. At level 7, we find the water source level is natural. When the level is
less than seven, then the water has acidic solutions, and if the level is greater than
seven, then the water has alkaline solutions. A pH sensor got two electrodes, which
are the measuring electrode and the reference electrode. The positive end of the
battery is paired with a measuring electrode, and a negative end is paired with a
reference electrode. The reference electrode will not be changed because it always
provides a fixed voltage when the pH meter is dipped into the solutions.
The measuring electrode provides voltage and sensitivity to the hydrogen ion. If the
temperature changes, then the differential voltage of the electrode also
changes.Therefore, we need a temperature sensor.
‒ 210 ‒
Acta Polytechnica Hungarica Vol. 18, No. 10, 2021
‒ 211 ‒
I. Khan et al. IoT and Wireless Sensor Networking-based Effluent Treatment Plant Monitoring System
of the water tank. Then, we will compare the total amount of water passed through
them. If their volume is significantly different, then an emergency SMS can be sent
to the base station.
‒ 212 ‒
Acta Polytechnica Hungarica Vol. 18, No. 10, 2021
3.4.1 Thingspeak
There are so many IoT platforms that we can use to store, process, and analyze the
sensor’s data. Some of the IoT platforms are Microsoft Azure IoT,Amazon Web
Service or AWS, Google Cloud Platform, Thingspeak, Thingworx, Cisco to IoT
CloudConnect, etc. Among them for our method, we use the Thingspeak cloud
server, which is an open data platform and API for the IoT, which will help you to
store, collect, process, analyze and act on data from sensors. It is also user-friendly
and provides data security and free access to the cloud. The sensor node will send
data to the cloud to store in the channel of Thingspeak. Thingspeak channel supports
eight channels in which we use three channels, such as pH, Temperature, and
turbidity. Through this process, we can analyze, visualized, and calculate new data
and also interact with social media. The data are coming from the sensors organized
in the cloud in the form of plots, charts, graphs using analytical tools online.
Thingspeak also provides access to MATLAB to provide sensor data. One can react
both in new data and the raw data in each channel and also can help the devices to
execute by using the commands. Thingspeak cloud server can send the data to the
PC in an EXCEL form which is real-time. The collection of the sensor data in real-
time is shown in the data collection section.
‒ 213 ‒
I. Khan et al. IoT and Wireless Sensor Networking-based Effluent Treatment Plant Monitoring System
Table 2
Water quality scale based on WQI
WQI can be calculated using the following equation (Brown et al. 1970) [51]
𝑊𝑄𝐼 = ∑𝑛𝑗=1 𝑤𝑖𝑞𝑖
∑ 𝑤𝑖 (1)
Where, wi=unit weight of jth water quality parameters, qi= Quality rating for the
jth parameters.
For calculating the WQI, four steps are required.
Step 1: We have selected two variables pH and turbidity for calculating the WQI.
We use the standard value of the water quality recommended by WHO [46].
Step 2: Quality rating(qi) can be calculated using the following Equation 2.
(Va−Vi)
qi = ×100 (2)
(Vs−Vi)
Where, qi =Quality rating for the jth water quality parameters, Va : The monitored
value of the (jth) parameterat a given sampling station, Vi : ideal value for the jth
parameters. For pH, the ideal values is 7.0 and for the turbidity variable the ideal
value is 0, Vs : the standard value of jth parameters.
Step 3: Unit weight (wi) can be calculated using the following Equation 3.
𝐾
𝑤= (3)
𝑆𝑖
Where, w : unit weight for the jth water quality parameters, Si : standards value for
the jth water quality parameters, K: relative constant.
Step 4: The calculated WQI values are classified into five groups. Good water
quality is given a low range, and bad water quality is given high range of WQI
value.
4 Results Analysis
In this section, we show how we collect sensors data from our experiment. We also
show a hardware simulation of how the temperature, pH and turbidity sensors are
connected to the Arduino Uno R3 board. For collecting the data from the sensor
‒ 214 ‒
Acta Polytechnica Hungarica Vol. 18, No. 10, 2021
node, we use a Thingspeak IoT cloud server. The addition of the GSM module
allows the system to be more robust and flexible. GSM module allows the sensors
to send data to the IoT cloud server. The data collection procedure is shown in
Figure 3.
Figure 3
Data Collection Procedure
The optimum pH range for treated and untreated water are shown in Table 1.
IoT cloud server will send the data to the corresponding PC in real-time, which is
shown in Table 3. Table 3 shows the CSV file generated by the Thingspeak server
once data from the GSM module is retrieved. Because of the Thingspeak server-
internal mechanisms, the header of this CSV file is fixed to field1, field2, and field3.
‒ 215 ‒
I. Khan et al. IoT and Wireless Sensor Networking-based Effluent Treatment Plant Monitoring System
Here, field 1 indicates pH (ranges from 0 to 14), field 2 indicates temperature (in
degrees Celsius), and field 3 indicates turbidity (in Nephelometric Turbidity Unit).
Table 3
Experiment Value
From this Table, we show that data is coming to the PC in real-time. The graphical
representation of pH, temperature, and turbidity value is shown in the discussion
section. For hardware simulation, we use Fritzing software, which is used primarily
for performing schematic capture and allow us to simulate the circuit we design.
Using Fritzing software, we simulate how the LM35 temperature sensor, SEN0161
pH meter, and SEN0189 turbidity sensor sends data to the ArduinoUno R3 board.
The simulation process is shown in Figure 4. In the simulation process, we con-nect
the LM35 VCC pin to the +5V of the Arduino board. As the LM35 output pin
produces analog data, so this pin is connected to the ‘A1’ pin of the Arduino Uno
Board. This pin will allow receiving analog values from an exterior origin.
The other pinis paired with the GND of the Arduino Uno board. Since pH and
temperature sensors are also produced output as analog data, the pH sensor is
connected to the ’A0’ pin, and the turbidity sensor is connected to the ’A2’ pin of
the Arduino Uno Board. The other pin is connected to Arduino Uno as the LM35
temperature sensor is connected. We use a serial monitor from the Arduino IDE
software in PC, which is used for checking the values of temperature, pH, and
turbidity. The serial monitor looks like the LCD monitor, which is also used for
‒ 216 ‒
Acta Polytechnica Hungarica Vol. 18, No. 10, 2021
showing the parameter values. The calculated WQI values for some of the sample
data are shown in Table 4. Comparing the result with our cloud status, it shows an
excellent result.
Figure 4
Hardware Simulation Process of Sensors
Although some of the cases can cause problems such as when the cloud server
reports that the water quality is treated, but after calculating the WQI, we find that
the quality of the water is very poor.
Table 4
WQI values for sample data
5 Discussion
The proposed method can be implemented in the industry to check water quality in
real-time. The results of the method are analyzed and discussed in the context of
each scenario. Wireless sensor nodes act as a major role in the whole proposed
system. Arduino Uno R3 collects the data from the sensor node. Here, we developed
‒ 217 ‒
I. Khan et al. IoT and Wireless Sensor Networking-based Effluent Treatment Plant Monitoring System
a program and uploaded it to the microcontroller, which allows the system to collect
data every 5 minutes. Once the data is calculated, the data is passed to the
Thingspeak IoT cloud server using a GSM-GPRS model. IoT cloud server will send
the data to the PC in real-time. The performance of the pH, temperature, and
turbidity sensor data in the Thingspeak IoT cloud server is shown in Figure 5, 6, 7,
which represents how data from the sensor node coming to the Thingspeak IoTcloud
server in real-time. Compare to the other methods used for water quality monitoring,
our method shows an excellent result and proved to be more effective. Here, our
fundamental goal was to monitor the ETP. To monitor the ETP, water quality
monitoring is also required. Most of the method used previously is based on just
water quality monitoring. In industry to monitor industry wastewater, it is
completely a different scenario. Here, we have to consider the environment and also
calculate the value in real-time, but most of the methods like paper [15], [16], [31],
they use light intensity sensor or turbidity sensor for water quality monitoring.
In our method, we use the turbidity sensor, which is more effective in the industry
and shows the exact result. Another method like paper [31] they use an ESP32 Wi-
Fi module to send the data to the IoT cloud server. For the wifi module, it requires
a router to get internet, which may not be possible in the industry. But in our
proposed system, we use a GSM module where a SIM-CARD is attached. We can
send data to the cloud using the GSM module easily. Thi IoT cloud server is
connected to the internet, which uploaded the data into the PC. Using the data, the
authority could easily monitor the quality of water. In our program, we also build
an emergency situation, when the water quality crosses the danger limit, an
emergency SMS will be sent to the corresponding mobile phone. The proposed
system gives authorities the ability to check water quality parameters at the
industrial water discharge site in real-time. Thus authority can easily monitor
whether a particular industry discharged water is polluted or not.
Figure 5
pH Data in Cloud
‒ 218 ‒
Acta Polytechnica Hungarica Vol. 18, No. 10, 2021
Figure 6
Temperature Data in Cloud
Figure 7
Turbidity Data in Cloud
Figure 8
Status
‒ 219 ‒
I. Khan et al. IoT and Wireless Sensor Networking-based Effluent Treatment Plant Monitoring System
Conclusion
In this work, our goal was to monitor the Effluent Treatment Plant using a wireless
sensor network in real-time. This proposed system shows an approach for water
quality monitoring using a wireless sensor network, which is automated, cost-
effective, real-time, server-based, and more effective. We already demonstrated our
field test result with appropriate calibration, which proves that the system can
monitor water quality parameters tirelessly and send those data to the cloud server.
Current procedures that are used in Bangladesh are expensive, non-real-time, and
time-consuming. The problems that can affect our system are if the internet speed
is slow, then the system will take time to send data. In the future, we will use
machine learning to detect whether the water is clean or polluted. We will use more
advanced software for our simulation purpose.
References
[1] Rabbi MA, Hossen J, Sarwar M, Roy PK, Shaheed SB, Hasan MM.
Investigation of waste water quality parameters discharged from textile
manufacturing industries of bangladesh. Current World Environment.
2018;13(2)
[2] Touhami A, Benahmed K, Bounaama F. Monitoring of Greenhouse Based
on Internet of Things and Wireless Sensor Network. InInternational
conference on the Sciences of Electronics, Technologies of Information and
Telecommunications 2018 Dec 18 (pp. 281-289) Springer, Cham
[3] Gomathi N, Jagtap MA. Smart Agriculture System Towards Iot Based
Wireless Sensor Network. Turkish Journal of Computer and Mathematics
Education (TURCOMAT) 2021 Jun 5;12(6):4133-50
[4] Rajput A, Kumaravelu VB. Scalable and sustainable wireless sensor
networks for agricultural application of Internet of things using fuzzy c-
means algorithm. Sustainable Computing: Informatics and Systems. 2019
Jun 1;22:62-74
[5] Gidlund M, Han S, Sisinni E, Saifullah A, Jennehag U. Guest editorial from
industrial wireless sensor networks to industrial internet of things. IEEE
Transactions on Industrial Informatics. 2018;4(5):2194-8
[6] Kiani F, Seyyedabbasi A. Wireless sensor network and internet of things in
precision agriculture, Vol. 99, 2018, pp. 99-103
[7] Manrique JA, Rueda-Rueda JS, Portocarrero JM. Contrasting internet of
things and wireless sensor network from a conceptual overview. In 2016
IEEE international conference on Internet of Things (iThings) and IEEE
green computing and communications (GreenCom) and IEEE cyber,
physical and social computing (CPSCom) and IEEE smart data (SmartData)
2016 Dec 15 (pp. 252-257) IEEE
‒ 220 ‒
Acta Polytechnica Hungarica Vol. 18, No. 10, 2021
‒ 221 ‒
I. Khan et al. IoT and Wireless Sensor Networking-based Effluent Treatment Plant Monitoring System
‒ 222 ‒
Acta Polytechnica Hungarica Vol. 18, No. 10, 2021
‒ 223 ‒
I. Khan et al. IoT and Wireless Sensor Networking-based Effluent Treatment Plant Monitoring System
‒ 224 ‒