Implementation of IoT and Machine Learning for Monitoring and Prediction of Tank Water Levels
DOI:
https://doi.org/10.59934/jaiea.v5i2.1936Keywords:
Internet of Things (IoT), Machine Learning, Water Monitoring, Linear Regression, Random ForestAbstract
The availability and quality of clean water in household storage tanks are essential yet often overlooked until problems such as depletion or contamination occur. Manual monitoring methods that rely on physical inspection tend to be inefficient, prone to delay, and unable to support predictive decision-making. This study proposes an automated monitoring solution by integrating Internet of Things (IoT) technology with Machine Learning-based analysis. The system is developed using an ESP32 microcontroller that continuously collects real-time data from an ultrasonic sensor to measure water level and a turbidity sensor to assess water clarity. The time-series data obtained is then analyzed using two algorithmic approaches. Linear Regression is employed to model the water depletion rate and generate predictions regarding the estimated remaining duration before the tank reaches an empty state. In parallel, Random Forest is applied as a comparative model to validate prediction accuracy under non-linear consumption patterns. Experimental results demonstrate that the combined IoT–Machine Learning framework provides accurate, timely, and informative insights for users. The proposed system improves water usage efficiency and strengthens early warning capabilities, making it a practical solution for supporting effective household water management.
Downloads
References
I. B. Prasetiyo, A. A. Riadi, and A. A. Chamid, “Perancangan Smart Aquarium Menggunakan Sensor Turbidity Dan Sensor Ultrasonik Pada Akuarium Ikan Air Tawar Berbasis Arduino Uno,” J. Teknol. Univ. Muhammadiyah Jakarta, vol. 13, no. 2, pp. 193–200, 2021, doi: 10.24853/jurtek.13.2.193-200.
H. Darmanto, L. Lamsadi, and H. Asrul, “Monitoring Ketinggian Air Tandon Berbasis IoT Dengan ESP32 Melalui Website,” JUSTER J. Sains dan Terap., vol. 4, no. 2, 2025, doi: 10.57218/juster.v4i2.1507.
M. N. Novian, M. Walid, and M. Makruf, “Implementasi Logika Fuzzy untuk Monitoring Tingkat Pencemaran Air Sungai berbasis Internet Of Things,” J. Sist. Komput. dan Kecerdasan Buatan, vol. 7, no. 3, pp. 248–289, 2024, doi: 10.47970/siskom-kb.v7i3.687.
T. A. Cinderatama, R. Zulmy Alhamri, Y. Yunhasnawa, F. Sofian Efendi, and R. Ariyanto, “Sistem Monitoring Irigasi dan Prediksi Debit Air Berbasis IoT Dan Support Vector Machine (SVM),” J. Inform. Polinema, vol. 11, no. 2 SE-Articles, pp. 171–184, Feb. 2025, doi: 10.33795/jip.v11i2.6812.
Nurdin, N. Suarna, and W. Prihartono, “ALGORITMA REGRESI LINIER SEDERHANA UNTUK PREDIKSI PENGGUNAAN VOLUME AIR BERDASARKAN JENIS PELANGGAN PDAM,” J. Kecerdasan Buatan dan Teknol. Inf., vol. 4, no. 1 SE-Articles, pp. 43–52, Jan. 2025, doi: 10.69916/jkbti.v4i1.187.
W. Nie et al., “Rethinking deep learning: linear regression remains a key benchmark in predicting terrestrial water storage,” 2025. doi: 10.48550/arXiv.2510.10799.
L. V. Q. Danh, D. V. M. Dung, T. H. Danh, and N. C. Ngôn, “Design and Deployment of an IoT-Based Water Quality Monitoring System for Aquaculture in Mekong Delta,” 2020. doi: 10.18178/ijmerr.9.8.1170-1175.
R. G. Riyansyah, D. Wahiddin, and D. S. Kusumaningrum, “Smart Monitoring Alat Infus Pasien Berbasis Internet Of Things ( IoT ) Menggunakan Mikrokontroler ESP32,” Sci. Student J. Information, Technol. Sci., vol. 2, no. 1, pp. 142–148, 2021.
M. Ansari and M. Alam, “An Intelligent IoT-Cloud-Based Air Pollution Forecasting Model Using Univariate Time-Series Analysis.,” Arab. J. Sci. Eng., pp. 1–28, May 2023, doi: 10.1007/s13369-023-07876-9.
I. M. S. Wibawa and I. K. Putra, “Design and Manufacture of Air Quality Measurements Based on Arduino ATmega 2560 Using Dust ZH03A Laser Sensor,” Int. J. Phys. Sci. Eng., vol. 5, no. 1, pp. 8–15, 2021, doi: 10.29332/ijpse.v5n1.800.
T. S. Pereira, T. P. de Carvalho, T. A. Mendes, and K. T. Formiga, “Evaluation of Water Level in Flowing Channels Using Ultrasonic Sensors,” 2022. doi: 10.3390/su14095512.
W. Gao, W. Liu, F. Li, and Y. Hu, “Analysis and Validation of Ultrasonic Probes in Liquid Level Monitoring Systems,” 2021. doi: 10.3390/s21041320.
M. A. Delwizar, A. Arsenly, H. Irawan, M. Jodiansyah, and R. M. Utomo, “Perancangan Prototipe Sistem Monitoring Kejernihan Air Dengan Sensor Turbidity Pada Tandon Berbasis IoT,” J. Teknol. Elektro, vol. 12, no. 3, Oct. 2021, doi: 10.22441/jte.2021.v12i3.002.
T. D. Hendrawati and R. M. Hibban, “Pengembangan Sistem IoT untuk Pemantauan Kualitas Air Kolam Koi Berbasis Sensor,” JTERA (Jurnal Teknol. Rekayasa), vol. 9, no. 2, pp. 113–120, 2024, doi: 10.31544/jtera.v9.i1.2024.113-120.
M. Nurul and D. Maizana, “Rancang Bangun Sistem Monitoring Kekeruhan Air Pada Mesin Rotary Drum Filter Berbasis Sensor TSS Dan Mikrokontroler ESP32,” Riau J. Tek. Inform., vol. 4, no. 1 SE-Articles, pp. 138–141, Mar. 2025, doi: 10.30606/rjti.v4i1.3305.
S. M. Safrilly and R. Badarudin, “Sistem Monitoring Suhu secara Real-Time berbasis Arduino Uno untuk Pemantauan Lingkungan,” ELECTROPS J. Ilm. Tek. Elektro, vol. 3, no. 2, pp. 1–7, 2024, doi: 10.30872/electrops.v3i1.15789.
A. I. Asry, L. Lutfi, A. Umar, and R. Ahmad, “Monitoring System for Traffic Light Lamp Damage using BLYNK Application Based on IOT ESP32,” J. Teknol. Transp. dan Logistik, vol. 5, no. 1 SE-, pp. 59–66, Jun. 2024, doi: 10.52920/jttl.v5i1.230.
A. C. P Fernandes, A. R Fonseca, F. A. L. Pacheco, and L. F. Sanches Fernandes, “Water quality predictions through linear regression - A brute force algorithm approach.,” MethodsX, vol. 10, p. 102153, 2023, doi: 10.1016/j.mex.2023.102153.
J. Xu et al., “Assessing and predicting water quality index with key water parameters by machine learning models in coastal cities, China,” Heliyon, vol. 10, no. 13, Jul. 2024, doi: 10.1016/j.heliyon.2024.e33695.
Y.-C. Liang, Y. Maimury, A. H. Chen, and J. R. Juarez, “Machine Learning-Based Prediction of Air Quality,” 2020. doi: 10.3390/app10249151.
J. V. Filho, A. Scortegagna, A. P. de S. D. Vieira, and P. A. Jaskowiak, “Machine learning for water demand forecasting: Case study in a Brazilian coastal city,” Water Pract. Technol., vol. 19, no. 5, pp. 1586–1602, Apr. 2024, doi: 10.2166/wpt.2024.096.
L. Santoso and P. Priyadi, “Comparative Study of Feature Engineering Techniques for Predictive Data Analytics,” J. Technol. Informatics Eng., vol. 3, no. 2 SE-Articles, pp. 417–435, 2024, doi: 10.51903/jtie.v3i2.225.
O. Alvansyah, D. Kiswanto, A. N. Nasution, and M. F. Zulfi, “IMPLEMENTASI ZERO TRUST ARCHITECTURE DENGAN MULTI-FACTOR AUTHENTICATION DAN CONTINUOUS VERIFICATION PADA SISTEM LOGIN,” J. Manaj. Inform. Sist. Inf. dan Teknol. Komput., vol. 4, no. 2, pp. 617–623, 2025, doi: 10.70247/jumistik.v4i2.220.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Journal of Artificial Intelligence and Engineering Applications (JAIEA)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.







