Development of Automatic Fire Extinguish System for Residential Use

We developed a system that detects a fire and performs initial extinguishing. The characteristics of the system are installable by attaching to existing extinguisher and that the system can perform extinguishing through internet browser. Using small computer Raspberry Pi, the system is miniaturized.


Introduction
Total number of fires occurred in Japan in 2013 is 48,095 and total number of the deceased is 1,625 (1) .Building fire accounts for 25,053 of total number of fires.In addition to this, the damage per fire amounts to 12 million yen.The most effective and efficient way to prevent such damage of fire is initial extinguishing.Initial extinguishing is to extinguish fire in 2 minutes from time fire occurred.As extinguishing fire before it spreads, damage is drastically reduced, and the act of fire engine is also reduced.Therefore, initial extinguishing is a efficient way of fire fighting.There is great distinction in damage between cases first-aid firefighting is performed and other cases.The specific example of value is shown in Table 1.
However, initial extinguishing is not performed in many case contrary to its importance.It is conceivable situation as a factor initial extinguishing is not performed that man does not notice the fire.As a factor that can not notice, the situation that man is asleep when the fire occurred or that man is not in home can be supposed.
Performing initial extinguish in such situation is so difficult, the fire become bigger silent in consequence.Besides, it is also difficult to extinguish a fire occurred in housing for elderly because the elder may be not able to extinguish fire properly due to his old body.In 2012, the total number of the fires is 5,089, and the number of residential fire is 1,916.In addition, the number of persons killed in residential fires is 1,016, and 677 of the number is elderly person. (2)he systems for performing extinguishing is already exist.For example, home fire alarm is low in price and installable at any house.However, it doesn't have a extinguish function and when it has been operated, fire may become too big and it is not at initial extinguish stage.For more examples, sprinkler has high fire extinguishing ability, but it sprinkles a large amount of water.Owing to its way to extinguish, the room is soaked with water even it succeeded extinguishing fire, hence electronic equipment like computers may get out of order.To take advantage of initial extinguish, we need a system which detects fire in initial stage, and extinguish fire properly.
Therefore, we aim to develop a system which performs initial extinguish for a general home.In this study, we developed a remote system that can be operated from out of home.

Structure of body
The system is stationary in the home, are intended to do the fixed point extinguishing.It is consisted of fire extinguisher, video camera, infrared camera and small computer Raspberry Pi.The core of the system is Raspberry Pi.Raspberry Pi is a small computer of about business card size, and it has IO-pins which can be used for control.
The operation schematic diagram of the system at the time of fire is shown in Fig. 1.First, if fore occurs, it is detected by the fire detection system.And a notification is sent to user, and user accesses to the website for fire firefighting via device user have.In this system, device user use can be anything which has browser: PC, smartphone, and tablet.And, the user presses the extinguishing button on the web site.Then, the system will inject the fire extinguisher.
The system sends camera images to Raspberry Pi from infrared camera, and processes the images.When the system detected a fire, user make sure that the fire occurred by confirming the camera image, and then performs extinguish.

Structure of System
Extinguish system is divided into two manor parts, fire detection unit that monitors whether a fire has not occurred, and extinguish unit that extinguishes the fire.The schematic diagram of the system is shown in Fig. 2. Fire detection unit is consisted of infrared camera and Raspberry Pi.Infrared camera is to detect only infrared light, and because flare emits infrared, by watching the shape of the infrared the system can detect size of flare.If the system detected a fire, send email to preset email address, user access to the website for control the system from URL on the email and performs extinguish.
Extinguish unit is consisted of video camera, Raspberry Pi, and fire extinguisher.The user accesses to the website from URL on email.A real time video image and fire extinguisher injection button is put on the website.User make sure that the fire occurred with video camera image, and if the fire occurred actually, performs extinguish by pushing the injection button..

Exterior Design
The system needs Raspberry Pi, battery, and fire extinguisher drive motor.And, mounting the motor to the appropriate position is essential to draw the extinguisher lever.Therefore, we designed a exterior to attach the system to existing fire extinguisher.This enables user to attach the system to the fire extinguisher in his home.The design drawing is shown in Fig. 3.As shown in Fig. 3, Raspberry   Pi, DC motor, servo motor is located in the exterior.DC motor is located in the side of fire extinguisher's lever, and an iron wire is attached to the motor.Iron wire is wrapped around the lever of fire extinguisher.Rotating the motor, the reeled up wire pull the trigger of fire extinguisher.The actually manufactured exterior is shown in Fig. 4-6.

Fire Detection Unit
The fire detection unit is given by processing the images from infrared camera with Raspberry Pi.The image processing library is OpenCV and programming language is Python.The fire detection process is described below.First, Raspberry Pi gets the images from infrared camera.To make easier to detect the shape of fire, the camera image is processed into grayscale.Then, to remove the noise, it remove the part that its strength of infrared is under the threshold, and leave the only strong part of the infrared.Now, the image has only the shape of the fire.So the system detects the size of the fire from this image.In the initial process of this unit, the system detects the normal size of fire origin, and keeps the size as threshold.This system detects that fire has occurred by comparing the size of fire with threshold.When the system detected the fire has occurred, it sends an alert mail to preset email address, and URL of website for firefighting is on the mail.Then, user access to the site from the URL, and performs extinguish through the site.

Structure of System
The main component of the extinguish unit is website.User confirms that the fire has occurred and performs extinguish through the website.This system generates the website with WebIOPi.WebIOPi is a framework which enables Raspberry Pi to be controlled through the internet, and has various functions like controlling GPIO or executing a python script.And this system gets the image to confirm the fire has occurred with MJPG-Streamer.MJPG-Streamer enables to Raspberry Pi to deliver the images from USB camera through HTTP.The website is generated by WebIOPi and shows the image from USB camera with MJPG-Streamer.Hardware structure of extinguish unit is Raspberry Pi, DC motor, and servo motor.

Experimental Procedure
We conducted a test whether the fire detection system goes well.The procedures of this test are described below.First, the system recognizes the normal size of the fire origin, and keeps it as threshold.Next, the size of fire is varied within the range of normal size and test whether the system doesn't detect that fire occurred by mistake.At last, let the system recognize the size of fire which is in range of abnormality, and test whether the system detects that a fire has occurred.
In this experiment, we use a gas stove as a fire origin because it has been widely spread to home, and has high combustion capacity, so it may become origin of fire.In the experiment, burning stove actually has a safety issue, so we changed the size of fire virtually by changing the distance between the stove and infrared camera.Practically, the system is stationary in fixed point, so it can detect the transition of the size of fire.

Experimental Result
Each state of fire origin and the detection results are  shown in Table 1.The actual infrared images and video images are shown in Fig. 7.The normal size of fire which was recognized by the system in procedure 1 was 2036, and we set the threshold value to be two times larger than that value, so the threshold value is 4072.The recognized size of fire in procedure 2 was from 950 to 1625, and the system didn't detect the fire.At last, the recognized size of fire in the last procedure was 5700.This value is larger than the threshold, so the system detected that a fire has occurred, and sent the alert to the preset email address.Consequently, we confirmed that the system detects a fire and sends alert properly.

Consideration
We constructed a system which detects a fire automatically by image processing and performs extinguish through internet.The merits of this system are its low cost and space saving.It needs only Raspberry Pi, USB camera, motors and fire extinguisher.Therefore, user can install this system at low cost compared to existing extinguishing system.And expansion of equipment of user's home is not particularly necessary to install the system.For these reason, the system is installable to any home which is difficult to install the existing extinguishing system like sprinkler.
Fire Situation Fig. 7. Infrared Image and Video Image.

Table 1 .
Results of Fire Detection.