A flood detection system and flood door control based on Arduino

Flooding has become one of the most serious problems for Indonesians, particularly in flood-prone areas. Floods can be hazardous to the community, particularly if they occur suddenly, at night, or at unpredictable times. The answer to these problems is the installation of a flood detection system and a flood barrier door control system. In this paper, a flood detection system and flood door control based on will be presented. Ultrasonic sensors monitor the air level, a SIM800L module delivers signals, a stepper motor operates the door, an LCD shows the air level, and a buzzer offers an immediate warning. The accuracy and precision of the ultrasonic sensor are 98.83% and 99.40%, respectively. Based on the accuracy and precision of the system, it can be concluded that the system can be used for flood control systems.


Introduction
Natural disasters are natural occurrences that can inflict environmental damage, casualties and property losses.Flooding is one of the natural occurrences that causes massive damages and constantly threatens numerous locations in Indonesia.[1].Currently, the flood disaster has become one of the focuses of public attention in Indonesia, especially in several areas that are often hit by floods, becoming a disaster that is considered normal.However, it is still detrimental to the community, especially if a flood occurs first at night or at an unpredictable time [2].Pursuant to these problems, an early warning system is needed for the community against flood disasters so that the surrounding community affected by floods can make preparations before the disaster occurs [3].Technological innovations that can be used in the event of a flood disaster are an early flood detection system equipped with initial efforts to minimize the impact of floods.
In [1,4] the study was conducted on flood detection and monitoring systems using Arduino and website.In [5][6][7][8] Monitoring floods with internet of things (IoT) systems.In other studies [9], flood detection and monitoring tools using sensor data were also developed.This study only produces a detection system equipped with information media without any initial steps to reduce the impact of flooding.
To overcome this problem, a tool is needed that can warn of flooding by detecting water levels and controlling flood barrier doors that work automatically and can be used in housing.This tool is designed using an ultrasonic sensor, sim800L module, stepper motor, liquid crystal display (LCD), relay, buzzer, and Arduino uno.The ultrasonic sensor is used to measure the water level.The results of sensor measurements at each height of water discharge will provide standby information as well as a reference for the stepper motor to control the flood barrier door.The info is then processed by Arduino and then displayed on the LCD and sent in the form of short message service (SMS) to the mobile phone number that has been set in the program using the sim800L module as a medium for sending and receiving SMS.The virtue of this tool is a program to control the tool to work according to the desired command.

Research Methods
This research includes engineering research.Engineering research is research that applies science in the form of design or tool design.The steps in conducting engineering research are describing the tools that are made to meet the specified specifications, designing the modeling of the tools made, and testing the tools.Ideas and major tasks, design design, geometric arrangement and usefulness, detailed design, prototype/model manufacturing, and tool testing are the six procedures of engineering research.The study findings can be used for internal changes, testing methods, and enhancements to design efforts.[10].
This research collects data by measuring the physical quantities included in the system.Sensor output voltage data, accuracy, and precision are the data gathering methodologies used in this investigation.Sensor characteristics data were obtained from the ultrasonic sensor output.To see the characteristics of the ultrasonic sensor can be seen from the distance that is varied during the measurement, if the distance is changed then the output voltage will also change.Accuracy tool data are taken from the sensor output with the actual distance.The instrument precision data is obtained from repeated measurements at the same distance.The final result is an overall tool test, whether the work of the flood detection system and flood door control is as desired.
The components of the system to be made are arranged geometrically according to their respective functions.The arrangement of the system of flood detection and control of flood barrier gates can be seen in Figure 1.

Figure 1. Schematic of flood detection system and flood door control
In Figure 1 the manufacture of flood detection and flood door control consists of a power supply, ultrasonic sensor, SIM800L module to transmit information, LCD to display the water condition, buzzer for warning indicators in the form of sound, and Arduino Uno as a system controller and stepper motors as door movers.

3.1.
Design Specification The design specification of the tool is the identification of the function of each part of the system by testing the tool, as well as analyzing the data so that it can be seen whether the tool is working properly.The performance specifications of the tool can be seen from the ultrasonic sensor circuit, SIM800L module, LCD, stepper motor, buzzer, and mechanical equipment.The circuit of each component is shown in Figure 2. In Figure 2 (a) it can be seen that the ultrasonic sensor only uses 4 pins, namely Vcc, Grd, Trig, and Echo.The ultrasonic sensor circuit can be used to measure distance when measuring air altitude.In Figure 2 (b) it can be seen that the SIM800L Module has 12 pins, 6 on the right side and 6 on the left side.In the SIM800L module circuit, VCC on Arduino is for Vin Stepdown DC, VCC on SIM800L is for Vout step down DC, Gnd on Arduino is opposite to Stepdown DC, while Vout-on step down DC is for Gnd SIM800L, for RXD SIM800L to pin 2 Arduino, and TXD Sim800L in front of pin 3 Arduino.After everything is connected, the program to run the sim800L module has been inputted to the Arduino, so this circuit can be used.In Figure 2 (c) , it can be seen that the LCD has 14 pins.Because the LCD requires a lot of pins for Arduino to use, an I2C is needed to save the use of pins on the Arduino.The LCD circuit is used to display air altitude data.In Figure 2 (d), a driver is needed to control the stepper motor, because the stepper motor requires a large enough voltage and current.The stepper motor circuit can be used to drive the door.In Figure 2 (e) the buzzer can be directly visible to the Arduino.After the circuit is connected and the program to run the buzzer has been inputted into the Arduino, the buzzer circuit can be used.After everything is connected, the next thing to do is to make mechanical tools.Making a flood detection device and controlling an Arduino-based flood barrier door is made using glass tubes and plywood to become a prototype.The glass tube is useful as a medium for holding air as well as a buffer for ultrasonic sensors and plywood as a barrier door.The mechanics of flood detection and control of flood barrier doors can be seen in Figure 3.The accuracy of the flood detection system and control of the Arduino-based flood barrier door is obtained from air level measurements from 3 conditions, namely safe, standby, and dangerous.The accuracy of the system is seen from the distance accuracy and condition display.The data on the determination of the air height distance is obtained from the comparison of the distance of the air height measurement carried out by the flood detection system and flood door control with the actual distance.Data on the determination of the water level distance is shown in Table 1.

3.2.
Performance Specification The performance parameters are shown in the sensor characteristic data.To observe the ultrasonic sensor's features in response to a change in the ultrasonic sensor's voltage when the ultrasonic measures a specific distance.The input is a voltage of 5V, and the output will be in the form of a voltage in volts later.Figure 4 depicts the features of an ultrasonic sensor.The data in Table 2 are taken from the measurement results in each condition.Here the accuracy of the condition display displayed on the LCD is in accordance with the previously determined conditions.
The precision of the flood detection system and flood barrier gate control is obtained from the ultrasonic sensor output data.precision data were obtained from water altitude distance measurements which were repeated 10 times over the same distance.Accuracy will be seen from the measurement results whether it is close to the actual distance or not.The accuracy of the water level distance is shown in Table 3.
Table 3 In Table 3 the results of the accuracy of the water level distance in the alert condition as measured by the Arduino-based flood detection and flood door control system are very good with the percentage of tool precision obtained being 99.40%.Overall testing of the tool is carried out by running a flood detection device and controlling flood barrier doors.Testing of the tool is carried out at 3 predetermined water level conditions.Later it will be seen whether the response from the flood detection device and flood barrier gate control with what is desired.The results of the tool testing can be seen in Table 4.In Table 4 the results obtained from testing the tool as a whole are that the tool can work with the input program.When the water altitude ranges from 1 cm -6 cm, the condition displayed on the LCD is safe.When the condition is safe, the sim800l module does not send a notification to the user, the buzzer is off and the flood barrier door is open.When the water level ranges from 7 cm -15 cm, the condition displayed on the LCD is standby.When the condition is standby, the sim800l module will send a notification via SMS to the user, the buzzer is on, and the flood barrier door is open.The third condition is dangerous, the water level in conditions varies from 17 cm -25 cm, and the display on the LCD is dangerous.When the condition is dangerous, the sim800l module will send a notification and the buzzer is on, while the flood barrier door is closed..
The specification of the design of the tool is known from the function and circuit of the forming system, while the specification of the dperformance of the tool is obtained from the results of measurement and data analysis.The results of the specification of the Arduino-based flood detection and flood barrier door control system were obtained from the characteristics of the ultrasonic sensor, accuracy, precision, and testing tools.ultrasonic sensor characteristics can be seen from the effect of distance on the voltage generated by the sensor.The results obtained are a directly proportional relationship between the distance and the voltage sensor where the greater the distance.The greater the voltage generated by the sensor [11].
The accuracy of the water distance is 98.83%.The accuracy of the condition displayed on the tool is in accordance with the previously determined conditions.The analysis of the distance, the water level has a percentage of 99.40%.The results obtained are that the Arduino-based flood detection and flood barrier door control system can run according to the program.

Conclusion
The course of the ultrasonic sensor circuit, sim800l module, LCD stepper motor, and buzzer shows the outcomes of the design requirements of the Arduino-based flood detection and flood barrier door control system.The features of the ultrasonic sensor, the accuracy of the tool, the accuracy of the tool, and the testing of the tool are used to determine the performance parameters of the Arduino-based flood detection and flood barrier door control system.The distance of the item is directly proportional to the output voltage of the ultrasonic sensor, according to the data.The flood detection system and flood barrier door control have a 98.83% accuracy percentage.The accuracy percentage of the Arduino-based flood detection system and flood barrier door control is 99.40%.The flood detection system and flood barrier door control are both operational.

Figure 2 .
Figure 2. Circuit of each component (a) ultrasonic sensor circuit (b) SIM800L circuit (c) LCD circuit (d) Stepper motor circuit (e) Buzzer circuit

Figure 3 .
Figure 3. (a) Front view of flood detection system and flood door control, (b) Back view flood detection system and flood door control, and (c) System application at home

Figure 4 .
Figure 4. Characteristics of Ultrasonic sensor Figure 4 depicts the ultrasonic sensor's features as seen from various distances.If the distance is changed, the output voltage will also change.The greater the distance is given, the greater the output voltage.The accuracy of the flood detection system and control of the Arduino-based flood barrier door is obtained from air level measurements from 3 conditions, namely safe, standby, and dangerous.The accuracy of the system is seen from the distance accuracy and condition display.The data on the determination of the air height distance is obtained from the comparison of the distance of the air height measurement carried out by the flood detection system and flood door control with the actual distance.Data on the determination of the water level distance is shown in Table1.

Table 1 .
Water level distance accuracyIn Table1the accuracy of the measurement of the water altitude distance is close to the actual distance where the percentage of accuracy obtained is 98.83%.Table3is showing the condition of display accuracy .

Table 2 .
Condition of display accuracy . Water Level Distance Precision

Table 4 .
Result of Tool Testing