IoT Prototype System of Flood Detection at Housing Pondok Gede

—Indonesia is a country with a tropical climate. Entering the rainy season, a number of areas along the river have the potential to be affected by flooding, especially the Pondok Gede Permai residential area. Flooding is a big problem for the affected community, it makes the surrounding community panic, because the flood comes suddenly without knowing the time, seeing conditions like this then a tool is made to give an early warning of the arrival of flooding from the river, so that the community around the Pondok housing complex is made. the big game is more alert to flooding. In the Industrial 4.0 era, the Internet of things has developed rapidly, so flood early warning tools take advantage of IoT technology. The purpose of this study is to provide a programmatic framework for flood early warning. The tool framework that will be created is in the form of an IoT-based programmatic flood location model. By utilizing the NodeMCU ESP8266 as a control, transistors as sensors to identify water levels, Flow meter sensors as water release seekers, LEDs and LCDs as pointers, Buzzer as the highest level warning and the Blynk Application to observe river water levels via Android phones so that the people of Pondok Gede Permai especially those near the riverbanks are already alert. The prototype design of this Automatic Flood Detection System produces information that is sent by the NodeMCU ESP8266 to the Blynk Application as an information receiver. an error rate of 7.85 percent with a time span of 4 minutes 3 seconds when the water reaches its highest level and has notifications set within the Blynk App.


I. INTRODUCTION
Indonesia is a nation that has a tropical climate, the rainy season is caused by extraordinary climate changes that occur in various districts in Indonesia so that it makes the surrounding community aware of floods. As a result of the flood disaster, many areas in Indonesia were affected by floods. This is because the community is not ready to face the flood problem that will occur. The effect of flooding can be minimized if the community is more vigilant in managing the entry of floods into the area. One way is to quickly disseminate flow-level data out into the open.
Bekasi City, Jatiasih District to be precise, Pondok Gede Permai Housing has a private condition consisting of interconnected streams, including river flows from Cileungsi and river flows from Cikeas. These two rivers have a meeting point called P2C or the Cileungsi Cikeas river. Where the flow of this river can cause a rise in the water level in the Pondok Gede Permai residential area if there is high rainfall in the Bogor area which causes flooding.
In water level observation research, IoT (Internet of Things)-based devices/tools are made. The sensor tool that will be used in this tool is a water level sensor. The flow rate of flowing water will also be measured using a flow meter sensor. It is also explained to send the water level in the form of information sent via the web with the NodeMCU ESP8266 module to an android device. The purpose of making a river water level detector is to provide early warning to people who have an impact on flooding so that they are more alert to face seasonal floods.

A. Flood
Flood is defined as the inundation of a place due to overflow of water that exceeds the capacity of water disposal in a certain area territory and cause physical, social and economic losses (Rahayu, et al, 2009). Flood is a seasonal threat that occurs when overflow of water bodies from existing channels and inundate the area surroundings.
-Flood is an event where the land that normally dry areas (not swamp areas) become inundated by water, this is caused by high rainfall and the topographical conditions of the region in the form of lowlands to concave. Apart from that, flooding can be caused by overflow of surface water (runoff) and the volume exceeds the drainage capacity of the drainage system or system River flow. The occurrence of floods is also caused by the low infiltration ability of the soil, thus causing the soil to be unable to again absorbs water. Floods can occur due to rising water levels due to above-normal rainfall, temperature changes, embankments/dams that burst, obstructing the flow of water in other places‖. (Ligal. 2008). Some of the characteristics associated with flooding, including: 1. Floods can come with high intensity but direct rain recede quickly. 2. Floods can come with low rainfall intensity but flooding does not subsides quickly, can take up to several days or weeks. 3. Floods cause inundation, erosion and sedimentation. While other consequences are the isolation of residential areas and population evacuation is required.

B. Internet of Things
Internet of things is a combination of internet technology and other communication media, the growing human need for technology, then more research will come, internet of things is one of the results the thoughts of researchers who optimize several tools such as sensor media, radio frequency identification (RFID), wireless sensor networks and smart objects that allows humans to easily interact with all available equipment connected to the internet network.
IoT emerged as a big issue on the Internet is expected that billions of physical things or objects will be equipped with various types of sensors connected to the internet via network as well as technology support such as embedded sensors and actualization, frequency Radio Identification (RFID), wireless sensor networks, real-time and web services, IoT actually cyber physical systems or networks of networks.
With a large number of things / internetconnected objects and sensors/actuators, massive and deep some cases real-time data streams will be automatically generated by things that connected and sensors.
The term "internet of things," or "IoT," refers to the increasing use of the internet, as well as the use of mobile, computer, and network money, and their subsequent integration into everyday life. IoT is related to DoT (Disruption of Things) and serves as an introduction to the shift in internet use from the previous community internet to the M2M (Machine to Machine) internet (KN & Ananda, 2021).
There is also another opinion IoT Internet of Things or also called IoT is a concept that basically refers to the number of devices or devices, a picture of a physical network that is usually installed using sensors, software, and systems that are interconnected using software. internet network as a means of data interconnection must be shared (Dwi, B.R, 2019)

C. NodeMCU ESP8266
NodeMCU is an open source IoT platform. Hardware in the form of an ESP8266 System On Chip from Expressive System, as well as firmware that leverages the Lua scripting computer language. By default, NodeMCU refers to the firmware rather than the hardware development kit (Aswadul Fitri, Mayda, & Krisman Putra, 2020).
The NodeMCU ESP8266 module has three wi-fi modes: station, access point, and both (both) with a 3.3v power supply. This module includes a CPU, memory, and GPIO (the amount of pins depending on the type of ESP8266 utilized), allowing it to function independently of a microcontroller (Gunawan, 2020).

D. Transistor BC547
Transistors are semiconductor components that can perform a variety of tasks such as amplifiers, rectifiers, current controllers, oscillators, modulators, and other purposes. The BC547 transistor is a bipolar NPN transistor that can be found in a wide range of electronic devices, such as amplifiers and switches (Anisa, 2020). This is a transistor with three terminals: base, emitter, and collector. Transistor BC547 is a semiconductor doped with periodic table elements, allowing it to have an excess of charge carriers (electrons) for the N part, and a semiconductor doped with elements with fewer valence electrons, allowing it to have an excess of positive charge carriers for the P part. The transistor BC547 is made up of a semiconductor doped with a periodic table element that allows it to have an excess of charge carriers (electrons) for the N part, and a semiconductor doped with a valence electron-poor element that results in a P-type semiconductor with an excess of positive charge carriers (Lanjar, 2020).

E. Adapter
An adapter is a device that converts AC electricity to DC voltage. That is, with an adaptor, alternating current voltage can be converted to direct current voltage. Because the adapter can also serve as a power source, it's commonly referred to as an I or battery replacement. As a result, adapters are frequently seen in electronic devices (Yosua, 2021).

F. PCF 8574 Module
The PCF 8574 module is an I/O Expander or extension to most Microcontrollers that use the SDA and SCL pins on the I2C module as an interface or interface. PCF8574 is a low-power device with a latched output that can drive huge currents and can be used directly to power LEDs (Edi & Siti, 2020).
This device contains eight bit quasi-bidirectional I/O ports numbered P0 to P7, as well as a high current output latch for turning on the HPL LED circuit and an automatic current and voltage controller (Suhardi, 2014). Without the need for a data-direction control signal, any quasi-bidirectional I/O can be used as an input or output. Bihamdi, F., & KN, N. (2022). IoT Prototype System of Flood Detection at Housing Pondok Gede. TEPIAN, 3(2). https://doi.org/10.51967/tepian.v3i2.1005

G. Flow meter Sensor
A flow meter is a device that measures the amount of liquid or gas moving through a pipe or into an open space. Elements are employed in flow meter to record fluid flow. Calibration is essential for all sensors in order to know the absolute findings (Servina & Manan, 2016-2017. The parts of a flow meter are used to record the flow of fluid. Calibration is essential for all sensors in order to obtain absolute results. Equation (1) is used to determine the volume, total flow rate, and total water flow rate.
A plastic or brass valve, a water rotor, and sensor make up the flow meter sensor. When water runs through the rotor, the rotor's rotational speed changes, so the rotor's rotating speed will match the speed of the water entering the rotor. This sensor has three pins: VCC, Ground, and Signal or Data as a pulse signal output (Mardiati, 2016).
The hall effect sensor is used in the operation of the flow meter sensor. The hall effect is a phenomenon that occurs when a magnetic field is applied to moving charged particles. If the movement or rotation of the rotor is changed by a magnetic field, the Hall effect can be used to detect it.

A. Tools and Materials
The Materials used in the research of Prototype of an IoT-Based Automatic Flood Detection System Housing Pondok Gede Permai are as follows:

B. Research Procedure
The research procedure was carried out in several stages, the steps taken in this research are as follows:

Literature Research
This is the first stage, which starts with a review of the literature on the IoT-based automatic flood detection system tool. The next step is to do a literature review on the components that will be employed in the final project.

Designing Tools
The next step in this research is to create the circuit flow for each connected component. The design of an IoT-based automatic flood detection system is proceeded after the literature study on the components and description of this final project is done.

Working Programs & Tools
The NodeMCU ESP8266 module is connected to the mechanical assembly of the tool and the circuits of each component at this step. LED and Buzzer testing, transistor testing that functions as a water level sensor where the water level is divided into five statuses/levels that are marked by different colors of LED lights, namely green, yellow, and red, and transistor testing that functions as a water level sensor where the water level is divided into five statuses/levels that are marked by different colors of LED lights, namely green, yellow, and red, are among the components that have been tested. Testing the NodeMCU ESP8266 module as a protocol connector, testing the power supply or adapter as a voltage source converter on the tool, and testing the flow meter sensor as a flowing water speed detector

Tools of Testing
To demonstrate how the gadget works, it is being tested in a water container shaped like a little aquarium. This is accomplished by a simulation of the tool's operation at five different water levels.

Flowchrat Diagram
Flowchrat Diagram are used to explain the flow of messages from one object to another sequentially (sequentially) from the first user starts until it produces the expected output. As seen in the picture 1. Bihamdi, F., & KN, N. (2022). IoT Prototype System of Flood Detection at Housing Pondok Gede. TEPIAN, 3(2). https://doi.org/10.51967/tepian.v3i2.1005 Picture 1. Flowchrat Diagram As long as the water level is at its lowest and does not reach the transistor sensor at level 1, the LCD display will indicate the lowest percentage, 5%, with a green LED as a light indicator and safe status. The water level will be animated on the Blynk App's display.The LCD display and Blynk app will automatically alter when the water level rises and touches the transistor sensor at each level. When the water level reaches levels 3 and 4, the Led, which is an indicator, will change. The flow meter sensor will automatically measure the amount of water moving as the water level rises. The Blynk App will show the water outflow that was measured.When water reaches level 3, notifications will show automatically, with distinct information at levels 4 and 5. The Relay, which acts as a contact Buzzer, will activate when water hits level 4 with a sound that repeats every two seconds and enters level 5 with a sound that repeats once without pausing.

IV. RESULT AND DISCUSSION
This automatic flood detection system's prototype design is fairly functional. With the reading of the water level in each sensor that has been set to the height of each level, the monitoring panel has a response time of about 1 second, with the percentage of the water level and the status of the water level displayed on the LCD.
The flow meter sensor, which also serves as a water discharge detector, has the same value as the blynk's display: 0.26 liters per second. Even though there is a difference in the value of the water volume between the volume of the aquarium and the data generated by the flow meter sensor, the difference, which is the percentage error, is still within reasonable limits, with the yf-s201 flow sensor specification having an error percentage of about 10%, while the average percentage error generated based on the results of five times testing is 7.69 percent.
The time span achieved when the level water grew from level 0 to level 5 in roughly 4 minutes 3 seconds with a water discharge of 0.26 liters per second and a maximum volume of 63.19 liters is shown in the time test produced by the flow sensor.
The Blynk App, which monitors water levels on Android phones, has an average reaction time of 1.28 seconds for each water level update; the result is water discharge, water level animation, and notifications that have been set continuously every time the water level rises.

A. Designing Tools
This tool's design includes designing tool design drawings and designing tool components. The mechanical design of the tool can be observed, as can the discussion of system block diagrams, flowcharts, and wiring diagram designs employed in this tool. This tool design can be seen in the following picture 2.

Picture 2. Illustration Tools and Real Location
A prototype aquarium will be built as a water media throughout the tool's design. This aquarium prototype is 75 cm long, 31 cm wide, and has a maximum water level of 25 cm. Acrylic was employed as the prototype's structure or physical form. Using a 4 meters high manual measuring equipment positioned at the sluice gate of the PGP Housing embankment, the comparison with the original conditions on the riverbanks of PGP Housing after completing a survey of 16:1 was found.. This panel box monitoring control can be seen in the following picture 3.

Picture 3. Panel Box Monitoring Control Water Level
The water level sensor readings will be maximized by arranging the sensors in this prototype according to their purpose. The NodeMCU ESP8266 module, 5V 1 Channel Relay module, I2C module, LCD (Liquid Crystal Display) module, buzzer, transistor, and adapter or power supply will all be housed in one black box in Bihamdi, F., & KN, N. (2022). IoT Prototype System of Flood Detection at Housing Pondok Gede. TEPIAN, 3(2). https://doi.org/10.51967/tepian.v3i2.1005 the design of this prototype.

B. Designing Tool Components
Making a wiring diagram module of an integrated tool is one of the stages of creating the components for the automatic flood detection system. The wiring diagram module design for the automatic flood detection system is depicted in the Picture 4.

C. Schematic of the System
To make the functioning system of the tool easier to understand, the following block diagram is provided. The block diagram of the system in the Picture 5, shows that this system is made up of various components.

D. Test the System
System testing is the process of putting hardware and software systems to the test to see if they are suitable and conform to the work system that was programmed.
The first steps in conducting the test are to test the input device, which includes the transistor, flow meter sensor, relay module, Blynk App, and the entire system, these can be seen in the following table1 , table 2, table 3, table 4, table 5, and picture 10.  Table 2 shows, an AVO meter is used to monitor the voltage of transistors. The average transistor voltage test value is 0.759 V, and each transistor was tested 10 times for a total of 5 Transistor.  Table 3 shows, an AVO meter is used to measure the transistor current. The transistor current test averaged 4.586 mA and was repeated 10 times for each of the 5 transistors. Looking at the water discharge data displayed by the Arduino IDE Serial Monitor and the Blynk App, it can be inferred that the resulting water discharge data has the same value of 0.26 liters per second. Bihamdi, F., & KN, N. (2022  The volume and water discharge collected from the Arduino IDE serial monitor data based on the test table above. If calculated, the following equation to determine it (2) Using the water volume data on the Arduino IDE serial monitor when each water level increased to the next level, the time travelled may be estimated using equation (1). Based on test data ranging from levels 0-1 to 4-5, the total duration reached when water reaches the maximum level is 243 seconds, or 4 minutes 3 seconds when converted to minutes. According to the test table above, the water level is split into four categories: safe, alert, alert, and danger. LED lights and LCD monitors indicate the level of attentiveness as well as water level information based on a percentage from 20% to 100%. When the water reaches level 4, the relay that becomes the Buzzer contacted activates, playing a Buzzer sound 2 times every 2 seconds looping, but when the water reaches level 5, the active Buzzer plays 1 time looping.
Picture 10. Display Blynk App on Android Smartphone

IV. CONCLUSION
The prototype design of this Automatic Flood Detection System combines transistors as water level detectors, flow meters as water flow detectors, LEDs and LCDs as indicators, as well as the Blynk Application for monitoring on Android Smartphones, there is an early warning in the form of a buzzer sound at levels 4 and 5 where if the voltage is 4.96V it enters at level 4 and 4.97V at level 5.
With the existence of a flood detection design tool on the banks of the river, it can make it easier for the community, especially the Pondok Gede Permai community, to be more alert to anticipate the occurrence of overflows caused by overflowing river water around Pondok Gede Permai housing that came suddenly