FIRE DETECTION BASED ON IOT THROUGH FIBER TO THE HOME (FTTH)

Fires can occur anytime and anywhere and fires are generally known after the fire has begun to grow. Therefore, it is necessary to detect fires that can quickly detect the presence of a fire and prevent fires from getting bigger. This research has made a fire detection equipment where the detection results can be received remotely by utilizing the internet network through FTTH. The transmitter equipment consists of a fire detector using the MQ-2 gas sensor, LM35DZ temperature sensor, processing data using Arduino that is connected to an Ethernet shield and FTTH. The receiver consists of an Ethernet shield, Arduino, and an alarm and LED circuit. Changes in smoke temperature and thickness were detected by Arduino. When the LM35DZ temperature sensor detects temperature changes greater than or equal to 35 0 C and the gas sensor MQ-2 detects smoke thickness greater than or equal to 150ppm, the Arduino microcontroller will provide logic 1 and will activate the buzzer and led. Conversely, if the temperature and smoke thickness are less than the conditions above, Arduino sends logic 0. Arduino uno is connected to the Ethernet shield so that data from Arduino can be sent via the internet using FTTH network. In the receiver, if the data received by logic 1 will activate the buzzer and led which indicates the temperature above 35 degrees and smoke thickness above 150 ppm. Transmitter devices and receivers can be interconnected through FTTH networks with IP addresses that are one network, where the IP transmitter device is 172.31.16.27 and the IP device is 172.31.16.29. The QOS test results for FTTH network are good with packet loss 0 and very small delay which is <150 ms and throughput above 1Mbps.


INTRODUCTION
Fires can occur anytime and anywhere, with various causes of fire. In general, fires are known when things are getting worse. Fire should be detected earlier, so that the fire can be extinguished. Therefore, fire detection equipment is needed to prevent the occurrence of fires that are getting worse. Fire detection equipment can be designed using temperature sensors and smoke sensors, and is equipped with an alarm as a marker of fire.
The concept of remote management of household devices over the internet from anywhere, any time in the world today can be a reality [1] With this concept, fire detectors are generally placed in certain spaces that will be monitored remotely. The goal is to be able to monitor the temperature and thickness of smoke in the room in real time. For this reason, a transmission medium is needed that can connect fire detection devices with fire alarms with low delay. Because it is desired real time, the signal from fire detection is easier to pass on the internet network where transmission distance can be designed as needed.
The choice of transmission medium needs to be considered whether using wireless or on wire so that monitoring results can be real time and can be trusted. Optical fiber is an on wire transmission medium that has a low delay time. Optical fiber can be used for security systems based on IoT where networks are used Fiber To The Home (FTTH). The problem is how fire detection equipment can be connected to monitors located on receivers via FTTH internet networks. This research has designed a fire alarm as a security system based on IoT using FTTH networks.

RESEARCH METHOD
This research was completed by research and development methods. Research is conducted by referring journals that are developed in accordance with the objectives of this study. IOT mainly has the following three characteristics: compressive perception, which means that entity's information can be obtained at anytime and anywhere; reliable transmission, which means that entities sensor information is required to pass out accurately in real time; intelligent processing, which means that the mass of information can be analyzed & processed efficiently, then the entity's intelligent control is realized [5].
Block research diagrams are made in three blocks, as shown in Figure 1  The transmitter and receiver are each connected to the Arduino which has been programmed in response to temperature sensors and smoke sensors. Arduino will activate buzzer and LEDs which indicate an increase in temperature and smoke density above the permissible threshold. Data from Arduino in the transmitter section is connected to Arduino in the receiver section using FTTH networks. FTTH contains ONT, fiber optic, OLT and central.

RESULTS AND DISCUSSION
In block diagram, fire detection equipment that uses FTTH networks as a transmission system consists of 2 equipment, namely transmitter equipment and receiver equipment. The fire detector uses the LM35DZ temperature sensor and the MQ-2 gas sensor, where both sensors are located on the transmitter equipment. The transmitter is equipped with LEDs and Buzzers as a marker of fire. LM35DZ Temperature Sensor, MQ-2 Smoke Sensor, buzzer, and LED (Light Emitting Diode) connected with Arduino. All changes in temperature and thickness of smoke were detected by Arduino.
The working system of the equipemnt is made following the flowchart as in  When changes in temperature and thickness of smoke have reached the permissible threshold, the Arduino produces logic 1 so that it can activate the LED and Buzzer. The work threshold value is adjusted to the threshold values of the LM35DZ and MQ-2 components based on the component catalog, ie the temperature exceeds the limit of 35 ° C and the density value is more than 150 (ppm)..

Transmitter circuit
The transmitter circuit is shown as in Figure 3. The Temperature Detector circuit in Figure 3. supports the application of a microcontroller-based system. The output voltage on the LM35DZ is 0VDC -5VDC to present temperatures of 0˚C -100˚C. The LM35DZ output voltage is fed to a noninverting voltage amplifier with a reinforcement factor that can be adjusted using a variable resistor. The higher the temperature in the room, the output voltage on this temperature detection circuit will be higher. This circuit is connected to the Arduino A0 Analog pin POLITEKNOLOGI VOL. 17 NO. 2 MEI 2018 The MQ-2 Smoke Sensor Pin connected to Arduino is an Analog pin on A3. Analog data is in the form of 0VDC -5VDC voltage which represents combustible gas intensity value by MQ-2. Then, the data is enumerated by the Arduino ADC (Analog Digital Converter) to 0 -1023.

The Alarm circuit
the Alarm circuit uses a buzzer and a power supply that is supplied at 5VDC. Then, the buzzer is connected to the NPN type driver circuit. The alarm circuit on the transmitter side that is connected to Arduino Uno can be seen in Figure 4. LEDs that will be active when the temperature or smoke exceeds the normal limit.  Figure 5 is a schematic receiver circuit that functions as a fire alarm. In this system 5 Arduino pins are used, namely, pin3 for 5 V voltage, GND pin), pin 4 for controlling the LED, pin 5 controls the Push button and pin 9 for controlling the buzzer. The receiver will turn on the alarm when a fire is detected at the transmitter. The alarm consists of a buzzer to make a sound, an LED as an indicator light and a push button to turn off the alarm manually.

Arduino
Arduino, Ethernet Shield and Optical Network Termination (ONT) are connected to internet networks through optical fiber. The internet network center uses OLT devices. In order for the ONT transmitter with OLT and OLT with the ONT Receiver to be able to communicate, an IP Address is required from the OLT manager. Receiver receives signals sent from OLT. As long as the temperature and smoke density are still below the normal threshold, Arduino will not activate the buzzer and LED. Buzzer and LED work when the Arduino receiver receives digit 1 as the signal from the transmitter. In order for Arduino to work reading changes in temperature and smoke density, Arduino must be programmed first. For example, Arduino must be programmed so that Ethernet can function //memasukan library #include <SPI.h> #include <Ethernet.h> #include <EthernetUdp.h> The sketch above is an ethernet library so that the code that is created can function properly. Suppose you want to initiate the pin used on Arduino, the sketch used is as followsketch const int pushbutton = 5; const int buzzer = 9; const int ledpin = 4; The code above shows the Arduino 5 pin connected to the push button, the Arduino pin 9 is connected to the buzzer and the Arduino pin 4 is connected to the LED. While the sketch is related to addressing Ethernet on the receiver side with the sketch below. //inisialisasi variabel IPAddress ipLocal (172,31,16,29); EthernetUDP Udp; Based on the sketch above, the Ethernet IP used is 172.31.16.29. Next is the sketch for processing data as below. //menerima data udp int packetSize = Udp.parsePacket(); //memeriksa data udp yang masuk ada atau tidak if (packetSize) { //menampilkan informasi jumla data paket yang masuk Serial.print("Received packet of size "); Serial.println(packetSize); Serial.print("From "); //menampilkan ip pengirim IPAddress remote = Udp.remoteIP(); for (int i = 0; i < 4; i++) { Serial.print(remote[i], DEC); if (i < 3) { Serial.print("."); } } Serial.print(", port "); //menampilkan port pengirim Serial.println(Udp.remotePort()); //membaca data paket yang masuk Udp.read(packetBuffer, UDP_TX_PACKET_MAX_SIZE); //menampilkan data paket yg di terima Serial.println("Contents:"); Serial.println(packetBuffer); From the sketch above explained the process of receiving data from the Arduino transmitter. First, Arduino receives UDP data which is continued by checking the data. Next will display the data, port and IP address of the sender in the serial monitor. Then the data is translated with this sketch below. inputString = ""; //konversi isi data paket, dari kata array menjadi string for (int l = 0; l < UDP_TX_PACKET_MAX_SIZE; l++) { inputString += char(packetBuffer[l]); packetBuffer[l] = 0; } //indexOf = mencari kata/karakter dari sebuah variabel if (inputString.indexOf("Caoution") > -1 && steps == 0) { steps = 1; //buzzer dan led on } if (inputString.indexOf("Normal") > -1) { steps = 0; //buzzer dan led off } Based on the sketch above, the data package that has entered the Arduino is changed from the one in the form of a string to a string. Then Arduino reads whether the information sent from the Arduino transmitter is in the form of caution or normal conditions. When information received is in the form of caution, buzzer and active LED. Conversely if the information received is normal, the buzzer and LED are not active.
The time of the buzzer and the LED blink condition, turns on and off and reloads each with a tempo of 500 ms. To turn off the alarm manually, it can be done by pressing the push button, the buzzer and LED are turned off even though Arduino receives caution information.

Fiber To The Home (FTTH)
FTTH Network Design aims to build an internet network using Fiber Optic cable as a data transmission medium.
[6] Design begins with determining the location of the network, the device used, the calculation of the link budget to ensure that the signal sent can still be received properly. FTTH Network Topology applied to the system can be seen in Figure 6  Total attenuation can be calculated a total = L.a kabel + Nc.ac + Ns.ag + Sp ODC + Sp ODP a total = (0.085 x 0.35) + ( 4 x 0.25) + (4 x 0.1) + (1x7.5) + (1x11) = 19.93 dBm. The power margin must be calculated to ensure that the acceptable signal is greater than the receiver sensitivity. With a transmission power of 5 dBm and an additional loss of 6 dB, receiver sensitivity of -28 dBm, the power received by PRx is P Rx= Pt -= 5 -19,93 6 P Rx= -20,93 dBm The power margin is 6.07dBm M = (Pt-Pr(sensitifivas))-20,93-6 = (5 + 28 ) -20,93-6= 6.07 dBm From the measurement results, the signal received using OPM is -16.57 dB and the power received is 22.02 µW. From these data there are differences in attenuation between the results of calculations in room G.203 and data based on measurements. But this difference can be tolerated because the maximum attenuation limit of FTTH networks is -28 dBm.

Quality of service testing (QOS)
After all the systems are installed, the next system must be tested using the internet network. This test is conducted to determine the performance of the devices that have been made include delay, packet loss and throughput. Data retrieval is done three times on FTTH networks with different data collection times, which are 3 minutes, 6 minutes and 10 minutes. This test uses the Wireshark software. The results of the test show that the average delay is 0.4 s, which means the length of network usage does not affect the delay in sending data. Of the three test results obtained very good quality with a delay of <150 ms. In packet loss testing, the quality is very good because there are no lost packages, with successive test results through 1472 kbps, 1211kbps and 1237 kbps. Thus testing the quality of service performance is very good, so FTTH fiber optic lines are good to use.

CONCLUSION
Fire detection equipment using the LM35DZ sensor and MQ-2 can detect all changes in temperature and thickness POLITEKNOLOGI VOL. 17 NO. 2 MEI 2018 of smoke. . All changes in temperature and thickness of smoke will be responded by Arduino equipped with an Ethernet shield. With the Ethernet shield this allows detection results to be sent using the internet. Detection results can be read remotely using a FTTH scale laboratory network with 85 m cable length and the IP address used 172.31.16.29. If Arduino detects temperatures above 35 0 C and the thickness of smoke above 150pp, then Arduino will change the data 0 to 1, so that the Buzzer will be active and the LED light will be on. Real time data with a very short delay time of <150 ms