Design and Development of an IoT-Based Automatic Water Gallon Filling System Using a YF-S201 Flow Sensor, ESP32, and Telegram Bot
Abstract
Manual refilling of water gallons at refill drinking-water depots relies on an operator switching the pump on and off, which can cause inaccurate volumes, water wastage, and dependence on the operator. This study designed and built an Internet of Things (IoT)-based automatic gallon-filling system using a YF-S201 Hall-effect flow sensor, an ESP32 microcontroller, a 5 V relay module that switches the AC 220 V depot pump, and a Telegram Bot as a remote user interface. The firmware counts sensor pulses through a hardware interrupt and updates the volume every second in a non-blocking millis()-based loop. Two protection layers stop the pump when no flow is detected for 10 s or when the volume reaches 19.0 L, and only a registered Telegram chat ID can issue the /isi_galon, /stop, and /status commands. Volume accuracy was tested in 40 trials with a 19,000 mL target. The pump stopped automatically in every trial, but all trials overfilled: the filled volume ranged from 19,320 to 20,080 mL, with a mean overfill of 612.75 mL and a mean relative error of 3.225% (1.684–5.684%). The overfill is attributed to relay switching delay, flow inertia, and flow-sensor tolerance, so sensor calibration and overshoot compensation are needed.
Keywords
Full Text:
PDFReferences
Palermo, S. A., Maiolo, M., Brusco, A. C., Turco, M., Pirouz, B., Greco, E., Spezzano, G., and Piro, P. (2022). Smart technologies for water resource management: An overview. Sensors, 22(16), 6225. https://doi.org/10.3390/s22166225
Putra, N. A. I. E., Fitriati, A., Muchtar, A., and Fajar, N. (2025). Development of a real time three phase power parameter monitoring system using programmable logic controller (PLC) and Internet of Think (IoT). Jurnal Media Elektrik, 23(1), 81-88.
Muchtar, A., Burhan, M. I., Sari, D. A. L., Makmur, E., and Ashari, H. (2024). Pelatihan pemanfaatan media pembelajaran sistem kontrol berbasis elektro pneumatik di SMKN 9 Makassar. TEKIBA: Jurnal Teknologi dan Pengabdian Masyarakat, 4(2), 242-248.
Arfandi, A., and Supit, Y. (2019). Prototipe sistem otomasi pada pengisian depot air minum isi ulang berbasis Arduino Uno. Simtek: Jurnal Sistem Informasi dan Teknik Komputer, 4(1), 91-99. https://doi.org/10.51876/simtek.v4i1.53
Supandi, S., Hilda, H., and Hadary, F. (2017). Perancangan sistem data logger pengisian air galon otomatis berbasis mikrokontroler ATMega32. Jurnal Edukasi dan Penelitian Informatika (JEPIN), 3(1), 1-6. https://doi.org/10.26418/jp.v3i1.19239
Pamungkas, D. D., and Setyadjit, K. (2023). Rancang bangun sistem kontrol dan monitoring pengisian air minum isi ulang otomatis menggunakan ESP32 berbasis IoT. Prosiding Senakama, 2(1), 652-662.
Muchtar, A., Makmur, E., Ashari, H., Burhan, M. I., and Riska, M. (2026). Pendampingan pemanfaatan sistem pengisian galon otomatis bagi depot air minum isi ulang. Jurnal Pengabdian Masyarakat, 4(1), 150-155.
Paun, M.-A., Sallese, J.-M., and Kayal, M. (2013). Hall effect sensors design, integration and behavior analysis. Journal of Sensor and Actuator Networks, 2(1), 85-97. https://doi.org/10.3390/jsan2010085
Baker, R. C. (2016). Flow measurement handbook: Industrial designs, operating principles, performance, and applications (2nd ed.). Cambridge University Press. https://doi.org/10.1017/CBO9781107054141
Eronu, E. M., and Odiagbe, M. (2020). Evaluation and modelling of a low budget Hall effect based flow-rate sensor using adaptive calibration paradigm. European Journal of Engineering and Technology Research, 5(9). https://doi.org/10.24018/ejeng.2020.5.9.2154
Maier, A., Sharp, A., and Vagapov, Y. (2017). Comparative analysis and practical implementation of the ESP32 microcontroller module for the Internet of Things. In 2017 Internet Technologies and Applications (ITA). IEEE. https://doi.org/10.1109/ITECHA.2017.8101926
Hercog, D., Lerher, T., Truntič, M., and Težak, O. (2023). Design and implementation of ESP32-based IoT devices. Sensors, 23(15), 6739. https://doi.org/10.3390/s23156739
Telegram. (n.d.). Telegram Bot API. Retrieved October 13, 2026, from https://core.telegram.org/bots/api
Öztürk, M. A., Ünsal, E., and Yelkuvan, A. F. (2025). Development of an Internet of Things-based ultra-pure water quality monitoring system. Sensors, 25(4), 1186. https://doi.org/10.3390/s25041186
Lalnunthari, J., and Thanga, H. (2017). Dependence of Hall effect flow sensor frequency on the attached inlet and outlet pipe size. In 2017 IEEE International Conference on Consumer Electronics-Asia (ICCE-Asia), 56–60. IEEE. https://doi.org/10.1109/ICCE-ASIA.2017.8307842
Riupassa, R. D., Raflis, H., and Hendro. (2018). Optimasi nilai konstanta kalibrasi pada water flow sensor YF-S201. Sistemik: Jurnal Ilmiah Nasional Bidang Ilmu Teknik, 6, 1–5. https://ejournal.utb-univ.ac.id/Ejournal/JurnalDetail/523
Rashad, A. A., Ulikaryani, Girawan, B. A., Ariawan, R., Sodikin, J., and Hastuti, H. D. (2023). Uji fungsi dan kalibrasi sensor water flow YF-S201 berbasis Arduino Uno pada mesin penjernih air sungai. Jurnal Teknik Mesin, Elektro dan Ilmu Komputer, 3(2), 1–9. https://doi.org/10.55606/teknik.v3i2.1850
Tisna, D. R., Maharani, T., and Nugroho, K. T. (2024). Pemanfaatan chatbot Telegram untuk monitoring dan kontrol kualitas air menggunakan ESP32. JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), 9(3), 1292–1306. https://doi.org/10.29100/jipi.v9i3.5329
Setyawan, N. R., Sumarahinsih, A., and Setiawan, A. B. (2026). Penerapan IoT pada sistem monitoring dan otomatisasi pengoperasian pompa air kabel duct gardu induk Tanggul. METROTECH (Journal of Mechanical and Electrical Technology), 5(2), 253–261. https://ejournal.uniramalang.ac.id/metrotech/article/view/8711
Ghidaoui, M. S., Zhao, M., McInnis, D. A., and Axworthy, D. H. (2005). A review of water hammer theory and practice. Applied Mechanics Reviews, 58(1), 49–76. https://doi.org/10.1115/1.1828050
DOI: https://doi.org/10.17509/coelite.v5i2.106731
Refbacks
- There are currently no refbacks.
Journal of Computer Engineering, Electronics and Information Technology (COELITE)
and managed by Department of Computer Enginering.
Jl. Dr. Setiabudi No.229, Kota Bandung, Indonesia - 40154
email: [email protected]
e-ISSN: 2829-4149
p-ISSN: 2829-4157



