Design and Analysis of Water Quality Monitoring and Filtration System For Different Types of Water in Malaysia
Design and Analysis of Water Quality Monitoring and Filtration System For Different Types of Water in Malaysia
Design and Analysis of Water Quality Monitoring and Filtration System For Different Types of Water in Malaysia
https://doi.org/10.1007/s13762-022-04192-x
ORIGINAL PAPER
Received: 27 May 2021 / Revised: 31 December 2021 / Accepted: 10 April 2022 / Published online: 11 June 2022
© The Author(s) under exclusive licence to Iranian Society of Environmentalists (IRSEN) and Science and Research Branch, Islamic Azad University 2022
Abstract
Water pollution always occurs in Malaysia due to industrial, construction, agriculture, and household activities. River pol-
lution can disturb water supply that eventually affects business and household activities. Thus, water quality monitoring
system is needed to detect contaminated water. We developed a water quality monitoring and filtration system controlled by
Arduino. The proposed system was designed in Proteus software and ThingSpeak platform was used for real-time monitor-
ing. The main objective of the study was to compare water quality of river, lake and tap water in terms of pH, temperature,
turbidity, electrical conductivity and oxidation–reduction potential. If the water quality was not satisfied, the water sample
would be filtered through filtration system. Water turbidity level, pH, temperature, electrical conductivity, and oxidation–
reduction potential for filtered and nonfiltered water were compared and analyzed according to international and national
water quality standard. Besides that, statistical analysis such as box plot and one-way analysis of variance test was applied
to validate data from the system. The real-time water quality monitoring system was implemented through data storage,
data transfer, and data processing. The system was connected to wireless fidelity whereas the output data was sent to the
user and monitored by ThingSpeak. The system can be further upgraded and scaled up to be applied in the main tank at
our home or factory. The outcome of this research can be used as a reference for further study on lake and river pollution
monitoring system.
Keywords Turbidity · Ph · Temperature · Electrical conductivity · Oxidation–reduction potential · Boxplot · Analysis of
variance
13
Vol.:(0123456789)
3790 International Journal of Environmental Science and Technology (2023) 20:3789–3800
(Galal et al. 2020). It is essential to measure and monitor on IoT technology was applied to analyze live data streams.
physical, chemical, and biological parameters of water in Analysis was done for different types of water where one-
order to identify its quality. Then, types of water treatment way Analysis of Variance (ANOVA) test was used to observe
can be identified before it can be supplied to consumers as the significance of the experimental results. The quality of
tap water and drinking water (Huang et al. 2015; Alsulaili filtered and unfiltered water was also compared according to
et al. 2015). Elsheikh et al. (2018) compared three different water quality standard established by World Health Organi-
types of water filtration systems and allowed assessment and zation (Jabatan Alam Sekitar 2019; Engineering Services
evaluation to be made towards the execution and fulfillment Division 2016; WHO 2011). Due to ongoing Restricted
of each water filtration systems. Delgado et al. (2020) deter- Movement Control Order from Malaysian Government
mined the effect of illegal mining on the water quality by because of Covid-19 Pandemic, water samples are limited
applying grey system. By applying grey clustering method, to sites situated in Nilai, Negeri Sembilan. The water sam-
water quality was grouped into three categories: good, mod- ples consisted of tap water taken from a local household
erate, and low water quality. Supriyono et al. (2020) devel- situated in Nilai, river water from Mahang River and lake
oped a telemonitoring system that automatically measured water from a lake in Universiti Sains Islam Malaysia. The
and collected variables of water and air quality in coastal sampling process was done in the month of November 2020
fishponds and continuously displayed the data to the user. for ten hours (from 9:00 a.m. until 6:00 p.m) a day.
Water quality management and monitoring networks are
also crucial. The allowed wastewater discharge rates for con-
taminant resources depend on two factors: treatment costs
and water quality standard (Aghasian et al. 2017). Aghasian Materials and methods
et al. integrated water quality simulation model with parti-
cle swarm optimization model and developed various pollu- a) Water sampling method
tion loadings discharge policies using bankruptcy method. Water samples were collected from Mahang River, a
Results showed that the proposed model reduced the salin- lake in Universiti Sains Islam Malaysia, and tap water.
ity of the allocated water demands leading to a decrease We monitored pH, turbidity, temperature, electrical
in salinity discharged into the river. Genetic algorithm was conductivity (EC), and oxidation–reduction potential
developed to minimize wastewater treatment costs and (ORP) of the samples from 9:00 a.m. until 6:00 p.m.
dissolved oxygen violation from the standard level. This for 10 h. Water samples were also transferred into a
method was estimated to reduce waste load from 145.5 to tank to undergo filtration process. Readings from the
79 and treatment cost from the range of ($160,000–180,000) sensors were collected, translated and processed by the
to ($100,000–130,000). Thus, the proposed models can sat- microcontroller before being displayed using LCD and
isfy water quality with low treatment cost (Farjoudi et. al. uploaded into cloud storage for monitoring.
2020). Meanwhile, monitoring network of groundwater was b) System design
designed using DRASTIC method and capture zone analysis We designed a water monitoring and filtration sys-
where the design was developed according to monitoring tem using sensors to detect temperature, pH value,
wells priority. Differential Evolution (DE) algorithm was oxidation–reduction potential (ORP), electrical con-
used to optimize the DRASTIC model in order to find the ductivity (EC), and turbidity. A microcontroller unit
highest correlation between high and vulnerable areas of consisted of Arduino Uno and Mega, was used as the
electrical conductivity. The authors claimed that by proper main controller. We also used a data transmission
estimating vulnerability of existing wells and the capture block, ESP8266 Wi-Fi module and a water filtration
zones, the monitoring wells could be prioritized (Yousefi et. unit which consisted of a water pump and a water filter.
al. 2021). Thus, proper water quality monitoring, filtering, NodeMCU software and open-source framework
and treatment methods are needed. were used to construct Internet of Things (IoT)
Most previous studies on water quality monitoring sys- devices. The data processed by the microcontroller
tem used different microcontroller unit such as Raspberry unit was uploaded and updated into Cloud storage and
Pi, Arduino, and Waspmote. The studies mainly focused ThingSpeak application through data communication
on the capability of the system to monitor water quality by unit, ESP8266 Wi-Fi module. After logging into the
detecting water quality parameter using various electronics ThingSpeak application with our unique user ID and
sensors. The previous research focused more on the system password, we could access data from the monitoring
design without doing any analysis. system in real-time provided that the system was con-
This study proposes a real-time water quality monitoring nected to the internet. Water quality for filtered and
system using Arduino and five types of sensors, completed unfiltered water was also compared. Figure 1 shows
with data analysis. ThingSpeak open-source software based the flowchart of the system.
13
International Journal of Environmental Science and Technology (2023) 20:3789–3800 3791
The Arduino Uno processed the turbidity, pH, tem- a filtration system. The sensor readings of the filtered
perature, electrical conductivity (EC), and oxidation– water were observed and compared with the unfiltered
reduction potential (ORP) of the water samples and water.
sent to the ThingSpeak application using internet net- c) Analysis Methods
work. ThingSpeak application displayed the tempera- (i) Boxplot analysis
ture, turbidity, pH, electrical conductivity (EC) and We used boxplot analysis to observe the range of
oxidation–reduction potential (ORP) value of water data and to identify any abnormal data. Boxplot is a
in real-time. Based on Fig. 1, we determined the bad technique to describe and summarize data. Boxplot
quality of water if the sensor readings exceed range graph shows the data distribution, range, minimum
of the threshold values. Water would be automatically value, maximum value, mean, and skewness by
pumped into a water filter for the filtration process. The showing five-number summary of a set of data which
threshold values for the sensors were set according to includes minimum and maximum range values, lower
the limit set in the national water standard and World quartile, upper quartile, and median (Potter 2006).
Health Organization (WHO) (Jabatan Alam Sekitar (ii) One-way ANOVA
2019; Engineering Services Division 2016; WHO Analysis of variance (ANOVA) is a statistical
2011). The sensors were easy to use, cost-effective, method that is useful to give important informa-
and portable. Figure 2 shows the circuit design of the tion like interpreting outcomes of an experiment
system in Proteus software. Simulation was done using and identifying the influence of a factor on the pro-
the Proteus software to ensure the system could run cessing parameters by comparing the mean values
properly before assembling the real circuit on board. of some samples (Ostertagova 2013). One-way
Figure 3 shows the electronic circuit of the proposed ANOVA is used for data that are divided into sev-
water quality monitoring system. All water quality eral groups associated with only one factor. The
parameter sensors, LCD display, Wi-Fi module and mean values are compared to determine the signifi-
water pump were connected to the main microcon- cant level of differences in the associated popula-
troller board. Figure 4 shows water quality system tion of samples. One-way ANOVA test produces F
with filtration unit. Lake and river water samples were value (Eq. 1) (Sullivan 2021) and p-value.
collected, stored and monitored in a tank connected to
13
3792 International Journal of Environmental Science and Technology (2023) 20:3789–3800
Fig. 2 Circuit design drawn in Proteus Software. The design was translated into hardware system in Fig. 3
Fig. 3 Electronic circuit of the proposed water quality monitoring Fig. 4 The proposed technique of monitoring water with water filtra-
system tion system
∑ � �2
nj X j − X ∕(k − 1) MSbetween is the probability of F statistical values that measures
F= �2 = (1) the evidence to accept or reject hypothesis. To evaluate
∑∑� MSwithin
X − X j ∕(N − k) the null hypothesis, the differences between means are
identified by comparing the p-value with the standard
nj is the size of jth group, X j is the sample mean in significance level, 0.05 (Ostertagova 2013).
jth group, X is the overall mean, k is the number
of independent groups and N is the total number of
observations in the analysis (Sullivan 2021). MS rep- Results and discussion
resents mean squares, thus MSbetween is the mean sum
of squares between sample groups and MSwithin is the In this section, we depict output from water quality monitor-
mean sum of squares within the sample groups. F ing system and analyze the output based on five water quality
value is used to determine p-value where the p-value parameters: pH, temperature, turbidity, oxidation–reduction
13
International Journal of Environmental Science and Technology (2023) 20:3789–3800 3793
potential and electrical conductivity. Real-time values of the phosphate and nitrate ions (EPA 2012). Meanwhile, oxi-
parameters are observed through Thingspeak application dation–reduction potential (ORP) can be defined as the
which indirectly can assist users to monitor the system con- capability of a water source to break down waste products
tinuously. Figure 5 shows the real-time water quality moni- like dead plants and animals. Unpolluted lakes and rivers
toring system for users of ThingSpeak application. have high value of oxidation–reduction potential, show-
ing that the water has high amount of dissolved oxygen
(a) Physical parameters of water quality with box (Kremer 2018).
plot analysis Monitoring water quality parameters is done by taking
the readings of the sensors for ten hours from 9:00 a.m. until
Temperature is an important parameter for water monitoring 6:00 p.m. All water quality parameters detected in the sys-
system as the taste, smells, viscosity, solubility and chemical tem are compared with the National Water Quality Standard
reactions are influenced by temperature (APHA 2005; Alley and Drinking Water Quality Standard (WHO 2011; Engi-
2007). Turbidity describes the cloudiness of water due to the neering Services Division 2016).
presence of suspended particles like clay, silts, and precipita- Figure 6 (a) shows temperature values for tap, lake and
tion of chemical and organic particles (APHA 2005; WHO river water and Fig. 6 (b) depicts the range of temperature
2017). Turbidity can be used as a good indicator to detect in boxplot. There are two abnormal temperature values for
the presence of dangerous particles and contaminants (WHO tap water and river water shows higher fluctuation compared
2017). Turbidity is expressed in terms of nephelometric tur- to others. The fluctuation in temperature is due to sensitiv-
bidity unit (NTU). Turbidity above 5 NTU is visible to eyes ity of sensors. Figure 6 (a) and (b) show that river water
(WHO 2017). The pH is an important water quality param- has the lowest temperature with the range from 27.87 °C
eter to determine the basicity of an aqueous solution. The to 28.91 °C with the average, 28.19 °C and the standard
pH value from 0 to 14 indicates the acidity, neutrality or deviation, 0.349. Lake water has the highest range of tem-
alkalinity of the water (Tomar 1999). Acidic solution has perature, from 30.18 to 30.76 °C with the average, 30.32 °C
pH less than 7 and pH ~ 7 indicates a neutral solution. Mean- and the standard deviation, 0.170. The temperature of tap
while, pH greater than 7 indicates an alkalic solution (WHO water fluctuates from 27.6 to 30 °C. The mean temperature
2011). Unreasonably high or low pH of water is not safe for is 29.55 °C and the standard deviation value is 0.754. Lake
household usage and drinking water (DeZuane 1997). The water has the highest temperature as the surface of the water
acceptable pH for consuming and drinking water is from 6.5 is exposed to sunlight and has zero or low motion water.
to 9 (Engineering Services Division 2016) whereas water Lake water also shows stable temperature, proved by the
temperature can be influenced by surrounding environment. small standard deviation whereas temperature of tap water
Electrical conductivity (EC) refers to the ability of elec- fluctuates resulting in the highest standard deviation. Tap
tric to flow in the water. Conductivity value of water is water comes from tank and pipe, can be easily affected by
normally constant throughout the times. Thus, any changes the temperature of the day. Water takes longer time to warm
in conductivity depict the possibility of water pollution up and cool down compared to air. River water has the low-
due to chemical reaction with water. Conductivity will est temperature because it is continuously flowing resulting
increase due to the presence of chemicals like chloride, in slow heat transfer.
Figure 7 (a) and (b) show the pH variations of water sam-
ples and the boxplot for pH values. Normal tap water has
neutral pH from 7.16 to 8.33 with the average pH, 7.551 and
the standard deviation, 0.477. High fluctuation of pH in tap
water (Fig. 7 (b)) is attributed to chemicals in the water as
pH is related to the amount of hydrogen and hydroxyl ions.
(Tomar 1999). River water has higher pH compared to tap
water with the range from 8.04 to 8.16, the average pH, 8.09
and standard deviation, 0.062. Lake water has the highest pH
ranging from 9.04 to 9.18. The mean pH for lake water sam-
ple is 9.09 with standard deviation, 0.051. The lake water
has the highest pH due to the presence of carbonated-rich
soils like limestone. Besides that, algae and aquatic plants in
the lake water apply photosynthesis process that uses hydro-
gen which also can contribute to the high pH in the lake
Fig. 5 The display of the ThingSpeak application shows the turbid-
ity of the river water. Date and time are also displayed for real-time water (Fondriest Environmental 2013). The pH of river and
monitoring lake can also be affected by the activities at the shoreline.
13
3794 International Journal of Environmental Science and Technology (2023) 20:3789–3800
Fig. 6 a Temperature values for three water samples; b Temperature boxplot for three water samples. Ten readings are used for the analysis
Fig. 7 a pH variation for three water samples; b pH boxplot for three water samples. Ten readings are used for the analysis
Figure 8 (a) and (b) show the turbidity variations and The river water is turbid due to the presence of suspended
the boxplot for all samples. Lake water depicts the highest and colloidal matter like clay, silt, finely divided organic and
fluctuation of turbidity in 10 h (Fig. 8 (b)), due to variation inorganic matter, plankton and other microscopic organisms
of organic materials. Tap water shows the lowest turbidity (Allen et al. 2008). Lake has the highest range of turbidity,
level whereas river depicts the highest turbidity level. Tap attributed to the clays, silts, suspended bottom sediments,
water has turbidity level from 0 to 2 NTU. The mean value phytoplankton and algae. According to Malaysia National
is 0.24 NTU and the standard deviation value is 0.622. River Water Standard, based on the turbidity, pH and temperature
water depicts turbidity level from 48.05 NTU to 98.43 NTU of all water samples, tap water is safe to be consumed but
while lake water sample shows the highest turbidity values, lake and river water need to be treated and filtered before
from 136.92 NTU to 223.72 NTU. The mean turbidity value we can consume it as drinking water (Jabatan Alam Sekitar
for river and lake samples are 77.004 NTU and 181.292 2019).
NTU respectively. The standard deviation of the turbidity for Figure 9 shows the electrical conductivity values of the
river and lake water are 16.860 and 39.07, showing higher water samples. Due to the use of chlorine that contains
fluctuation compared to tap water. Tap water has the lowest electrons in water treatment process, tap water shows the
turbidity level because the water is transparent and clear. highest range of electrical conductivity values and highest
13
International Journal of Environmental Science and Technology (2023) 20:3789–3800 3795
Fig. 8 a Turbidity values for the three water samples; b Turbidity boxplot for three water samples. Ten readings are used for the analysis
Fig. 9 a Electrical conductivity values for three water samples; b Electrical conductivity boxplot for three water samples. Ten readings are used
for the analysis
fluctuation (Kremer 2018). Electrical conductivity of tap river water has the lowest oxidation–reduction potential
water has maximum value ~ 1.81mS/cm and minimum readings with range from 153 to 173 mV and standard
value ~ 0.88mS/cm with standard deviation ~ 0.33 and deviation ~ 6.15. Tap water has the highest range of oxida-
mean ~ 1.2mS/cm. The range of electrical conductivity of tion–reduction potential due to water treatment that involves
river water is from 0.22 to 0.33mS/cm, the lowest range chlorine. Chlorine is used in water treatment to kill bacteria,
compared to other samples. The mean and standard devia- parasites, viruses and microbes in water by neutralizing and
tion of electrical conductivity for river water are 0.25 and oxidizing bacteria, parasites, viruses and microbes. This
0.04 respectively. Charged ions in river and lake water come oxidation process increases the level of oxidation–reduc-
from the presence of dissolved minerals like clay soils or tion potential values of water (Kremer 2018). The oxida-
limestone (Huron River Watershed Council 2013). tion–reduction potential values of river and lake water
Figure 10 shows the readings of oxidation–reduction samples fall slightly under the healthy range of freshwater
potential of the water samples. The oxidation–reduc- oxidation–reduction potential value, from 300 to 500 mil-
tion potential values of tap water are in the highest range, livolts. Lower oxidation–reduction value is also expected at
from 280 to 289 mV with standard deviation ~ 3.14 while the bottom of the lake and river. Oxygen level at the bottom
13
3796 International Journal of Environmental Science and Technology (2023) 20:3789–3800
Fig. 10 a Oxidation–reduction potential variation of three water samples; b Oxidation–reduction potential boxplot for three water samples. Ten
readings are used for the analysis
Table 1 One-way ANOVA test for different water parameters table, the p-value of all parameters is less than 0.05. Thus,
Parameters F p-value
null hypothesis is rejected. For all water parameters tested,
at least one group of water samples has a significant differ-
pH 78.1138 5.93 × 10–12 ≈ 0.0000 ence from overall mean of the water samples. The statisti-
Temperature 48.6633 1.11 × 10–09 ≈ 0.0000 cal significance shows that data collected are probably true
Turbidity 136.7881 7.43 × 10–15 ≈ 0.0000 and is due to factors of interest. Thus, we strongly suppose
Electrical conductivity 62.3271 7.62 × 10–11 ≈ 0.0000 that pH, temperature, turbidity, electrical conductivity, and
Oxidation–reduction potential 466.1869 1.17 × 10–21 ≈ 0.0000 oxidation–reduction potential can give effect the analysis of
water quality.
of the lake and river is low due to the usage of the oxygen (c) Comparison of filtered and unfiltered water
by bacteria (Wetzel 2001).
Figure 11 shows the turbidity, pH and temperature of
(b) Statistical analysis—One‑way ANOVA normal tap water from the same source for two days. As
normal tap water is commonly safe to be used, the water
One-way Analysis of variance (ANOVA) model is done does not need to undergo filtration process. The tap water
to test the null hypothesis that states all parameters have sample from same source is compared for two different
similar population mean. If the variability of the sample days. The mean value for turbidity, pH value and tempera-
mean is large, the null hypothesis is rejected. The alter- ture of the tap water sample in the first and second day are
nate hypothesis that states at least one population mean 0.1 NTU, 7.501 and 29.21 °C respectively. The standard
is different from the others will be accepted (Ostertagova deviation values for tap water in both days are 0.208 for
2013). When there are statistically significant differences turbidity, 0.429 for pH values and 1.026 for temperature.
between the means, p-value is less than or equal to α value The mean and standard deviation depicts that the system
(0.05). Null hypothesis is rejected as there is at least one is reliable due to less fluctuation especially for turbid-
different population mean. Table 1 shows one-way ANOVA ity sensing system. The turbidity readings for tap water
test results done using OriginPro software. The one-way are lower than 1 NTU, in the safe range of water quality
ANOVA test revealed that there was a statistically significant (WHO 2017). The pH of the tap water shows that the water
difference in the means of pH, temperature, turbidity, electri- is in the neutral and light alkalic range. The temperature
cal conductivity and oxidation–reduction potential between of tap water fluctuates depending on the weather and sur-
at least two groups with (F(3,10) = [78.1138], p = 0.0000), rounding environment. Figure 12 shows the turbidity, tem-
(F(3,10) = [48.6633], p = 0.0000), (F(3,10) = [136.7881], perature, and pH value of lake water before and after filtra-
p = 0.0000), (F(3,10) = [62.3271], p = 0.0000) and tion process. The average of turbidity, temperature, and pH
(F(3,10) = [466.1869], p = 0.0000) respectively. From the for lake water before filtration is 181.29 NTU, 30.32 °C
13
International Journal of Environmental Science and Technology (2023) 20:3789–3800 3797
13
3798 International Journal of Environmental Science and Technology (2023) 20:3789–3800
13
International Journal of Environmental Science and Technology (2023) 20:3789–3800 3799
13
3800 International Journal of Environmental Science and Technology (2023) 20:3789–3800
Wetzel RG (2001) Limnology: lake and river ecosystems, 3rd edn. capture zone analysis. Int J of Environ Res. https://doi.org/10.
Academic Press, San Diego 1007/s41742-021-00348-8
WHO (2011) Guidelines for drinking water quality. World Health Zare Farjoudi S, Moridi A, Sarang A (2020) Multi-objective waste load
Organisation, Geneva allocation in river system under inflow uncertainty. Int J of Envi-
WHO. (2017). Water quality and health - review of turbidity: informa- ron Sc and Tech. https://doi.org/10.1007/s13762-020-02897-5
tion for regulators and water suppliers. World Health Organisation
Yousefi H, Omidi M, Moridi A, Sarang A (2021) Groundwater moni-
toring network design using optimized DRASTIC method and
13