ISCEE 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 1144 (2021) 012064 doi:10.1088/1757-899X/1144/1/012064
Development of Water Quality Monitoring Device Using
Arduino UNO
I M Hakimi1 and Z Jamil1*
1
School of Civil Engineering, College of Engineering, Universiti Teknologi MARA, 40450
Shah Alam, Selangor, Malaysia
*Corresponding author: zadariana@[Link]
Abstract. Regular water quality monitoring of water bodies is essential to ensure it is within
the allowing standard limits. The development of a simple and low-cost water quality
measurement device for real time monitoring using Internet of Things (IoT) technology is
presented in this study. Kolora meter is an alternative to the existing commercial monitoring
devices. It was developed using the open-source platform Arduino UNO model and NodeMCU
board as the microcontroller and Wi-Fi connection respectively. Two sensors such as
temperature and turbidity were selected to be installed in the early stage of Kolora meter
development. The physical parameters (temperature and turbidity) of water were measured and
the measured data collected are able to be viewed and monitored on the mobile phone using
Kolora Mobile Application via Wi-Fi connection. Therefore, this surface water quality device
has potential to be applied in real time monitoring for early pollution detection and during
COVID-19 pandemic spread due to limited movement.
1. Methodology
About 1% water resources such as river, lake and ocean are utilized as water supply, irrigation and
recreation for human activities. The increase of population causes these water resources polluted with
rubbish, toxic wastes, agriculture fertilizer and others. The physical, chemical and biological
properties of the water resources should be regularly monitored to ensure they are safe to be used.
Therefore, it is important to have an efficient water quality monitoring system to monitor the water
quality in a particular area.
The water monitoring activities need to be carried out periodically to minimise the exposure of
pollution to community and aquatic life. The traditional methods of water quality monitor involve
manual collections of water samples from different locations. Typical water quality monitoring
technologies are lack of integration, involve labour-intensive, long time to set up and expensive [1].
The size is large and may be difficult for transportation especially for isolated and broad monitoring
areas. Furthermore, the operation of the instrument needs to be carried out by an experienced user.
The application of Internet of Things (IoT) concept brings new inventions in society such as the
Radio-Frequency Identification (RFID), smart home, smart device, sensors and mobile phones. These
technologies can be integrated among the device components to produce the desired product [2]. The
integration of IoT and water quality monitoring system is viable and has shown promising products
[3]. Daigavane and Gaikwad [4] has successfully developed a low-cost system for real monitoring
system ATMEGA 328 with Wi-Fi module [4]. It enhances the detection system of the polluted water
and helps to eliminate some drawbacks of the older version systems. This shows that the
Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution
of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
Published under licence by IOP Publishing Ltd 1
ISCEE 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 1144 (2021) 012064 doi:10.1088/1757-899X/1144/1/012064
implementation of the IoT in the water quality monitoring system brings a huge advantage to the smart
environmental monitoring field.
Arduino is an open-source software system that can be used to developed desired devices easily
[5]. Since the Arduino microcontroller is an open-source software, thus, it is easily to be accessed and
significantly reduces the developed device cost. It is also recognized as an effective approach used by
the researchers to manage and control the test apparatus via an automated mechanism [6 – 7]. Cruz et
al. [8] developed an automated online monitoring system to control parameters variables (pH,
temperature) of an anaerobic digestion process for biogas production as an alternative to higher
monitoring cost equipment, decreasing management costs. This system assisted in the performance
anaerobic digestion process to improve biogas production [8].
In this study, the application of Arduino platform, sensors, Liquid Crystal Display (LCD) and
NodeMCU ESP8266 to develop water quality monitoring device (Kolora meter) with better features
and lower price is presented. The NodeMCU ESP8266 was installed to connect the device with the
Blynk App for real-time data transfer via Wi Fi connection. The validation of temperature and
turbidity data for performance stability and consistency of the device was carried out by testing the
device in different conditions of water quality.
2. Methodology
2.1. Device Setup
The general block diagram for Kolora meter development is shown in figure 1. This block diagram
explains the system architecture of Kolora meter. Figure 2 shows the overall hardware parts including
breadboard, DS18B20 temperature sensor module, SEN0189 turbidity sensor module, LCD and
NodeMCU ESP8266 board installed on the Arduino UNO board for Kolora meter.
Figure 1. The block diagram for the development of Kolora.
Figure 2. The wiring profile of the Kolora.
2
ISCEE 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 1144 (2021) 012064 doi:10.1088/1757-899X/1144/1/012064
The Arduino UNO microcontroller was programmed using C++ programming. The coding was
programmed in Arduino App Version 1.8.5. To install each sensor module in the Arduino UNO
system, a specific library was required to enable the coding of specific sensor to function. The sensor
module is summarized in Table 1. The coding begins with the declaration of the library name and the
values. Then the pin was assigned and used for Kolora meter. Finally, the looping of the coding
command was assigned.
Table 1. Formatting sections, subsections and subsubsections.
Module Library Name
[Link]
NodeMCU ESP8266
communication-between-nodemcu-and-arduino-640819
[Link]
LCD1602 LCD Module
library
DS18B20 Temperature Sensor Module [Link]
SEN0189 Turbidity Sensor Module [Link]
2.2. Calibration Procedure
Turbidity.
The turbidity sensor used in this study was the SEN0189. It measured turbidity in water by
transmitting the light source from infrared LED towards infrared phototransistor. The infrared
phototransistor detects the amount of light that passes through the turbid water and then automatically
changes its resistance and voltage value. The signals received and processed by Arduino
microcontroller and displayed on the LCD screen [9].
The turbidity calibration was done by diluting different amount of flour from 1 to 5 g/L in water,
which acts as suspended solids. The total suspended solids (g/L) of these solutions were determined.
The turbidity SEN 0189 probe was immersed in different concentrations of the mixed solutions to
obtain the turbidity and voltage values. The relationship of total suspended solids (g/L) and turbidity
(NTU) in water was determined based on equation (1) [9]. This equation was used as a reference to
calibrate our turbidity sensor (SEN0189) to provide accurate readings. The distilled water was used as
the blank.
Turbidity of water (NTU) = 1.873 + (0.518 × Total Suspended Solids (mg/L) (1)
Temperature
The DS18B20 sensor was used as the temperature sensor. The temperature sensor has been already
calibrated in its fabrication [10]. The sensor has the operating range from -55̊ C to +125̊ C with an
accuracy of ±2̊ C and it can achieve accuracy of ±0.5̊ C for the temperature range of -10̊ C to +85̊ C.
The DS18B20 temperature sensor readings were compared with the thermometer in the laboratory.
2.3. Blynk Application
The Blynk App helps to build a graphic interface in an Arduino program. Firstly, the Arduino was
connected to a computer and run the Arduino IDE. Then the Blynk application was downloaded from
Google Play store and installed into a mobile phone. The Blynk library was downloaded from
[Link] [11] and then added into Arduino IDE. The Blynk app was used to display the data
measured by the Kolora meter. Widget boxes were set and assigned to the respected virtual pins and
sensors as shown in Table 2.
3
ISCEE 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 1144 (2021) 012064 doi:10.1088/1757-899X/1144/1/012064
The temperature and turbidity sensors were integrated into the Blynk App to form Kolora Mobile
app. This app consists of SuperChart, turbidity and temperature. The SuperChart was used to display
the data measured by Kolora meter at different timestamp selection. This allows real-time data
collection from the sensors.
Table 2. The sensors assigned to virtual pins.
Sensor Virtual pins
Turbidity V2
Temperature V3
2.4. Validation of Kolora meter
The validation of Kolora meter was done by performing water quality measurements in two conditions
of water, clear and turbid water in the laboratory. However, the field testing has not yet been carried
out and planned for future study.
3. Methodology
There were two water quality parameters, which is the turbidity and temperature, installed and
measured in this study. The temperature and turbidity sensors were successfully installed and
calibrated in Kolora meter. The calibration of the sensor was important to ensure the data collected is
accurate and reliable. The Kolora application was developed to collect and save the data measured
from Kolora meter remotely and wirelessly. After the calibration process, the Kolora device was tested
for validation in the laboratory.
3.1. Parameter results
Turbidity
Prior the use of SEN0189 turbidity sensor, the calibration of the sensor was done by measuring the
relationship different concetrations of suspended sediment (flour) in the water and its turbidity values
as shown in Figure 3. The calibration of turbidity sensor method is based on the previous study, which
used flour as sediment [9]. The coefficient of the turbidity sensor obtained from the value of R2,
which at 0.9913. This shows a linear relationship of the total suspended solids in the solution and the
cloudiness of solution. Therefore, this data is reliable to describe the relationship between turbidity
reading and total suspended sediment.
Figure 3. The relationship between turbidity and the total suspended solids.
4
ISCEE 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 1144 (2021) 012064 doi:10.1088/1757-899X/1144/1/012064
The graph of voltage against solution turbidity is illustrated in Figure 4. It shows that the voltage
values decreased when the turbidity increased. Based on this graph, the sensitivity of the sensor was
- 0.0012 with the maximum voltage operating at 4.0769 V. The coefficient of the voltage vs turbidity
was obtained at 0.998. This coefficient is comparable with the value (0.9762) obtained by Hakim et al.
(2019) [9]. This proves that the equation is suitable to be used for the turbidity sensor calibration in the
Kolora meter.
Figure 4. The graph of voltage value against turbidity.
Temperature
The comparison of temperature data obtained from the laboratory thermometer and DS18B20 sensor is
illustrated in Figure 5. The temperature of water sample was recorded based on the room temperature
in the laboratory, which was ~25 ̊C, for 10 minutes. The temperature readings were constant at 25 ̊C
until the 7th minutes of monitoring, however it slightly fluctuated to 5.12 ̊C. This might be due to the
instability or the movement of the sensor that might change the temperature readings. However,
overall temperature readings from both sensor and laboratory thermometer showed similar value
except at 7th minute. This shows that the Kolora temperature sensor is reliable and stable. It is
reported that the thermometer sensor error is at ± 1 ̊C for temperature range of -30 ̊C to +100 [10]. It is
also shown by Cruz et al. (2019) that the monitoring values of pH and temperature for almost 20 days
in their study were noticeably close to the offline methods (using common laboratory apparatus) with
less than 5% error [8].
Figure 5. The comparison of the temperature readings obtained from the Kolora
meter and laboratory thermometer.
5
ISCEE 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 1144 (2021) 012064 doi:10.1088/1757-899X/1144/1/012064
3.2. Kolora Mobile App
The Kolora Application was successfully linked to a smart phone. This is an advantage for an early
detection of pollution and distance monitoring location due to its ability to monitor remotely.
Furthermore, this device does not require people on duty at the monitoring sites. To prove the ability
of Kolora meter, it was tested for clear and turbid water quality measurement at room temperature
~28°C. Figure 6 shows the real-time data of temperature and turbidity of tap water measurement and
displayed by the Superchart in Kolora mobile app. It is shown that the continuous measurement of
turbidity and temperature are represented by the graphs in the Superchart. The Kolora meter has an
advantage for a long duration monitoring as it has options of 1h until 3 months continuous monitoring.
The data collected can be monitored in real-time or recorded version. The graph can be displayed
individually according to the parameter required by disabling the legend above the graph. The data can
also be saved into CSV format for data compilation. However, further study needs to be done to
measure the maximum distance coverage of the Kolora Mobile App via wi-fi and the Kolora Meter.
Figure 6. The interface of Superchart in Kolora Mobile App.
3.3. Validation Kolora meter
The Kolora meter was tested in two (2) conditions of water, clear and turbid water in room
temperature as shown in Figure 7. Both conditions showed similar room temperature, which is 27.69
°C. The value turbidity of the turbid water measured using on-board sensor implemented in Kolora
Meter was 428.75 NTU compared to 0 NTU in clear water. Further on field tests using this device will
be carried out in future study.
6
ISCEE 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 1144 (2021) 012064 doi:10.1088/1757-899X/1144/1/012064
Figure 7. Kolora meter was tested in (a) clear water (27.69oC, 0.00
NTU) and (b) turbid water (27.69oC, 428.75 NTU).
4. Conclusion
A water quality monitoring device has been successfully developed using IoT system in this study. It
has several advantages such as simple, low cost and it can be modified according to the needs of the
researcher. Two sensors were successfully installed and calibrated in this early stage of study. The
integration of online monitoring via Kolora meter App using mobile phone is an advantage for an
early detection of pollution and distance monitoring location due to its ability to monitor remotely.
Furthermore, this device does not require people on duty at the monitoring sites. The Kolora meter
could also be used when there is limited movement especially during COIVID-19 spread period. To
prove the ability of Kolora meter, it was tested for clear and turbid water quality measurement at room
temperature ~28°C in the laboratory and showed a promising and reliable results.
5. References
[1] Banna M H, Imran S, Francisque A, Najjaran H, Sadiq R, Rodriguez M and Hoorfar M 2014
Online drinking water quality monitoring: Review on available and emerging technologies,
Crit Rev Env Sci Tec 44 1370–1421
[2] Barbon G, Margolis M, Palumbo F, Raimondi F and Weldin N 2016 Taking Arduino to the
Internet of Things: The ASIP programming model, Comput. Commun. 89–90 128–140
[3] Moparthi N R, Mukesh C and Vidya Sagar P 2018 Water quality monitoring system using IOT
4th Int. Conf. on Advances in Electrical, Electronics, Information, Communication and Bio-
Informatics (AEEICB) (Chenai)
7
ISCEE 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 1144 (2021) 012064 doi:10.1088/1757-899X/1144/1/012064
[4] Daigavane V V and Gaikwad M A 2017 Water Quality Monitoring System Based on IoT
Advances in Wireless and Mobie Communications 10(5) 1107-1116
[5] Badamasi Y A 2014 The working principle of an Arduino 11th Int. Conf. on Electronics,
Computer and Computation (ICECCO) (Abuja)
[6] Maraba D and Bulur E 2017 Design and construction of an automated OSL reader with open
source software and hardware, Radiat. Meas 106 632-637
[7] Zohari, M H and Johari M F 2019 Weather monitoring system using blynk application,
International Journal of Innovative Technology and Exploring Engineering, 9 1315-1319
[8] Cruz I A, de Melo L, Leite A N, Melquiades Sátiro J V, Santos Andrade L R, Torres N H,
Romanholo Ferreira L F 2019 A new approach using an open-source low cost system for
monitoring and controlling biogas production from dairy wastewater. J. Clean Prod 241
118284
[9] Hakim W L, Hasanah L, Mulyanti B, and Aminudin A 2019 Characterization of turbidity water
sensor SEN0189 on the changes of total suspended solids in the water Journal of Physics:
Conference Series 1280 022064
[10] Maxim integrated 2017 Water Temperature Sensor: DS18S20, Maxim Integrated 92 1-21
[11] Blynk 2020 Blynk library Retrieved on Jun 12, 2020 from [Link]
8
Reproduced with permission of copyright owner. Further reproduction
prohibited without permission.