Abstract:
Water is essential for human survival. Most infectious diseases are transmitted
through contaminated water, resulting in millions of deaths annually. Thus, it
is necessary to establish a monitoring system to assess if the water quality is
adequate for the intended purposes. This study describes the design and
development of a portable real-time water quality monitoring system based on
Machine Learning and the Internet of Things (IoT). Moreover, the system
consists of multiple sensors for detecting physical and chemical properties of
water, including pH, Total Dissolved Solids (TDS), Turbidity, Electric
Conductivity (EC), and Temperature. The ESP32 microcontroller processes
the measured values from the sensors, and it interacts with the cloud-based
interface. In this regard, this system was formed through supervised machine
learning while utilizing a binary classification method. Consequently, the data
set was split into two categories with one thousand data points. The algorithms
were tested with following accuracies; Random Forest - 95%, Decision Tree -
91%, Navie Bayes - 88%, and K-Nearest Neighbors - 87%. The random forest
algorithm was chosen to minimize human interference. Therefore, the
developed system provides an online platform for real-time monitoring and
analysis of water quality parameters, accessible from anywhere through the
website. Examination of a water sample from this system displays whether
water requires treatment or whether its quality is acceptable based on the
parametric values.