A smart and cost-effective fire detection system for developing country: an IoT based approach
Автор: Razib Hayat Khan, Zakir Ayub Bhuiyan, Shadman Sharar Rahman, Saadman Khondaker
Журнал: International Journal of Information Engineering and Electronic Business @ijieeb
Статья в выпуске: 3 vol.11, 2019 года.
Бесплатный доступ
Disaster caused by sudden uncertain fire is one of the main reasons for a great loss of properties and human lives. In our paper, we have developed a smart and cost-effective fire detection system based on the IoT that can detect the sudden uncertain fire in a quick succession to reduce the significant loss. The device houses a sensor-based smoke detection system and a camera which could be accessed by the user from anywhere through the use of internet for taking necessary preventive actions based on the reliable assessment. The notification system takes advantage of an online short message service which is connected to the Raspberry Pi module that gets triggered when the smoke sensors detect the smoke and informs the users about the predicament. The device also has a buzzer connected to central module to notify the nearby users.
Smart, IoT, smoke, cost-effective, efficient
Короткий адрес: https://sciup.org/15016174
IDR: 15016174 | DOI: 10.5815/ijieeb.2019.03.03
Текст научной статьи A smart and cost-effective fire detection system for developing country: an IoT based approach
Published Online May 2019 in MECS
Fire disasters in recent years have been rising in an alarming rate in Bangladesh. If we check our garments sector only, there has been an alarming number of fire disaster that has caused a great deal of damage in properties and took a great toll on human lives [1]. Now, after most of these disasters, it has been found that the human and property toll of these disasters could have been significantly lessened if the authority is notified in a short period of time. The following table portrays the severe fire incidents in Bangladesh [9, 10]. According to table 1, the time needed to respond is not long enough, but the problem is about the responders are notified of the sudden fire incidents after a long while.
Smoke detector is an essential safety measure that is mostly used nowadays to counter any kind of fire mishap. It has been available for a long time. Way back in 1902, an English electrical engineer named George Andrew
Designing and implementing the system that we have undertaken is not going to be an easy task. We have cost and power efficiency in our mind while coming up with the idea for the device. The developed device consists of different components which are intended to work according to the goals of the device in the resource constraint environment. Keeping these points in mind, we have constructed a smart smoke detection system that is both inexpensive and resource efficient. We will probe here on the past works based on the same principles to focus on the major differences and improvements achieved by our system.
In [1], authors have proposed a system that takes advantage of Radio Frequency (RF) technology. They have constructed a system that does not need a base system to be controlled. They are using RF technology in a way that if any single of the sensors detect any kind of fire anomaly, it will start emitting a low voltage RF to all
Table 1. Recent fire incidents in bangldesh
Case No. |
Location |
Time to respond in minutes |
Duration of accident in hours |
Number of injuries |
Number of deaths |
(Approx.) (Approx.) |
|||||
1 |
Bashundhara City Dhaka – 14th March, 2009 |
2 |
8 |
50 |
7 |
2 |
Nimtola Tragedy Dhaka – 3rd June, 2010 |
3 |
4 |
200 |
126 |
3 |
Tampaco Folis LTD. Dhaka – 15th September, 2016 |
2 |
5 |
70 |
30 |
4 |
Mirpur Slum, Dhaka – 12th March 2018 |
5 |
4.5 |
6 |
n/a |
5 |
Rohinga Camp, Dhaka – 12th January, 2018 |
2 |
1 |
4 |
2 |
6 |
Chakbazar Tragedy, Dhaka – 20th February, 2019 |
2 |
8 |
200 |
79 |
7 |
FR Tower, Dhaka – 29th March, 2019 |
5 |
6 |
90 |
26 |
the other smoke sensors in the vicinity. When that happens, all of the smoke sensors will start an alarm which will let people near the incident place know that one of the sensors has sensed smoke somewhere. While the solution presented in this paper is indeed inexpensive, it lacks a few more important functionalities. At first, the device proposes no remote functionality. This architecture requires human presence at all time. When the device detects any safety hazard, it can only sound the alarm for nearby person to be notified. In order to confirm complete safety, we have ensured remote functionality in our device which would send a message after detecting the fire until the issue has been resolved. Also, RF poses a lot of problems as it is an outdated technology.
In [2], the author does not propose any new device rather it emphasizes on the comparative effectiveness of photoelectric and ionization smoke alarms. The author mentions about how both the photoelectric and ionization smoke alarm operate when smoke enters their chamber but yet how their mechanisms are completely different to each other. The paper has some interesting views on how the sensors are configured to detect the fire quite slowly as they cannot detect it until there is a substantial amount of carbon monoxide or smoke in the atmosphere and a potential reason for fire mishap. This work is rather interesting based on how it takes into account the effectiveness and the nuisance probability of the devices. When it comes into comparison with our work, it does provide us with ideas about how to configure an efficient alarm system demolishing the adverse causes.
By far the proposal presented in [3] comes very close to what we want to offer in our project. They have offered a smoke detection system based on wireless sensor network (WSN). They have proposed a dynamic smoke detection system that uses ZigBee transmission technology to build a wireless network which analyzes various environmental factors and uses a random forest to identify smokes. It also uses an e-chart for data visualization. However, the proposed system comes with a lot of complexities and requires quite a bit of research and training dataset to implement. Also, the less developed countries might not be able to adopt the system purely for the fact that they might not have enough knowledge, or the system looks really expensive. We on the other hand would like to propose a more inexpensive solution to this problem that has all the bells and whistles that the user might expect and find handy in any situation.
The paper in [4] proposes a completely different approach that eradicates the need of any kind of sensor. Rather they have proposed a system that would be capable of detecting smoke by image processing. The system has different color models embedded on it for both fire and smoke. These color models are extracted from different statistical analysis of data collected from different videos and images to identify fire and smoke. While the system does look promising, the glaring fact is that the paper only mentions about how to study different color models to detect fire and smoke without the use of any kind of sensors. But nothing is mentioned about how the system can be implemented as a safety measure in different scenarios.
In [5], the author reflects on how population demographic and change in lifestyle choices have led to a higher rate of mortality because of house fire. As mobile and handheld mediums of communication have become the norm, the author proposes an application based on the mobile devices that would be able to detect fire and initiate alarm. There is also an option available if the occupant is unable to confront the fire, another nearby preferred contact will be notified about the fire so that necessary steps can be taken to save the occupants. This project is mainly based on the western lifestyle of elderly people living alone with severe hearing problems. Now, the paper mainly focuses on a demographic feature that is more isolated and this application will indeed be very valuable in terms of their safety. But the fact is that this scenario is not a general one for other countries rather than the western world. In our project, we are making a more generalized model that could be implemented in any situation. Also, we have included the messaging mechanism, but our approach is quite different and efficient than what has been proposed here.
Finally, from [6] we reveal another smart system that takes advantage of the ZigBee transmission technology. Although it has the same kind of technology beneath the surface, it surely is different form the other model that has been reviewed earlier. Surprisingly, the system proposed in this paper is fairly similar to the RF one we have reviewed in the very first paper. It basically has the same idea, but instead of using radio frequency to alert the nearby sensors, this system uses wireless network that uses ZigBee transmission technology. This is an ingenious way of putting a modern spin on an existing one to make it more efficient and reliable.
The objective of this paper is to lessen the damage done by any kind of fire mishap. We have decided to embark in this journey with the view of developing a device that is suitable for any kind of usage: domestic or industrial. Our motivation mainly comes from observing the horrific destruction that is caused for various different fire disastrous happened in Bangladesh. When it comes to the core technology of the project, we are using a Raspberry Pi (R-Pi) module and merging it with existing technology to make the device. We are using an online messaging system that gets to work as the sensors detect any kind of anomaly and notifies the user. The user could then remotely log on to the device to check the situation through a camera that is attached to the system and take necessary steps. The kind of sensors we are using in our device will not only be able to detect smoke, but also to detect the release of Liquid Petroleum Gas (LPG) in the atmosphere nearby [13]. In that sense, the sensor offers better and diversified performance. Another of our motivations is to make the system modular but compact in design at the same time which will make the system more efficient. Cost effectiveness is another feature of our system. Buying individual smoke sensors that are available in market could result a costly endeavor for people with small budget for safety measures. We provide them a device that will give them an accurate and reliable solution in the lowest possible cost. Finally, the paper is organized as follows: to propose a new improved device, to describe the functionality goal of the system, to emphasize the benefits and drawbacks of new systems, and to explain future improvement options.
-
II. System Architecture
In order to design the system architecture, we use existing components and technologies that are combined in an excellent manner to make a device that works simultaneously as a smoke detector, alarm initiator, and surveillance media at the same time. Components used in the systems are: R-Pi-3 B+, MQ-2 sensor, 10 bits
Analogue to digital power converter, 16 bits Analogue to digital power converter, MCP3008 chip, Buzzer, Breadboard, and Jumper cables. First issue before developing the device is to choose the best kind of components that is available in the market and is not expensive to serve our purpose to monitor and maintain the connection between the control point and the end user premises. The reason for choosing R-Pi over Arduino is that Arduino exposed some glaring problems. The Arduino is rather hard to maintain than a R-Pi. Moreover, the R-Pi comes with all the important modules which are sufficient for us to do the inhouse development. It becomes a cost-effective solution. Even when choosing R-Pi, we had to choose a perfect module from a variety of models. Later, we moved with the R-Pi-3 B+ as it has all the bells and whistles that we require and is powerful enough to handle the load of any newly connected module. In addition, we had to choose a sensor that is the most suitable for fulfilling our need. We select the MQ-2 sensor as it fulfills our necessary requirements. MQ-2 sensor detects a variety of things such as smoke, LPG, and CO 2 level in the atmosphere [7]. An MCP3008 chip and a 10 bit Analogue to digital power converter was used initially but it posed a bit of wrong value at the beginning [7]. So, after that, we used a 16 bit Analogue to digital power converter which gave more accurate results. The Analogue to digital power converter was used merely for the fact that the R-Pi module does not have enough 5V pins and if we use a 5V power connector in a 3V one, there is a risk of damaging of the device. A simple buzzer was used to demonstrate the basic device but in industrial case, the buzzer could be upgraded.
To notify the end user about any kind of anomaly, we have used an online short messaging service (SMS) named Twilio. We have used the API key and SSID of the user and hardcoded them into the source code in a way that when the sensor detects any anomaly, the SMS system is triggered and through the internet connection the user gets a notification text and keeps on getting the same SMS as long as the matter is not looked into. This does not require the end user side to be connected to the internet. There is a sleep time defined in the code where the device keeps on searching after every 2 micro seconds (ms). The code is also customized in a way that when the sensor stops sensing any kind of smoke, the SMS also stops triggering.


Fig.2. Gas sensor configuration chart for detecting LPG [7]
The device also has a camera housed into it and it can only be operated through the IP address of the device. To ensure the authenticity, we have used a Dynamic Domain Name System (DDNS) to ensure the authentic access. For our newly developed prototype, we have used the service from NoIP.com and through that we have defined a DDNS address through which the camera could be accessed from any kind of mobile device or any kind of device as long as the end user has the DDNS address and port number [8, 11].
The buzzer has been configured in the same way as the SMS system works. The buzzer starts alarming when it detects smoke or any kind of anomaly. When the detection stops, the buzzer also stops along with the SMS system. This way, there is no need to reset the device and also, the nuisance factor goes down as well.


Fig.3. System activity diagram
However, we have to configure the sensor to detect the smoke or any presence of gas in the vicinity. The concentration of the gas is given in Parts per Million (PPM). One difficulty of the MQ-2 is that a single analog value is given with which the gas content in the air has to be calculated for the various supported gases [7]. The sensor must be configured for this purpose. Since this procedure is also applicable to another R-Pi gas sensor, it is defined as follows [8]:
Firstly, we will check the data sheet of the respective module, which contains a diagram that is given on the next page. However, the rang of the values is not linear but logarithmic to the base 10 (log). So, the first knock on the X axis is 200, then 300, etc. The first knock after 1000 is 2000, etc. The difference between is linear. The idea behind this script for performing calibration and reading is to generate a straight line and evaluate the amount of gas (in PPM). In order to do this, we require two points to measure the slope. Let us consider the example of LPG. We therefore take the point:
P1 (x = 200, y = ~ 1.62)and P2(x = 10000, y = ~0.26)
To estimate the “real” values, we apply the 10 logarithms. Using the two-points form, we can measure the slope, which in our case is -0.47. With the slope and the calculated logarithm from the left point (x = 2.3, y = 0.21), we can now determine the straight line [7].
-
A. Working principle of the system
The working principle of the system is given by the activity diagram which is described below:
Step 1: The system is turned on.
Step 2: The system starts checking smoke for every 2 ms. If any smoke is detected, the system activity will forward to step 3.
Step 4: In this step the system checks whether the user want access to the camera or not. If the user does, live updated will be started immediately.
Step 5: Finally, then system will send the SMS to the user to notify that the incident is taken care of successfully.
-
III. Functionality Goal of the Developed System
All the explained and expected functionality is based on how each OSI layer usually works and how we want our device to work interpreting what it does according to the OSI layer definition. Combining all these existing basic ideas and our developed concepts, a coherent form of system is made which does not only work in thoery, but also works in practice.
-
A. R-Pi view of the system
It is imperative for the R-Pi to be connected to a monitor or a screen. We can observe the gas value detected by the sensor while the code is running in the background. This offers even more in-depth insight of the project. Even while running without detecting any anomaly, the sensor keeps on showing the gas level every 2 ms. The R-Pi view of the process is given below:
-
B. Sending SMS through the internet
For testing purpose, we use the Twilio services which are a cloud communications platform for building SMS, Voice, and Messaging applications on an API built for global scale. The Twilio service can send SMS to a specific mobile number which before being used, needs to be verified in order to build up a SMS service [12]. To access the library of this service we have imported Twilio in the python script file. Then we used the account SID, authentication token and international number which is provided in the Twilio account. When gas value is more than 10000 PPM the system will send a SMS to the user phone. The mobile view of the notifications is given in figure 4. Here, we can see that the online messaging system sends a SMS by detecting smoke and when the smoke detection stops, it stops sending SMS as well. In addition, there is a text coming from the service number provided by the Twilio service. The system can send a custom message telling us to check the designated area for fire.
-
C. Camera access view of the process
In our prototype, we use a webcam named Microsoft Lifecam hd-3000. The camera access view of the process is given below in figure 5 [14]. This will indeed come in handy for the occupant to check out a potential anomaly when the occupant stays out of the vicinity. Detail description of setting up and configuration task regarding integration of webcam with R-Pi module is described in [8].
Table 2. System’S Functional Goal Following Osi Layer
Layer |
Functionality |
Application |
Application side of the system is running smoothly and end-user process handling which means handling the user inputs and the sensor inputs at the same time with ease. |
Presentation |
Data from application side being translated into network form and being encrypted, meaning that the data created by the application side of the device is handled properly |
Session |
The connection between applications being set up properly as in the connection of modules and the internet work correctly. |
Transport |
The transfer of data being handled following the code so that the user gets accurate notifications regarding any kind of anomaly detected by the sensors. |
Network |
The logical path among the sensor, device, and the user is working properly. The nodes in between these logical paths is working properly as it was intended, and data packets being handled properly. |
Datalink |
The data packets being encoded into bits and handling of any errors occurred in physical layer. The MAC layer is controlling access to the camera and the LLC layer is controlling the transmission permission. |
Physical |
Conveying the converted data packets into bits to the destination mobile device through any kind of network connection the system is using and receiving data from end user to access the camera as well. |
Gai Value: 1485
Gai Value: 1427
Gas Value: 1383
Gas Value: 1368
Gas Value: 1452
Gas Value: 1444
Gas Value: 1481
Gas value: 1484
Gas Value: 15853
Gas Detected
Gas Value: 18581
Gas Detected
Gas Value: 15266
Gas Detected
Gas Value: 12626
Gas Detected
Gas value: 8832
Gas Detected
Fig.4. R-Pi view of the system
Gas Value: 8426
Gas Detected
Gas Value: 7375
Gas value: 7252

Fig.5. SMS service through mobile phone
-
IV. Features of the System
The developed system has some very interesting characteristics that makes it at the same time reliable and affordable. Characteristics are such as –
-
• Compact: The system is built on a R-Pi module that is very compact and small. It basically consists of the monitoring device, buzzer, smoke sensor, and camera that would come in easily manageable way to assess the situation remotely in a faster way.
-
• Combined resources: The developed smart system takes advantage of existing technologies and
combines them into a coherent solution that makes the system a robust and efficient device.
-
• Cost effectiveness: One the most important and most appealing factor for the system is that it offers maximum security for a very low cost. In general, a system like this would cost the user very less penny to use.
-
• Dynamic system: The system is dynamically modelled. The device will only notify the user while it detects any kind of anomaly. It needs no reset and will stop automatically after the
notification is admitted and the smoke has been dealt with. The nuisance factors this way are eradicated.
-
• Camera surveillance: The device has camera housed into central module which could be accessed remotely through secured IP address from anywhere through the smart phone and user can get a live update of the current condition of the affected area.
-
• Mobile device notification: The device has a very quick notification system in the form of mobile device notifications when it detects any kind of anomaly. The system is hardcoded with this process and it keeps on notifying as long as the anomaly is being detected which would force the occupant to look into the matter immediately.
Fig.6. View of the webcam
-
A. Application of Smart Smoke detector
The applications of our smart smoke detector are diverse, ranging from large-scale to small scale. The system is flexible enough in any form of usage. From home safety to industrial, it can perform in same way with the same kind of reliability. The application of the system includes:
-
• Home fire security: One of the best uses of the device is its flexibility in its application area. This
device can be used as a home fire security system exactly for which it is intended. A cheaper and smaller version can be used in this case. Also, as the system is built using R-Pi module, few other home security measures could easily and simultaneously be implemented with the smoke detection system.
-
• Industrial case: This smart system is very much capable of handling industrial use case. Being a very flexible and compact device, and in any kind of potentially vulnerable industrial case it can be used as a robust fire safety system that offers the primary detection mechanism in any form of anomaly.
-
• Others: From the first two use cases it is obvious that the system is basically usable in most of the area when it comes to the issue of fire safety. The system comes with a variable flexibility that is unprecedented and cannot be offered by most of the system available these days. Even if any of them does, it will be expensive to offer flexibility that the user might expect from the system. Keeping in mind with all sorts of application area and use cases, the system has been developed successfully. For the sake of usability,
functionalities of the system can easily be scaled up or down.
-
V. Conclusion and Future Work
Our system is a flexible one that offers the users all kinds of accessibility that would make the system a more viable than most other systems available in the market. But still we are aware of the limitations of our system. We look forward to improving the issues and make it an even better and cost-effective fire safety solution that can be helpful for mass people in the long run. Keeping in mind all kinds of sudden fire incidents the system will be optimized in future.
In future, we want to adopt a more robust privacy measure, prevent data mining, implement a secondary medium of operation for the device, and implement a better debugging tool alongside a well flowing user interface that is easy to navigate and use. Some of the possible ways that the project could be improved is given below:
-
• Robust privacy measures: As described before, the device has possibility of getting breached. So, the privacy measures to prevent such attacks have to be taken. Varied authentication solutions have to be implemented in this regard.
-
• Data mining prevention: Data mining prevention is another issue. In this case, a decentralized system should be in its way to go. All these systems need not be interconnected to each other but rather have independent identity of their own. We aim to make the system open source and hence want to prevent any kind of data mining.
-
• Implementation of secondary medium of operation:
The device as of now is completely dependent on internet connection using either Wi-Fi or LAN connection. This poses a bit of a drawback while there is some kind of disrupt in the network connection.
-
• Implementation of robust debugging and user
interface: To debug the device even better we have to implement a debugging functionality through which troubleshooting could become easier. Also, there is a need of a well flowing user interface that is to be implemented so that the mass people can use the system easily.
Список литературы A smart and cost-effective fire detection system for developing country: an IoT based approach
- Khalifa Othman O, Albagul A, Sheroz k, et al. Wireless Smoke Detection System. Proceedings of the International Conference on Computer and Communication Engineering. 2008, 409-413.
- Kasperczyk Chris. Smoke Alarms: Comparing the Differences in Response Times and Nuisance Alarms, https://ceas.uc.edu/content/dam/aero/docs/fire/Papers/10Ssmokeresponse.pdf. Accessed December 2018
- Wu Qin, Cao Jiashuo, Zhou Chuang. Intelligent Smoke Alarm System with Wireless Sensor Network Using ZigBee. Wireless Communications and Mobile Computing, 2018
- Çelik Turgay, Özkaramanlı Hüseyin, and Demirel Hasan. Fire and smoke detection without sensors: image processing Based approach.115th European Signal Processing Conference, 2007
- Woods Alan. Smoke Alarm Detection. Broadcast Notifications and Social Implications. https://ourarchive.otago.ac.nz/bitstream/handle/10523/1023/dp201006.pdf?sequence=3&isAllowed=y. 2010. Accessed December 2018
- Mudunuru Suneel, Nayak V Narasimha Rao, G Madhusudhana, et al. Real time security control system for smoke and fire detection using Zigbee [J]. International Journal of Computer Science and Information Technologies. 2011.2(6)
- Configure and read out the Raspberry Pi gas sensor (MQ-X)”. https://tutorials-raspberrypi.com/configure-and-read-out-the-raspberry-pi-gas-sensor-mq-x.2017. Accessed December 2018
- Bhuiyan Zakir Ayub, Khondaker Saadman, Rahman Shadman Sharar. A smart smoke detection system based in IoT. Bachelor Thesis. Department of Computer Science. AIUB. Dhaka. Bangladesh. 2018
- Dhaka Tribune. 1600 fire incidents in 10 years. https://www.dhakatribune.com/bangladesh/dhaka/2019/03/28/16-000-fire-incidents-in-10-years. Accessed March 2019
- The daily star. Fire incidents on rise in Bangladesh. https://www.thedailystar.net/country/news/interactive-chart-fire-incidents-rise-bangladesh-1722880. Accessed March 2019
- No-IP. https://www.noip.com. Accessed December 2018
- Twilio Service. https://www.twilio.com. Accessed December 2018
- Elgas. https://www.elgas.com.au/blog/492-what-is-lpg-lpg-gas-lp-gas. Accessed December 2019
- Microsoft lifecam hd-3000. https://www.microsoft.com/ accessories/en-us/products/ webcams/ lifecam-hd-3000/t3h-00011