Microcontroller-Based Water Quality Monitoring Sys
Microcontroller-Based Water Quality Monitoring Sys
https://doi.org/10.47709/brilliance.v2i2.1544
ABSTRACT
So far, Regional Drinking Water Companies (PDAMs) have used conventional
methods by taking water samples, measuring all water quality parameters, and
*Corresponding Author analyzing them one by one. In addition, the process of making conclusions on
Article History: water quality has not been integrated so that it can cause misclassification of
Submitted: 02-06-2022 water quality and prolong the work. In this study, an expert system was
Accepted: 06-06-2022 designed to monitor water quality that works in real time so that it can be
Published: 07-06-2022 accessed anytime and anywhere. The water quality analysis process is carried
Keywords: out with a fuzzy classifier realized using Arduino Mega 2560. The fuzzy input
Internet of things; variables include the pH value, total dissolved solids (TDS), and turbidity or
Microcontroller; Turbidity turbidity. A fuzzy inference system is used to classify water quality into three
Brilliance: Research of classes, namely good (meets quality standards), ordinary, and bad (polluted).
Artificial Intelligence is licensed The expert system of success provides inference results with a 100% success
under a Creative Commons percentage. The results of monitoring and water quality classification can be
Attribution-NonCommercial 4.0 accessed online using the Internet of Things (IoT) ThingSpeak platform
International (CC BY-NC 4.0).
INTRODUCTION
Water is the main need needed for human daily needs. The water used must meet the requirements stipulated in
the Regulation of the Minister of Health of the Republic of Indonesia No. 32 of 2017 concerning Environmental Health
Quality Standards and Water Health Requirements for Sanitary Hygiene Needs,[1]. Water has many uses for sanitary
hygiene needs including bathing, washing groceries, washing dishes, washing clothes, as well as for drinking water.
Polluted water causes many bad impacts, such as environmental damage, environmental discomfort, to reduce the level
of human health and safety. Determination of water quality is still mostly done by conventional methods, namely by
measuring and analyzing one by one the test results data. Of course, this will take a long time, also the budget is not
small. Various ways have been done to monitor water quality which includes pH, turbidity level, temperature, TDS. The
parameter sensor is used with the microcontroller to get the water quality value displayed on the computer using a [2] -
[4] cable. Previous studies that have applied internet of things technology have also included a lot of validation of
amplitude range data on Internet Sensor Objects (IoT) [5]. Rain monitoring system for drying nutmeg based on internet
of things [6]. Prototype of IoT-Based Fruit Alcohol Level Measurement Tool [7].
LITERATURE REVIEW
In this study, an expert system based on fuzzy logic was built for water quality classification. The variables
measured were the value of acidity (pH), total dissolved solids (TDS), and turbidity. These three variables were chosen
because they are the physical and chemical parameters that most influence water quality. These parameters become
input for the fuzzy-based expert system to classify water quality into three classes, namely: good (meets quality
standards), ordinary, and bad (polluted). The classification results that have been generated are then displayed on the
ThingSpeak IoT platform so that they can be accessed by users anytime and anywhere.
METHOD
PH stands for power of hydrogen, which is a measurement of the concentration of hydrogen ions in the body.
The total pH scale ranges from 1 to 14, with 7 being considered neutral. A pH less than 7 is said to be acidic and a
solution with a pH greater than 7 is basic or alkaline. This tool can measure water quality and other affordable
parameters. It is also Arduino compatible, - especially designed for Arduino controllers to easily interface sensors with
practical connectors. This will allow to expand your project to bio-robotics. It has an LED that works as a Power
Indicator, a BNC connector and a PH2.0 interface on the sensor. To use it, just connect the pH sensor with a BND
connector, and plug the PH2.0 interface into the port. analog input of any Arduino controller. If it is pre-programmed,
you will get the pH value easily.
53
Volume 2, Number 2, June 2022
https://doi.org/10.47709/brilliance.v2i2.1544
Figure 1. pH sensor
The working principle of this tool is that the more electrons in the sample, the more acidic it will be and vice
versa, because the bar on the pH meter contains a weak electrolyte solution. There are digital and analog tools. pH
meters are widely used in quantitative chemical analysis. The pH probe measures the pH as well as the activity of the
hydrogen ions surrounding a thin-walled glass bulb at the end. (approximately 0.06 volts per pH unit) which is
measured and displayed as a reading of the pH value Acids have a pH between 0 and 7 and alkaline properties have a
pH value of 7 to 14.
Turbidity sensor that can detect the turbidity of water by reading the optical properties of water due to light and
as a comparison of the light to be reflected with the incoming light. Turbidity is a condition of water that is not clear
and is caused by individual particles (suspended solids) which are generally invisible to the naked eye, similar to smoke
in air. The more particles in the water, the higher the turbidity of the water. On the turbidity sensor, that the higher the
level of turbidity of the water will be followed by a change in the sensor output voltage (Wadu, 2017) as shown in
Figure 2 below.
54
Volume 2, Number 2, June 2022
https://doi.org/10.47709/brilliance.v2i2.1544
RESULT
The entire series of commands on this system are executed by Arduino Mega 2560. The workflow from the
software side is explained through the flow diagram shown in Figure 4.
Figure 4. Flowchart of (a) main program and (b) sub-program of water quality classification
.
DISCUSSION
Sensor testing is done by testing the three sensors using six types of water samples, namely PDAM water, river
water, salt water, sugar water, orange juice, and soapy water. The pH sensor test was carried out using the DFRobot V.1
analog pH sensor. This sensor has an accuracy of ± 0.1 pH at 25oC and has a response time of 1 minute. To test the
TDS sensor, it is done using the DFRobot analog TDS sensor. This sensor has an accuracy of ± 10% FS at 25°C and has
a measurement value range of 0 – 1000 ppm. While the turbidity sensor testing was carried out using the DFRobot
analog Turbidity sensor. This sensor has a response time of < 500 ms and can work optimally in a temperature range of
5°C – 90°C. Experimental testing of the three sensors was carried out by measuring the value of pH, TDS.
55
Volume 2, Number 2, June 2022
https://doi.org/10.47709/brilliance.v2i2.1544
The test is carried out by comparing the output of the fuzzy classifier on the Arduino with the results of manual
calculations using the data generated by the sensor, as shown in Table VI. The expert system successfully provides
inference results with a success percentage of 100%, both in testing water quality classifications and displaying data on
the ThingSpeak website. The full test tabulation can be seen in Table 2. This test was carried out by testing the graphic
display, the display of the water quality classification results, and the results of data downloads on the ThingSpeak
website. The data displayed is derived from the sensor output processed by Arduino, which is then sent to the
ThingSpeak API using the ESP8266-01 WiFi module.
Meanwhile, to test the required transmission time from receiving sensor input to displaying the results on
ThingSpeak, it is done by recording the time every time there is a new entry on the ThingSpeak website. Meanwhile on
the Arduino program, it has been determined that the main program repeats every 20 seconds. So the results of the
transmission time test can be seen in Table 3.
56
Volume 2, Number 2, June 2022
https://doi.org/10.47709/brilliance.v2i2.1544
CONCLUSION
Based on the results of the design that has been carried out on a solar cell-based garden watering device, it can
be concluded that: Fuzzy classifier is able to classify water quality based on pH, TDS, and water turbidity values
according to the designed fuzzy rules. The whole system is implemented using Arduino Mega 2560 and ESP8266 WiFi
module. To make monitoring easier, the ThingSpeak website displays graphically all sensor values and also the results
of water quality classification. The expert system has succeeded in classifying water quality with a 100% success rate
and also displays it on the ThingSpeak website with a 100% success rate. With this tool, the process of monitoring
water quality can be done anytime and anywhere.
REFERENCES
[1] Mohhamad H.H., Zaini, & Haditya.F., “Sistem Monitoring Kunci Pintu Ruangan Menggunakan Modul Wifi”,
Jurnal Universitas Muhammadiyah Jakarta, 2017.
[2] Agistian.N, Arif.S.,& Herfia.R, “Aplikasi Pendeteksi Kualitas Air Menggunakan Turbidity Sensor dan Arduino
Berbasis Web Mobile”, Jurnal Core IT, 5(1), hlm. 13-18 , 2019.
[3] Wadu,R.A, Ada,Y.S.B., & Panggalo.I.U, “Rancang Bangun Sistem Sirkulasi Air Pada Akuarium/Bak Ikan Air
Tawar Berdasarkan Kekeruhan Air Secara Otomatis”, Jurnal Ilmiah Flash, 3(1), hlm.1-10, 2017.
[4] Muammarul.I., Esa.Apriaskar, Djuaniadi, “Pengendalian Suhu Air Menggunakan Sensor Suhu DS18B20”,
Journal of Engineering and Sustainable Technology, 6(1), hlm.347-352, 2019.
[5] Candra, R. A., Suherman, & Ilham, D. N. (2021). Amplitude range data validation in Internet of Things (IoT)
sensor. IOP Conference Series: Earth and Environmental Science, 644(1). https://doi.org/10.1088/1755-
1315/644/1/012063
[6] Ilham, D. N., Satria, E., Anugreni, F., Candra, R. A., & Kusumo, H. N. R. A. (2021). Rain Monitoring System for
Nutmeg Drying Based on Internet of Things. Journal of Computer Networks, Architecture, and High-
Performance Computing, 3(1), 52–57. https://doi.org/10.47709/cnahpc.v3i1.933
[7] Nursila, N., Ilham, D. N., Yunan, A., Harahap, M. K., & Candra, R. A. (2021). Prototype of IoT-Based Fruit
Alcohol Level Measurement Tool. Brilliance: Research of Artificial Intelligence, 1(1), 8–13.
https://doi.org/10.47709/brilliance.v1i1.1078
[8] Purba, Dina Stefani., Pangaribuan, Porman., & Wibowo, Agung Surya.”Pengendalian Suhu Air Berdasarkan
Durasi Pemanasan Menggunakan Fuzzy Logic Dan Pi Kontroler”. eProceedings of Engineering 5.3, pp. 4011-
4017, 2018.
[9] Iqbal, Muhamad., Pangaribuan, Porman., & Wibowo, Agung Surya. “Perancangan dan Implementasi Alat
Pengendali Suhu Air Berbasis Mikrokontroler”. eProceedings of Engineering 4.1, hlm. 53-59, 2017.
[10] R. Pramana, “Perancangan Sistem Kontrol dan Monitoring Kualitas Air dan Suhu Air Pada Kolam Budidaya
Ikan,” J. Sustain. J. Has. Penelit. dan Ind. Terap., vol. 7, no. 1, pp. 13–23, 2018, doi:
10.31629/sustainable.v7i1.435.
[11] L. Parra, J. Rocher, J. Escrivá, and J. Lloret, “Design and development of low cost smart turbidity sensor for
water quality monitoring in fish farms,” Aquac. Eng., vol. 81, pp. 10–18, 2018.
[12] M. J. Villaseñor-Aguilar et al., “Fuzzy Classification of the Maturity of the Tomato Using a Vision System,” J.
Sensors, vol. 2019, pp. 1-12, 2019, doi: 10.1155/2019/3175848.
57