Muhammad Irfan Fahmi
Sistem Informasi, Fakultas Sains dan Teknologi, Universitas Prima Indonesia, Medan, 20112, Indonesia

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

IoT-Based Water Quality Monitoring System Using ESP32 and K-Nearest Neighbor Algorithm Fiqri Rizaldi Azlin Hasibuan; Man Vredus Zalukhu; Della Agnesia Simamora; Muhammad Irfan Fahmi
Journal of Artificial Intelligence and Software Engineering Vol 6, No 2 (2026): Juni (OnProgress)
Publisher : Politeknik Negeri Lhokseumawe

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.30811/jaise.v6i2.9233

Abstract

Conventional water monitoring is often time-consuming and hinders decision-making. Amidst IoT advancements, few systems feature automatic correction mechanisms. This study develops an IoT-based water monitoring system to read pH, temperature, and turbidity in real-time. The NodeMCU ESP32 is used as the main microcontroller connected to pH, DS18B20, and turbidity sensors. Data is collected every 15 minutes, uploaded to Firebase via Wi-Fi, and visualized on a web dashboard. The system implements the K-Nearest Neighbor (K-NN) algorithm with Euclidean Distance to categorize water as good, moderate, or poor. This result triggers an automatic pH-balancing pump actuator if the value falls outside the normal range (6.5–8.5). This laboratory-scale prototype proves that the synergy of ESP32, Firebase, and K-NN overcomes the weaknesses of manual methods, resulting in accurate, efficient, and sustainable water monitoring.