International Journal of Engineering Advanced Research eISSN: 2710-7167 | Vol. 5 No. 2 [June 2023]
Journal website: http://myjms.mohe.gov.my/index.php/ijear
DEVELOPMENT OF AN EARLY WARNING SYSTEM FOR HEADWATER BY USING ESP32 DEVELOPMENT BOARD
Rosnani Affandi1*, Zamali Omar2 and Lee Moi Fong3
1 3 Jabatan Kejuruteraan Elektrik, Politeknik Melaka, MALAYSIA
2 Jabatan Kejuruteraan Awam, Politeknik Merlimau, MALAYSIA
*Corresponding author: [email protected]
Article Information:
Article history:
Received date : 18 April 2023 Revised date : 2 May 2023 Accepted date : 23 May 2023 Published date : 6 June 2023 To cite this document:
Affandi, R., Omar, Z., & Lee, M. F.
(2023). DEVELOPMENT OF THE HEADWATER EARLY SIGNS BY USING INTERNET OF THINGS (IoT).International Journal of Engineering Advanced Research, 5(2), 61-71.
Abstract: The headwater incidents can be observed by a few early signs, such as the sudden and rapid rise in water level and velocity, as well as the river water transitioning from clear to muddy. Despite that, some of the headwater incidents still resulted in devastation to the infrastructure, the environment, and the deaths of people. This is probably because people are not alert or have a limited understanding of the early signs. Other than that, it is probably because the applicability of the developed system has not yet been evaluated, and, at the same time, the capability to monitor and efficiently provide a headwater early warning is still limited.
Therefore, a proper tool for detecting, warning, and monitoring the headwaters is necessary to be developed.
The aim of this project is to develop an early warning system, including detection and monitoring for headwaters in recreation areas, using Internet of Things (IoT) technology. This system uses an ESP32 board, an alarm, an ultrasonic sensor, a water flow sensor, a turbidity sensor, and ThingSpeak from the IoT analytics platform. This system has been developed, tested, and has successfully functioned. The system can gather, visualise, and examine the real-time data of the water level, water speed, and turbidity. At the same time, this system can alert or notify people when the headwater signs have been detected and send the notification via Twitter by using the ThingTweet application. Thus, the developed system is expected to help reduce the devastation caused by the headwater especially to the environment and property, and save human life.
Keywords: Headwater, Early Warning System, Internet of Things (IoT).
1. Introduction
The headwater disaster in Gunung Jerai, Kedah, shook Malaysia for the first time on August 18, 2021. The environment, property, and three local citizens' lives were lost as a result of this catastrophe. In the meantime, a flood and headwater incident occurred in Kedah on July 4, 2022, claiming three lives and destroying a number of homes in the villages of Gunung Inas.
Chief Minister Datuk Seri Muhammad Sanusi Md Nor estimated that the flood and headwater calamity in Kedah had caused a loss of about RM28 million (Bernama, 2022).
Headwater become a common occurrence in Malaysia recently and generally, there are a few of headwater incidents happened since 2011 as reported in (Naluri Bangsa, 2017) (mStar, 2011). However, compared to recent instances, the effects of the incidents that occurred in 2017 and 2011 were less severe. The majority of recent headwater disasters have wreaked massive havoc on nature, property, and even lives.
According to (Shafiaia, Sabria, Gohari, & H. Liub, 2020), headwater incidents are a type of natural disaster that might endanger vulnerable lives as well as the environment. Additionally, they emphasized that headwater mishaps can occur in any flow channel, including rivers, parks, and waterfall areas. 115 forest eco-parks with rivers or waterfalls may be found all over Peninsular Malaysia (Aziz, Ahmad, & Mokhtar, 2021). The number of eco-parks in Sabah and Sarawak is not included in this statistic. Therefore, headwater incidents cannot be taken for granted in Malaysia despite the country's abundance of forest eco-parks or recreational places.
The development of a tool for headwater detection, warning, and monitoring is necessary. In order to decrease unwanted incidences, it was claimed by (Zin, 2022), (ABDULLAH, 2022), (Ahmad, 2022), and (Zolkiply, 2022) that a headwater early warning system was necessary.
Generally, few systems related to early warning detection have been developed. However, the systems are focusing more on flood and landslide incidents. Nevertheless, the current study and the product development that focus on the headwater early warning system with existing technology are rather limited. Therefore, a proper tool for detecting, warning, and monitoring the headwater must be developed. The primary aim of this project is to establish an early warning system, including detection and monitoring for headwater in recreation areas, using Internet of Things (IoT) technology.
2. Literature Review
The early warning system for headwaters studies is still in its early stages. The majority of studies on early warning systems concentrate on landslip and flood incidents, such as the Flood Alert Notification System (FANoS) (Kadir, Wahab, & Mohsin, 2009), InfoBanjir (THE OFFICIAL WEB OF PUBLIC INFOBANJIR, 2023) and Landslip and mudflow warning systems (UNEP-DHI, 2022). The detecting system and the action system are the two primary systems for the Flood Alert Notification System (FANoS). A flood detector serves the purpose of a flood detector in the detection system. This project has three separate water levels. Level 1, Level 2, and Level 3 (critical) are all acceptable. Once level 3 is found, the flood sensor will alert the microcontroller. Once level 3 is found, the flood sensor will alert the microcontroller.
The state of the river will be shown on the LCD, the Light Emitting Diode (LED) will turn red, and the siren will sound for the active system after level 3 has been detected. Finally, the system will alert the resident by sending an SMS message through the SMS unit.
The flood monitoring website Infobanjir.water.gov.my (Infobanjir) has produced by The Hydrology and Water Resources Division of the Irrigation and Drainage Department (DID), Malaysia. This monitoring website includes data in the form of tables on the flooded areas as well as statistics on rainfall. Rainfall and water level sensors are the two types of sensors used by Infobanjir. Both sensors are installed in outlying stations and transmit data which is subsequently relayed to the appropriate Ministry of Agriculture email address. After extracting the email, the DID National Flood Monitoring Center will display the information and send it to websites.
The United Nations Environment Programme has created landslip and mudflow warning systems that can send out an alert when a landslip or mudflow event may be about to occur in a specific area. This approach aids in increasing readiness for disasters and reducing event risks. On-site slope-movement sensors and rain gauges supply the systems with either ongoing or periodic monitoring data. The data are supplemented with information from mathematical models that have been calibrated using local topography, geophysical features, land usage, and projected meteorological data to determine the possibility of a landslip or mudflow. If there is a significant risk, a notification is delivered to system management and local decision-makers.
Landslides and mudflows are more frequent due to the unpredictability of today's weather brought on by global warming.
Meanwhile, the recent study which related to the headwater is Headwater Phenomenon Warning and Monitoring System or HWMS. This system using two type of sensor which is a water level detector, moisture sensor and Rasberry Pi for the prototype (Kameel, Isnin, Radzi,
& Latiff, 2020). The HWMS system is an Internet of Things (IoT) monitoring system that was developed to help replace the present manual method of monitoring used by the Forestry Department in Negeri Sembilan and to assist lower the hazards of lives involved during headwater events. The system offers capabilities including real-time water level monitoring, allowing users to check on the water condition before travelling to the river. Additionally, it offers headwater occurrences status, which can assist users or staff in keeping track of current headwater occurrences or the patterns and trends of the phenomenon. The staff can use the facilities for creating reports to keep track of the graphs showing the water levels at any given time.
According to Shafiaia, Sabria, Gohari, and H. Liub (2020), Kameel, Isnin, and Radzi (2020), and Borga, Stoffel, Marchi, Marra, and Jakob (2014), the headwaters phenomenon is typically preceded by early signs like the sudden, massive influx of water from a river upstream or from a waterfall into the main river stream. In addition, the change in colour of river water from clear to muddy can be utilized to pinpoint headwater accidents. The majority of headwaters incidents documented in (Bernama, 2022), (Naluri Bangsa, 2017), and (mStar, 2011) still result in the catastrophic destruction of infrastructure, the environment, and human fatalities despite the fact that the headwater can be detected by early signals. (Shafiaia, Sabria, Gohari, & H.
Liub, 2020) drew attention to the fact that the application of the developed warning system has not yet been thoroughly assessed, most likely due to the limited knowledge of headwater settings. Additionally, there are still some limitations with the created systems that have the potential to monitor and effectively deliver an early warning. Consequently, based on the early warning system systems that have been established. It must comprehend the headwater conditions, such as when there is a lot of heavy rain upstream of the river. As the river's level and velocity suddenly and quickly rose, the water changed from being clear to being muddy.
The director-general of the National Hydraulic Research Institute of Malaysia (Nahrim), Datuk Dr Md Nasir Md Noh, stated during the webinar on the headwater phenomenon in ecotourism areas that most of the rivers in Malaysia are at a high risk of experiencing it, especially during a heavy downpour (Noh, 2021). Typically, the debris flow rushes down at a speed of 14 to 15 metres per second after beginning in steep terrain. The headwater can quickly increase the flow velocity from two to ten metres per second and cause the river's water level to increase by one to two meters in about five to ten minutes. In order to address the existing headwater problem, the designed system must have unique properties. A comparison with the current system is also necessary to give a clear understanding of how the new system operates.
3. Method
This project is basically broken down into four key phases to achieve the goal: Phase 1:
System Development (Circuit and coding), Phase 2: Simulation, Phase 3: Prototype Development & Testing, and Phase 4: Findings Analysis.
Phase 1: System Development (Circuit and coding), In this phase, circuit will be design and before designing the system circuit, the headwater signs or circumstances need to be clearly understood by the researcher. As mentioned by (Shafiaia, Sabria, Gohari, & H. Liub, 2020) (Kameel, Isnin, & Radzi, 2020), the headwater sign are such as the occurrence of intense rainfall in the river's upstream region, river water, transitioning from clear to muddy, sudden and rapid rise of river water in level, and velocity. Therefore, the main features, the approach for the suitable sensors used, data storage approach, on-site and off-site warning system and report for data generation functions are put into the consideration before designing and developing the MDWH. Based on the previous study, a proposed solution for detecting and monitoring the headwater signs can be referred to Table 1.
Table 1: Proposed Solution for MDWH System
Three different types of sensors are recommended for use in the MDWH system based on table 1. ThingSpeak from the IoT analytics platform was recommended for the system's data generation and storage. There were two alarms and one emergency light used for the on-site warning system. By using the ThingTweet app, notifications or warnings for the off-site warning system were issued via Twitter. The ESP32 board is used as the development board, and after the circuit design is finished, components such as the ultrasonic sensor, water flow sensor, turbidity sensor, alarms, and emergency light are linked to the ESP32 board. Figure 1
contains the flowchart for the MDWH. The coding is written and tested as the last step in this phase.
Figure 1: Flowchart for the MDWH Process flow
Phase 2 : Simulation, The relevant simulation by using Wokwi has been carried out.
Phase 3 : Prototype Development & Testing , Based on the process in Phase 1 and Phase 2, the prototype of the MDWHSystem need to develop and test. To test the function for each of the components at the MDWH System such as the ultrasonic sensor, water flow sensor, turbidity sensor, alarms, and emergency light the testing are using Flow Channel Trainer (Figure 2).
Figure 2: Flow Channel Trainer
Phase 4 : Findings Analysis, In this phase, results from Phase 3 will be analysed.
4. Results and Discussion
The MDWH is developed by using suitable components as the input and output devices to assure that the MDWH can function properly following the headwater circumstances. All the input and output devices in MDWH can react based on the 3 main signs of headwater. Figure 3 show the overall of MDWH circuit connection for input/output devices with ESP32 to the cloud technology.
Figure 3: Block Diagram for the Overall System
From Figure 3, the input devices in the MDWH is Ultrasonic sensor, turbidity sensor and flow water sensor, the output devices are buzzer and LED. ESP32 Development board is the microcontroller and ThingSpeak act as the cloud technology. Meanwhile, the output of the MDWH sent to the cloud via ThingSpeak application. Before the MDWH circuit is connected, a simple simulation has been done by using the Wokwi online software. Figure 4 show a simulation by using Wokwi.
Figure 4: Wokwi Software Simulation
The simulation by using Wokwi are limited because there are few of components such as turbidity and flow water sensor are not included in the library.
Table 2: Overall Result for MDWH System INPUT
DEVICE
INPUT DEVICE STATUS
OUTPUT DEVICE / ONSITE WARNING
SYSTEM
OUTPUT DEVICE STATUS
OFFSITE WARNING
SYSTEM Ultrasonic
sensor
<1 Meter ALARM 2 OFF
ThingSpeak ThingTweet
LED 1 (YELLOW) OFF
>1 Meter ALARM 2 ON
LED 1 (YELLOW) ON
Turbidity sensor
NTU<10
*
ALARM 3 OFF
ThingSpeak ThingTweet
LED 2 (RED) OFF
NTU >=10
&
NTU <30
ALARM 3 OFF
LED 2 (RED) OFF
NTU>=30 ALARM 3 ON
LED 2 (RED) ON
Flow water sensor
<10 litre/minute
ALARM 1
OFF
ThingSpeak ThingTweet
>=10 litre/minute
&
<25 litre/minute
OFF
>=25 litre/minute ON
*Nephelometric Turbidity Units are used to measure turbidity, which is defined as a fluid's opaqueness caused by the presence of suspended particulates (NTU)
The MDWH testing results are displayed in Table 2. According to the table, the onsite warning system, which consists of LED 1 and alarm 2, will activate whenever an ultrasonic sensor detects an increase in water level of more than one metre. The LED 1 and Alarm remain OFF if the ultrasonic sensor detects a water level of less than 1 meter. The LED 2 and Alarm 3 will light on if the turbidity sensor detects fluid opaqueness brought on by the presence of suspended particulates (NTU level more than or equal to 30). The NTU level will not activate the LED 2 or Alarm 3 if it is below 30. If the river water flow through the flow water sensor is greater than or equivalent to 25 litres per minute, Alarm 1 will activate. If the water flow is less than 10 litres per minute, alarm 1 won't sound.
Figure 5: ThingTweet Tweet the Headwater Alert
Meanwhile for the offsite warning System, the alert will tweet in Twitter to public via ThingTweet. ThingTweet will trigger a reaction if the ultrasonic sensor detects the water level rise more than 1 meter, (NTU) level more or equal to 30 and water flow is more and equal to 25 litre/minute and send it to twitter (Refer Figure 5).
Figure 6: Water Level Monitoring
Figure 7: Turbidity and Water Flow Monitoring
Figure 8: Alert Lamp at ThingSpeak
Other than that, for the offsite warning system, real-time data can be visualise, and analyse in the cloud with the ThingSpeak IoT analytics platform service. People or public can monitor any of the headwater signs such as the increasing level of the river water, NTU level and the river water flow rate from the ThingSpeak platform. Figure 6 and 7 show the water level, turbidity level and water flow rate that appear at the ThingSpeak and can be monitor or seen by public. Figure 8 show that people also can see the alert lamp change to red color if the water level increase more than 1 meter and alert lamp change to orange color if the Turbidity (NTU) level increase or equal to 30.
Figure 9: Location of the MDWH Appear at the ThingSpeak
Figure 10: Overall MDWH System
Meanwhile, at the same time by using the ThingSpeak, people can identified the location of the MDWH. Therefore, people will know the exact location of the headwater incident. Figure 9, shows the location of the MDWH system at Melaka and Figure 10 show the overall of the MDWH system.
5. Conclusion
The MDWH system can operate effectively overall. This system is capable of gathering, visualizing, and analyzing online streams of real-time data related to the water level, water speed, and turbidity of the headwater indicators. As a result, the development of the MDWH system is highly advantageous and suitable for commercialization, especially for use by government officials, tourism business owners, particularly those who run resorts near rivers, and the general public. This approach aims to keep an eye on the headwaters and spot any early warning indicators, such as adjustments to the water's speed, turbidity, or level. Therefore, it is predicted that the system will help prevent more damage from being done to the environment, property, and most importantly, human life.
6. Acknowledgement
Jabatan Kejuruteraan Elektrik and Unit Penyelidikan, Inovasi & Komersilan (UPIK) Politeknik Melaka provided support for this study. We appreciate every one of the UPIK team, including the Director of Politeknik Melaka, who shared information that substantially aided the study.
References
(2021, September 2021). Retrieved from https://www.thestar.com.my/news/nation/2021/
09/30/beware-of-headwater-phenomenon-in-rivers-waterfalls-says-don.
ABDULLAH, A. (2022, Julai 27). Utusan Malaysia. Retrieved from https://www.utusan.com.my/berita/2022/07/perlu-segera-pasang-siren-amaran-awal-di- gunung-inas/
Ahmad, M. A. (2022, Ogos 4). Utusan Malaysia. Retrieved from https://www.utusan.com.my/nasional/2022/08/tiba-masa-pasang-sistem-amaran-di- kampung-iboi/
Aziz, N. A., Ahmad, A. N., & Mokhtar, M. D. (2021). POTENTIAL RISKS OF ACCIDENT AND INJURY DURING WATER ACTIVITIES AMONG VISITORS AT RECREATIONAL FORESTS. THE MALAYSIAN FORESTER, 296 – 312.
Bernama. (2022, July 14). Retrieved from malay mail:
https://www.malaymail.com/news/malaysia/2022/09/14/baling-floods-on-july-4-caused- losses-amounting-to-rm28m-says-kedah-mb/28209
Borga, M., Stoffel, M., Marchi, L., Marra, F., & Jakob, M. (2014). Hydrogeomorphic response to extreme rainfall in headwater systems: Flash floods and debris flows,. Journal of Hydrology, 194-205.
Kadir, H. A., Wahab, M. H., & M. M. (2009). Flood Alert Notification System (FANoS).
International Conference on Rural Information and Communication Technology, 117-120.
Kameel, M. A., Isnin, I. F., & Radzi, R. Z. (2020). (2020). A Development of Headwater Phenomenon Warning. Proceeding of the 2020 IEEE 5th International Symposium on Telecommunication Technologies (ISTT) . (pp. 174-179). Western Sydney University.
mStar. (2011, Mei 4). Retrieved from https://www.mstar.com.my/lokal/
semasa/2011/05/04/dua-mayat-kanakkanak-lemas-di-ulu-bendul-ditemui
Naluri Bangsa. (2017, October 9). Retrieved from Remaja lemas dihanyut kepala air di Kg.
Sungai Bil Behrang: http://naluribangsa.com/web/remaja-lemasdihanyut-kepala-airdi-kg- sungai-bil-behrang/
Noh, M. N. (2021, September 30). Beware of headwater phenomenon while swimming in rivers. Kuala Lumpur, Malaysia.
Shafiaia, S. H., Sabria, F. N., Gohari, A., & H. Liub, Y. J. (2020). Lattice Boltzmann Method Application on Headwater at Lata Kinjang Waterfall, Malaysia. International Journal of Engineering, 760-769.
THE OFFICIAL WEB OF PUBLIC INFOBANJIR. (2023, January 11). Retrieved from https://publicinfobanjir.water.gov.my/?lang=en
UNEP-DHI. (2022, December 22). UN Climate Technology and Centre Network. Retrieved from https://www.ctc-n.org/resources/landslide-and-mudflow-warning-systems
Zin, M. R. (2022, Julai 7). Utusan Malaysia. Retrieved from https://www.utusan.com.my/
commentary/wujudkan-sistem-amaran-awal-kepala-air/
Zolkiply, Z. I. (2022, September 10). Harian Metro. Retrieved from https://www.hmetro.com.my/amp/mutakhir/2022/09/880437/wujudkan-sistem-amaran- kepala-air