Development of a Water Tank Monitoring and Pump Control System Using ESP32 and the ThingsBoard Platform with Telegram Notifications at PDAM Kota Surabaya
DOI:
https://doi.org/10.52158/javict.v1i3.1703Keywords:
Internet of Things, ESP32, HC-SR04, ThingsBoard, MQTT, Telegram BotAbstract
Conventional water tank monitoring at PDAM Surya Sembada Kota Surabaya causes delayed information and risks of overflow or underflow. This study develops an IoT-based monitoring and automatic pump control system utilizing an ESP32 microcontroller, an HC-SR04 ultrasonic sensor, the ThingsBoard platform via MQTT, and Telegram notifications. A single ultrasonic sensor simultaneously derives water level, cylindrical volume, and flow rate (Q = ΔV/Δt), eliminating physical flowmeters. Pump control is automated using two-threshold hysteresis logic. Experimental results demonstrate a water level measurement accuracy of 98.63% (MAE = 0.14 cm, R² = 0.9998). The derived flow rate was empirically validated against manual measurements, achieving 99.26% accuracy with an error of only 0.06 L/min. Telemetry latency averaged 0.53 seconds on ThingsBoard, while Telegram early warning alerts were delivered within 2.38 seconds. Furthermore, a three-layer security architecture successfully thwarted unauthorized access scenarios, and expert validation confirmed a 92.0% feasibility rate (Highly Feasible). Thus, the proposed system provides an accurate, robust, and cost-effective solution for municipal water distribution facilities.