RESEARCH ARTICLE
Design and Evaluation of an IoT-Based Flood Early Warning System Using Conductive Water Level Sensor
Digital System and Computing|Vol. 2, Issue 1, pp. 1-8 (2026)
Received
Jan 28, 2026Revised
Apr 30, 2026Accepted
May 11, 2026Published
May 20, 2026
Abstract
Keywords:
Introduction
Flooding remains one of the most frequent and destructive natural hazards in Indonesia, causing substantial physical damage, socio-economic disruption, and environmental degradation. Flood events typically occur when water discharge exceeds the carrying capacity of drainage systems or river channels, resulting in inundation of residential areas and critical infrastructure (1). Indonesia’s vulnerability to flooding is exacerbated by its tropical climate characterized by high rainfall intensity, rapid urbanization, and land-use changes that reduce natural water absorption capacity. These factors collectively increase both the frequency and severity of flood disasters, making flood risk management a persistent national challenge. In a broader context, flood risk has also been recognized globally as a major environmental hazard, particularly in developing countries with similar hydrological and urbanization characteristics (2).
The urgency of addressing flood hazards is evident in recent disaster statistics and empirical cases. Since mid-2022, tens of thousands of people have been affected by recurring floods in several regions of Indonesia, including Central and Eastern areas. In Kapuas Hulu, West Kalimantan, floodwaters inundated nearly 3,000 houses, caused fatalities, and affected approximately 15,000 residents. Moreover, the Indonesian Ministry of Finance reported that natural disasters generate annual economic losses of approximately 22 trillion rupiahs, with floods contributing the largest share of these losses (3). These data highlight the critical need for effective disaster mitigation strategies that not only reduce economic losses but also enhance community preparedness and resilience. Early detection and timely dissemination of flood information are therefore essential to minimize casualties and material damage.
Despite significant advances in disaster mitigation technologies, several challenges remain in implementing effective flood early warning systems, particularly in developing regions. Conventional monitoring approaches often rely on manual observation or expensive hydrological instrumentation, which may be difficult to deploy widely due to cost, technical complexity, and maintenance requirements. Previous studies have explored various technological solutions, including microcontroller-based flood monitoring systems using ultrasonic sensors, humidity sensors, and communication modules. For example, Rahman et al. (4) developed a web-based flood early warning system using NodeMCU ESP8266 and ultrasonic sensors, demonstrating high sensor accuracy and real-time monitoring capabilities. Similarly, Gani (5) integrated ultrasonic and humidity sensors with SMS-based notification, while Gobel et al. (6) utilized IoT platforms such as ThingSpeak for real-time monitoring. Other studies have also implemented water level sensors with alarm indicators (7, 8).
From a technical perspective, different sensing technologies present distinct characteristics. Ultrasonic sensors provide non-contact measurement and relatively high accuracy, but are sensitive to environmental disturbances such as turbulence and noise (9). Pressure sensors offer higher robustness and stability in submerged conditions but require higher cost and calibration (10). In contrast, conductive sensors such as the K-0135 operate based on resistance changes when exposed to water, providing a simple and low-cost alternative, although they are generally limited to threshold-based detection rather than continuous depth measurement. In addition, communication technologies such as GSM enable wide-area coverage but introduce higher latency and operational cost, while HTTP-based communication offers easier integration with web services and real-time platforms with lower implementation complexity.
However, most existing systems still face limitations related to sensor robustness, communication efficiency, scalability, and long-term reliability. Many studies focus primarily on detection accuracy without sufficiently addressing performance metrics such as response time, false alarm rate, and communication latency. Furthermore, issues related to system scalability, deployment feasibility in real environments, and reliability under environmental disturbances remain insufficiently explored. These limitations indicated the need for a simpler, cost-effective, and scalable flood early warning system.
Based on these limitations, several research gaps can be identified. First, the integration between low-cost sensing technology and real-time multi-platform communication systems remains limited. Second, systematic evaluation of threshold-based detection under both static and dynamic environmental conditions is still lacking. Third, previous studies have provided insufficient analysis of system performance, particularly in terms of detection reliability and communication effectiveness. In addition, earlier studies have not clearly explained how low-cost sensors can be optimized to minimize false alarms while maintaining reliable detection performance. Therefore, this study focuses on addressing false alarm generation and improving the integration between low-cost sensing technologies and real-time communication systems.
In this context, the integration of Internet of Things (IoT) technology offers a promising approach. IoT enables interconnected devices to collect, transmit, and process data through wireless networks for real-time monitoring and decision-making (11–13). The NodeMCU ESP8266 microcontroller provided an efficient and low-cost platform with built-in Wi-Fi connectivity (14), while the HTTP protocol enables standardized communication between devices and servers (15, 16). Threshold-based classification methods have been widely applied in IoT-based flood monitoring systems to distinguish between normal, alert, and flood conditions with high reliability and low false alarm rates (17). Recent systems integrate multiple sensors and decision-support mechanisms to improve detection accuracy and predictive capability (18, 19).
This study proposes an IoT-based flood early warning system using a K-0135 conductive water level sensor integrated with a NodeMCU ESP8266 and HTTP-based communication architecture. The novelty of this study lies in the systematic characterization of the conductive sensor under static and dynamic conditions to determine an optimal threshold for flood detection. Based on experimental results presented in Table 3, the sensor output increases non-linearly with depth, with values ranging from 16.3 to 565.3, while dynamic disturbance testing yields an average maximum value of 424.7, leading to an optimal threshold of 425. This approach allows the system to distinguish between actual water level rise and environmental disturbances such as splashes. Furthermore, the system integrates real-time warning delivery through web server and Telegram platforms, as illustrated in Figure 3, ensuring effective information dissemination.
The objective of this study is not only to develop a prototype system but also to evaluate its performance using measurable parameters, including detection reliability, threshold accuracy, and communication response. Accordingly, this study addresses the following research questions: (1) How effectively can the K-0135 sensor detect critical water level thresholds under static and dynamic conditions? (2) How reliable is the IoT-based communication system in delivering real-time warnings? The study also targets minimizing false alarms and ensuring consistent alert delivery performance. The results are expected to demonstrate the feasibility of a low-cost, scalable flood early warning system and provide a foundation for further large-scale implementation.
Methodology
Research Design and Conceptual Framework
This study adopted an experimental engineering research design to develop and validate an Internet of Things (IoT)-based flood early warning system using a conductive water level sensor integrated with a microcontroller platform. The research was structured to systematically investigate sensor characteristics, design and implement an integrated hardware–software system, and evaluate system performance under controlled laboratory conditions. This approach enables empirical validation of system functionality, particularly in terms of threshold-based detection and real-time communication performance.
The methodological framework consists of three main stages: (1) sensor characterization, (2) system development and integration, and (3) performance evaluation. The system architecture includes four main components: sensing, processing, communication, and information dissemination. The interconnection and configuration of hardware components are illustrated in Figure 1.

The system followed a sequential data flow: the K-0135 sensor detected water level changes and produced analog output signals, which are read by the NodeMCU ESP8266 microcontroller. The microcontroller processed the data by comparing it to a predefined threshold and determined the system state (normal or warning). If the threshold was exceeded, the system transmitted warning data via HTTP requests to a web server, which subsequently forwarded notifications to a Telegram bot and updated the monitoring interface. This data flow ensured real-time communication from sensor to end-user.
Materials and Instruments
The experimental setup utilized hardware tools and system components to support sensor testing and system integration. The tools used are summarized in Table 1, while the system materials are presented in Table 2.
| Tool | Description |
|---|---|
| Laptop | Used as a platform for programming the microcontroller and displaying system data. |
| USB to Micro USB Cable | Used to connect the microcontroller to the laptop. |
| Water Container | Used to simulate water level conditions for experimental testing. |
| Measuring Ruler | Used to measure the depth of the sensor submerged below the water surface. |
| Server | Used to run the web server and database for data processing and information delivery. |
| Material | Description |
|---|---|
| K-0135 Water Level Sensor | Sensor used to detect changes in water surface level. |
| NodeMCU ESP8266 | Microcontroller used to control and process the system operations. |
| LED Indicator | Used as a visual indicator when the system is triggered. |
| 220 Ω Resistor | Used to limit the electric current flowing to the LED. |
| Jumper Wires | Used to connect components in the electronic circuit. |
| Breadboard | Used as a platform for assembling the electronic circuit. |
The selection of components was based on cost-effectiveness, compatibility with IoT systems, and suitability for real-time monitoring applications.
Sensor Characterization Procedure
Sensor characterization was conducted to establish the relationship between water level depth and sensor output, as well as to determine an optimal detection threshold. Sensor calibration is a critical step in IoT-based monitoring systems to ensure measurement accuracy and reduce systematic errors (20). The system hardware was assembled according to the circuit schematic shown in Figure 1, and the NodeMCU ESP8266 was programmed using Arduino IDE.
Data acquisition was performed using a fixed sampling approach in which sensor readings were recorded through the serial monitor at each measurement condition. Static testing was conducted by immersing the sensor incrementally at 0.5 cm intervals, while dynamic testing simulated environmental disturbances such as water splashes.
Each measurement was repeated multiple times to reduce noise and obtain representative values. The threshold determination was based on comparing the maximum dynamic output values with the static output curve, ensuring that the selected threshold minimizes false alarms caused by transient disturbances while maintaining sensitivity to actual water level increases.
System Development and Integration
The system was developed by integrating hardware and software components into a real-time processing system, as illustrated in Figure 1. The overall data flow followed a sequential process in which the water level sensor detected changes and generated analog signals, the NodeMCU ESP8266 microcontroller read and processed these signals, and the processed data were transmitted to a web server and subsequently delivered to users through a monitoring interface and Telegram notifications.
The NodeMCU ESP8266 continuously read analog input from the sensor and processed it using a threshold-based decision algorithm. The system logic was be expressed as follows: a) If sensor_value ≥ threshold → flood warning is triggered, b) If sensor_value < threshold → normal condition
This decision logic was implemented in the microcontroller program and executed continuously in a loop structure, ensuring real-time response capability.
A web server was developed to handle incoming HTTP POST requests from the microcontroller. The server processed the received data, updated the system status in the database, and forwarded notifications to the Telegram bot via API integration. The monitoring website retrieved system status using periodic HTTP GET requests with a refresh interval of approximately 0.5 s, enabling near real-time system monitoring.
In addition to the schematic representation, the physical implementation of the system is also documented. A photograph of the assembled hardware prototype, including the K-0135 water level sensor, NodeMCU ESP8266, and supporting components, is provided in Figure 2. This figure complements the circuit diagram by illustrating the actual hardware configuration and enhances the reproducibility of the proposed system.

Experimental Variables and Measurement Parameters
The experimental design incorporates several key variables to ensure a comprehensive evaluation of the system. The primary independent variable in this study is the water level depth, which directly influences the sensor output and system behavior. The dependent variables include sensor output values, detection state, and communication response, which collectively reflect the performance of the flood early warning system. Meanwhile, controlled variables such as sensor placement, hardware configuration, and sampling method were maintained consistently throughout the experiments to ensure the validity and reproducibility of the results.
System performance was evaluated based on several critical aspects, including detection reliability, which refers to the system’s ability to successfully trigger warnings when the predefined threshold is reached. In addition, the system’s robustness was assessed by analyzing its false alarm behavior under dynamic disturbances, such as simulated water splashes. Communication performance was also evaluated through the success rate of alert transmission, ensuring that warning messages were consistently delivered to users. Furthermore, system response behavior was observed through logs obtained from the serial monitor, web interface, and Telegram notifications to verify the stability and reliability of the overall system operation.
Data Analysis
Data analysis was conducted using descriptive statistical methods. Sensor output values from static and dynamic tests were analyzed to determine mean values and identify the threshold region.
The threshold value was determined based on the maximum dynamic output and its relation to static measurements, ensuring a balance between sensitivity and robustness. System performance was evaluated by analyzing the consistency of alert delivery, system response behavior, and stability during repeated testing.
Ethical Considerations
This study did not involve human subjects or personal data. All experiments were conducted in a controlled laboratory environment using simulated water conditions, in accordance with standard engineering research practices.
Results and Discussion
Sensor Characterization and Threshold Determination
The K-0135 water level sensor was evaluated to determine its suitability for detecting rising water levels in a flood early warning context. The sensor operated by converting the wetted detection area into an analog output signal, where changes in resistance corresponded to variations in water level (21). Due to its relatively small detection area, the sensor is not designed to measure absolute water depth in large-scale environments such as rivers. However, it can be effectively employed as a threshold-based detector to identify critical water level conditions that indicated potential flood risk.
To establish a reliable detection threshold, the sensor was subjected to both static and dynamic tests. Static testing was conducted by immersing the sensor at incremental depths with a step size of 0.5 cm, while dynamic testing simulated environmental disturbances such as splashes or raindrops that could generate false signals. Each measurement was repeated ten times to reduce random fluctuations and improve repeatability of the results.
The results of the static test are presented in Table 3, which shows the relationship between sensor immersion depth and average analog output values.
| Sensor depth ± 0.1 (cm) | Average output value |
|---|---|
| 0.0 | 16.3 |
| 0.5 | 324.2 |
| 1.0 | 420.6 |
| 1.5 | 461.0 |
| 2.0 | 482.5 |
| 2.5 | 485.9 |
| 3.0 | 493.0 |
| 3.5 | 502.7 |
| 4.0 | 565.3 |
The results indicated a non-linear increase in sensor output as the immersion depth increases. A sharp increase was observed between 0.0 cm and 1.0 cm, where the output rises from 16.3 to 420.6, indicating high sensitivity at initial water contact. Beyond this range, the rate of increase became more gradual, suggesting partial saturation of the conductive pathways. This behavior implied that the sensor exhibited higher sensitivity in shallow water conditions, which is advantageous for early-stage flood detection.
From a repeatability perspective, the use of ten repeated measurements at each depth reduces random measurement variability, although detailed statistical dispersion (e.g., standard deviation) was not explicitly calculated in this study. Nevertheless, the consistency of the averaged values indicated stable sensor behavior under controlled conditions. This consistency suggested that the sensor provided reliable repeatable outputs under identical testing conditions.
Dynamic testing revealed that the average maximum sensor output caused by water splashes was 424.7. This value closely corresponded to the static output range between 1.0 cm and 1.5 cm. Based on this observation, the detection threshold was determined to be 425.
From an error analysis perspective, the threshold value represented a boundary between disturbance-induced signals and actual water level rise. The selection of 425 effectively reduces false positive events caused by splashes while maintaining sufficient sensitivity for detecting genuine flood conditions. However, due to the absence of reference calibration with standard measurement instruments, the absolute measurement accuracy cannot be quantified, and the system is therefore interpreted as a relative detection system rather than a precise measurement device.
Compared with ultrasonic sensor-based systems reported in previous studies (4, 7), the conductive sensor used in this study offers advantages in simplicity, cost efficiency, and ease of deployment. In addition, compared to systems that utilize GSM or cloud-based platforms, the proposed system offers lower implementation cost and reduced communication complexity while maintaining reliable real-time alert delivery. However, the sensor lacks continuous depth measurement capability and is therefore more suitable for binary or threshold-based detection. This trade-off reflects the design choice of prioritizing system simplicity, cost efficiency, and operational reliability over high-resolution measurement capability.
Performance of the Integrated Flood Early Warning System
Following sensor characterization, the flood early warning system was integrated with a web server and Telegram bot to enable real-time information dissemination. The overall process of warning transmission from the microcontroller to end users is illustrated in Figure 3. This process illustrates the complete data flow from sensing to user notification, including signal acquisition, processing, server communication, and multi-platform alert dissemination.

In the experimental setup, flood conditions were simulated by immersing the sensor in water until the output value reached the predetermined threshold. When the threshold was exceeded, the LED indicator was activated, and the microcontroller transmitted an HTTP POST request to the web server. Upon receiving the request, the server updated the hazard state and forwarded notifications to the Telegram bot. The monitoring website retrieved system status at 0.5-second intervals, enabling near real-time system monitoring.
The experimental results showed that all HTTP requests were successfully received by the server and that all warning messages were delivered to Telegram users and the monitoring website. This indicated a communication success rate of 100% under the tested laboratory conditions. This result indicated high system reliability in controlled conditions, although further validation under real-world environments is required.
The HTTP error code −11 observed in this study corresponded to a timeout condition, indicating that the microcontroller did not receive a response from the server within the expected time interval. This issue is commonly associated with network latency or server processing delays and does not affect the successful transmission of warning data. This behavior indicated the presence of communication latency between the microcontroller and server. Although latency was not quantitatively measured, it suggested that system performance may be affected under unstable network conditions. This limitation indicated that further quantitative evaluation of system latency, packet loss, and communication stability is required for comprehensive performance assessment.
From a reliability perspective, the system demonstrates strong robustness in maintaining alert delivery despite response errors. The separation between data transmission (POST request) and response handling ensured that warning messages were still successfully delivered even when response acknowledgment failed.
In terms of system limitations, the evaluation was conducted under controlled laboratory conditions without exposure to real environmental factors such as rainfall intensity, debris interference, sediment accumulation, or long-term sensor degradation. These factors may affect sensor performance and system reliability in real-world deployment. Additionally, the system currently utilizes a single-sensor configuration, limiting its scalability for large-area flood monitoring applications
Compared to existing IoT-based flood monitoring systems, the proposed system demonstrates comparable functionality in real-time data transmission and alert delivery, while offering advantages in simplicity and cost efficiency. A detailed comparison with previous studies is presented in Table 4, highlighting differences in sensor type, system complexity, communication methods, and performance characteristics. However, more advanced systems may provide higher measurement accuracy, multi-sensor integration, and more robust communication protocols.
| Study | Sensor | Cost | Complexity | Communication | Performance |
|---|---|---|---|---|---|
| Rahman (4) | Ultrasonic | High | High | Web | High accuracy |
| Gani (5) | Ultrasonic + humidity | Medium | High | SMS | Reliable |
| Gobel (6) | Ultrasonic | Medium | Medium | IoT Cloud | Real-time |
| This study | Conductive K-0135 | Low | Low | HTTP + Telegram | 100% delivery |
Overall, the experimental results confirmed that the proposed system was capable of detecting simulated flood conditions and delivering real-time warnings through multiple communication channels. The integration of HTTP-based communication, web server infrastructure, and Telegram messaging provided a flexible and scalable framework for flood early warning applications. This approach is consistent with recent developments in IoT-based disaster monitoring systems, which emphasize real-time data transmission, system interoperability, and user-accessible notification platforms (8, 11).
Conclusion
This study successfully developed an IoT-based flood early warning system using the K-0135 conductive water level sensor and NodeMCU ESP8266, demonstrating its capability to detect rising water levels based on a threshold-based detection approach. Experimental results from sensor characterization showed a non-linear response with an optimal detection threshold of 425, derived from static and dynamic testing to minimize false alarms caused by environmental disturbances.
The integrated system successfully performed end-to-end communication using HTTP-based architecture, with a communication success rate of 100% under controlled laboratory conditions, enabling real-time alert delivery through a web server and Telegram platform. Although an HTTP response timeout (error code -11) was observed, alert transmission remained successful, indicating acceptable robustness in handling communication delays.
Despite these promising results, the findings are limited to controlled laboratory testing conditions without exposure to real environmental factors such as rainfall, debris, sediment, and long-term sensor degradation. Therefore, the reliability and performance of the system in real-world deployments require further validation.
Future work should focus on quantitative performance evaluation, including latency measurement, false alarm rate, and long-term reliability testing, as well as the implementation of multi-sensor configurations and more robust communication protocols to improve scalability and system resilience. Overall, the proposed system demonstrates the feasibility of a low-cost and practical IoT-based solution for flood early warning applications at the community level.
Declarations
Conflict of Interest
The authors declare no conflicting interest.
Data Availability
All data generated or analyzed during this study are included in this published article.
Ethics Statement
Ethical approval was not required for this study.
Funding Information
The author(s) declare that no financial support was received for the research, authorship, and/or publication of this article.
References
- Rahayu HP, Wahdiny I, Anin U, Mardhiatul A. Banjir dan upaya penanggulangannya. Bandung: Promise Indonesia; 2009.
- Reduction UNO for DR. Annual Report 2022 [Internet]. Switzerland; 2022.
- Iqbal M, Pahlevi A. BBC News Indonesia. 2022. “Curah hujan makin ekstrem” dan banjir makin intens di Indonesia tapi penanganan “biasa-biasa saja.” Available from: https://www.bbc.com/indonesia/articles/cgrymv8lj8lo
- Saiful Rahman AF, Kasrani MW, Munthe KPJ. Rancang bangun prototipe sistem peringatan dini banjir menggunakan nodemcu esp8266 berbasis web (internet). Jteuniba. 2020;5(1):78-84. doi: https://doi.org/10.36277/jteuniba.v5i1.84
- Gani ARF. Sistem Peringatan Dini Banjir Berbasis Arduino Uno Dengan Notifikasi SMS. JTek. 2021;9(1):42-51. doi: https://doi.org/10.31479/jtek.v9i1.90
- Gobel MA, Haba ARK. Rancang Bangun Prototype Sistem Pendeteksi Banjir Menggunakan Thingspeak Dan Esp8266. Balok. 2022;1(2):85-91. doi: https://doi.org/10.37195/balok.v1i2.255
- Abdul Azis M, Lammada I, Ferdyansyah Perdana Putra M, Fadhilah MI. Spend (sistem peringatan dini banjir menggunakan water level sensor dengan arduino uno). jati. 2024;8(4):4457-4464. doi: https://doi.org/10.36040/jati.v8i4.9954
- Husnah K, Munazilin A, Lazim F. Rancang Bangun Alat Monitoring Ketinggian Air dan Peringatan Dini Banjir Berbasis Internet of Things (IoT). Juik. 2024;4(2):114. doi: https://doi.org/10.31314/juik.v4i2.3286
- Febriani S, Arrozaq MA, Nugraha R, Lestari AC. Intelligent Flood Monitoring System Using IoT and Real-Time Notifications. J Informasi, Sains Dan Teknol. 2025;8(2):570–582.
- Dublin AC, Arce M, Ortiz E, Wong LM, Villaruel KP, Arante H, et al. A novel cost-effective pressure sensor based flood monitoring system with iot. Aej. 2024;14(3):53-61. doi: https://doi.org/10.11113/aej.v14.20668
- Erwin E, Datya AI, Nurohim N, Sepriano S, Waryono W, Adhicandra I, et al. Pengantar & Penerapan Internet Of Things: Konsep Dasar & Penerapan IoT di berbagai Sektor. Jambi: PT. Sonpedia Publishing Indonesia; 2023.
- Choosumrong S, Piyathamrongchai K, Hataitara R, Soteyome U, Konkong N, Chalongsuppunyoo R, et al. Development of an IoT-Based Flood Monitoring System Integrated with GIS for Lowland Agricultural Areas. Sensors. 2025;25(17):5477. doi: https://doi.org/10.3390/s25175477
- Hashemi-Beni L, Puthenparampil M, Jamali A. A low-cost IoT-based deep learning method of water gauge measurement for flood monitoring. Geomatics, Natural Hazards and Risk. 2024;15(1). doi: https://doi.org/10.1080/19475705.2024.2364777
- Kolban N. Kolban’s Book on ESP32 & ESP8266. Victoria: LeanPub; 2016.
- Gourley D, Totty B, Sayer M, Aggarwal A, Reddy S. HTTP: the definitive guide. Sebastopol (CA): O’Reilly Media; 2002.
- Yiiong SP, Bundan N, Chew KM. An IoT Based Flood Monitoring and Response System. BJoST. 2022;4(2):08–17. doi: https://doi.org/10.35370/bjost.2022.4.2-02
- Shabiriani, Ramadhan, Ratum, Tjokrowerdojo, Hilman. IoT-Based Threshold Classification for Tidal Flood Early Warning in Smart Coastal Monitoring: A Case Study in Mayangan Village. 2025 International Conference on Informatics, Multimedia, Cyber and Information System (ICIMCIS). 2025:803-808. doi: https://doi.org/10.1109/icimcis68501.2025.11327342
- H MR, Warni E, Angriawan R, Hariadi M, Arif YM, Maulina D. Design of Flood Early Detection Based on the Internet of Things and Decision Support System. Isi. 2024;29(3):1183-1193. doi: https://doi.org/10.18280/isi.290335
- Mosavi A, Ozturk P, Chau KW. Flood Prediction Using Machine Learning Models: Literature Review. Water. 2018;10(11):1536. doi: https://doi.org/10.3390/w10111536
- Abalos MS, Fajardo AC. Iot Based Flood Detection, Alarm and Monitoring System Using Multilayer Perceptron and Regression. Ijmra. 2023;06(07). doi: https://doi.org/10.47191/ijmra/v6-i7-16
- Prastyo EA. Edukasi Elektronika. 2020. Water Level Sensor K-0135. Available from: https://www.edukasielektronika.com/2020/10/water-level-sensor-k-0135.html