DESIGN OF FIRE EARLY DETECTION SYSTEM USING MICROCONTROLLER AS SMOKE AND SPRINKLE DETECTION USING FUZZY MAMDANI LOGIC METHOD

This research presents the design of a fire early detection system utilizing a microcontroller integrated with Mamdani fuzzy logic. The system employs multiple sensors, including temperature, gas


INTRODUCTION
In the era of modern technology, designing a fire early detection system is very important to protect buildings and human lives from the threat of fire that can occur at any time.Fire is one of the disasters that can cause huge losses, both in terms of material and casualties.Therefore, the development of a fire early detection system is the main focus in order to prevent and reduce the impact of fires.In this research, a fire early detection system is designed using a microcontroller as a Previous research aims to obtain comparison and reference materials.In addition, to avoid similarities with this research.So in this previous study, researchers listed the results of previous studies.
1. Previous research conducted by (Jumadril and Arnomo, 2022).This research develops a prototype design of this automatic fire extinguisher using an Arduino Uno atmega328p microcontroller based on fuzzy logic.2. Other research conducted by (Fitriadi et al., 2022).This research aims to design an early fire prevention system in a room with a fuzzy logic method based on the Internet of Things (IoT).The system consists of inputs in the form of fire sensors, smoke sensors, and temperature sensors.Fuzzy logic with Mamdani inference can detect a potential fire with an average error of less than 1% when compared to MATLAB simulation results.3.In research conducted by (Anam et al., 2020).In this study using three sensors, namely the fire sensor, temperature sensor, and smoke sensor as a source of data input.Arduino devices as data readers and Raspberry Pi are in charge of managing further data.While the method used to detect fires is the Fuzzy Sugeno method with three main parameters, namely temperature, smoke density, and fire intensity.4. In research conducted by (Simbolon et al., 2020).In this study, a building fire detection prototype was made using Arduino mega 2560 with DS18B20, MQ-2, flame sensor and buzzer sensors as alarms.Fuzzy logic is used to determine an appropriate condition in a building whether it is dangerous or not which later the buzzer will sound according to the fuzzy output results.In the fuzzy logic algorithm, an accuracy of 99.995% is obtained.For the average delay value of the tool to the thingspeak database of 41.249 ms and for the average throughput value obtained of 14.732 Kbps.Based on previous studies, the weaknesses and advantages of previous approaches in fire early detection can be identified, as well as the potential for applying fuzzy logic methods in improving the performance and adaptability of fire early detection systems that use microcontrollers as smoke detectors and sprinklers.The development of a fire early detection system that uses microcontrollers as smoke detectors and sprinklers with the application of fuzzy logic methods has the potential to improve the efficiency, accuracy, and response of the system in dealing with fire threats.This technology integration is expected to produce a more adaptive and intelligent solution in dealing with various fire scenarios that may occur.

RESEARCH METHOD
This research framework describes the sequence of activities to be carried out in research related to fire early detection systems using microcontrollers and fuzzy logic.The research begins with a literature study to understand relevant theories and technologies, including fire detection systems, Internet of Things (IoT), Arduino, and fuzzy logic (Devi, 2019).Next, a system requirements analysis was conducted to determine the required inputs, processes, and outputs.Inputs include data from smoke and temperature sensors, while outputs include fire detection decisions, severity, sprinkler control, and alarm and notification signals.Fuzzy http://eduvest.greenvest.co.id logic is used to process this data and generate intelligent decisions (Adhiluhung et al., 2022).
The design process involves interfacing hardware components with the NodeMCU microcontroller as well as software development to ensure proper integration.Once the system is designed, testing is conducted to ensure the functionality and reliability of the system before it is deployed in a real environment (Alkawiyu et al., 2021).The research discussion plan includes the utilization of IoT and fuzzy logic in improving home security, analysis of test results, and potential for further development.The research is scheduled to take place from May 2023 until completion (Saiyar and Rudianto, 2022).

Hardware Design
The hardware design system that will be discussed is shown in the hardware system diagram blog below: In the blog diagram, it can be explained that the design of this tool consists of several components that can make the system run according to its purpose, namely the Temperature Sensor which functions as a receiver of temperature data, the MQ-5 Sensor which functions as a receiver of Smoke data, Infrared Sensor which functions as a receiver of Fire data, Arduino Uno as a data processor received from DS18B20 and MQ-5, after which the data received from the sensor is processed by a microcontroller to turn on the buzzer, led, and NodeMCU as a Wifi Module.

Sensor Testing
The purpose of this testing process is to determine the level of accuracy of the temperature sensor.In the process of testing the MQ-5 gas sensor, five stages of testing were carried out, namely the first test was carried out by measuring room gas levels, second measuring lighter gas levels, third measuring plastic smoke concentration, fourth measuring paper smoke concentration, last measuring plastic smoke concentration.In each test, the PPM value will be calculated based on the following equation (Gull et al., 2021).
Table 4.1 shows the test results of the MQ-5 gas sensor for five gas scenarios.Based on the test results, the PPM value is directly proportional to the ADC value generated by the sensor.The lowest PPM value is generated in the room gas scenario which is 407 ppm, while the highest PPM value is detected in the cigarette smoke scenario which is 791 ppm.Thus it can be concluded that the MQ-5 gas sensor has been able to work well where it is able to detect various test gas scenarios.Cigarette Smoke 406 791 The testing process on the fire sensor aims to test the performance of the sensor when detecting fire sources within a distance of 10-100 cm.In testing this sensor using a candle fire source placed parallel to the fire sensor.If a fire source is detected, the fire sensor indicator light will turn on and vice versa if no fire source is detected, the indicator light on the sensor will turn off.4.2 shows the test results of the fire sensor for 10 trials.Based on the test results, it is found that the fire sensor is able to detect a fire up to a distance of 100 cm.However, for implementation on a real scale, a fire sensor that is able to detect a greater distance is needed so that fire detection can be done optimally.

Monitoring System Testing
The next testing process is testing data transmission connected to one network between the Smartphone and Arduino.This system still uses a server on the website http://eduvest.greenvest.co.id and Blynk application by sending DS18B20 temperature sensor data, MQ-5 gas sensor, and fire sensor (Dewanata et al., 2021).The test results of the monitoring display on the Blynk application are shown below.The Fire Sensor will turn on in the Blynk app when a fire is detected at a distance of less than 100 cm.

Fuzzy logic testing
At this stage of the testing process, testing of the fuzzy logic system is carried out by comparing the results of crips between MATLAB software and the tools that have been made (Gulo et al., 2022).2. Fuzzyfication A membership function is a curve that shows the mapping of input data points into their membership values (often called membership degrees) which have an interval between 0 and 1. Membership functions for temperature:

Inference
Fuzzy inference is a method that interprets the values in the input vector and, based on some set of rules, assigns values to the output vector.In fuzzy logic, the truth of a statement depends on a certain degree (Sefi Pujaningrum, 2021).
Based on the fuzzy rules, we can determine the membership value for each output set (Status Level).
a The data below is adjusted based on the value of the table above according to the rules that have been determined.

CONCLUSION
This research concludes that the fire early detection system designed using microcontroller and Mamdani fuzzy logic method is proven effective in detecting fires through analyzing temperature variables, gas concentration, and fire distance.
The system is able to provide fast and accurate responses, such as activating notifications, buzzers, and automatic sprinkles when detecting potential fires.The use of automatic sprinklers is proven to increase the effectiveness of the system in controlling fires at an early stage.
Suggestions for future research include further testing across different fire scenarios to ensure the reliability of the system under various conditions.Research is also recommended to optimize the fuzzy rules and consider hybrid approaches, such as neural networks or genetic algorithms, to improve detection accuracy.In addition, it is important to add a security layer to the system to protect data and communication, especially if the system is connected to the internet.

Figure
Figure 4. 1 Hardware Blog Diagram

Figure 4 . 2
Figure 4. 2 Initial user interface There is a Temperature panel, Oxygen level or ppm, Fire Sensor, and Off button for Sprinkle.

Figure 4 . 4
Figure 4. 4 Alert view When the oxygen level reaches >850 and the temperature >40, an Alert warning notification will appear, which means that you must be careful because the surrounding area has detected thick enough smoke to allow a fire to occur.

Figure 4 . 5
Figure 4. 5 Dangerous display When oxygen levels reach >850 and temperatures >65 a Dangerous warning notification will appear, and the Buzzer will sound then the sprinkle will spray water

Figure 4 . 6
Figure 4. 6 Alert History View Displays the history results that have been read when the sensor reads the blynk application system data on the smartphone.
Tengku Falih Diny Nurfikri, Sriani Design Of Fire Early Detection System Using Microcontroller As Smoke And Sprinkle Detection Using Fuzzy Mamdani Logic Method 6688

Table 4
. If the Temperature is Extremely Hot and the Gas is Thick and the Fire is Distant), then the Status Level is Dangerous.b.If the Temperature is Hot and the Gas is Medium and the Fire is Medium, then the Level Status is Alert.http://eduvest.greenvest.co.id c.If the Temperature is Normal and the Gas is Thin and the Fire is Close, then the Level Status is Normal.Here we will calculate for the first data, according to the table below:

Table 4 .
13 Fuzzy Logic Table Tengku Falih Diny Nurfikri, Sriani Design Of Fire Early Detection System Using Microcontroller As Smoke And Sprinkle Detection Using Fuzzy Mamdani Logic Method 6700