6
IoT Protocol for Inferno Calamity in Public Transport

Ravi Babu Devareddi*, R. Shiva Shankar and Gadiraju Mahesh

Computer Science and Engineering Department, S.R.K.R. Engineering College, Bhimavaram, India

Abstract

In this work, safety of passengers in any Journey, especially at the railway’s passengers air-condition coaches or air-condition buses transportation is considered. It is one of the most important aspects to be considered by public transporters. This is of top level priority for passenger safety in Journeys where running conditions are harsh in night time where passengers will be sleeping in that time and unable to observe while train or bus is running. With the passenger’s numbers were reaching hundreds in a single transport vehicle, it necessitates measure of safety for the passengers from any possible inferno calamity situations. In order to solve problems in this scenario, a monitoring system to be installed in railway coaches or buses could be initiated. By using this system, coach environment as temperature, smoke and fire critical safety parameters in these cabins could be instantaneously monitored. So that automatically fire prevention actions take place by releasing the fire prevention material on that spot and alert the passengers and respective authorities to avoid the cases of occurrence of such type of calamity. For the structure of this framework, an ESP32 Wi-Fi and Bluetooth low energy chip based microcontroller is used. To this, three sensors are connected i.e. one auto valve to release carbon dioxide, one to monitor temperature (DHT11 sensor), flame sensor and a MQ2-sensor used for smoke. These sensors keep an eye in the passenger cabins and bottom of the coaches and engine cabins and these parameters values are published to the cloud platforms as topics by utilizing Message queuing telemetry transport (MQTT) protocol. MQTT protocol is a significant remarkable cloud platform that helps to focus information by various aspects and alerts the passengers along with necessary actions to take place automatically.

Keywords: MQTT, wireless sensor network, transmitted power, MQ2-sensor

6.1 Introduction

With the advancement of transportation systems in air, road and water, the passenger’s fire safety is the primary concern for journeys. Inferno calamity might be lethal and defame for factories and domestic home protection and sensitive for life of humans. Most of the reports furnished the inquiry results as accidents that occurred by the fire and by the oral interview of experts from the fire department confirmed that the fire could occur by electrical short circuits or fault and passengers stayed in the concealed air condition cabins which lead to major part of passenger life jeopardy. The human response time is not sufficient to control the situation thus leads to inferno calamity, so that there is a need to find the best way to respond as early as possible. By this way there is necessity for standby automatic fire mishap identification detection and fire risk regulation systems. It is used to restore and strive for expeditious identification, indication as notifications by alarm, and around the clock fire action. The systems were installed for containing smoke, temperature, flame sensors that detect unwanted problems caused by fire and by the utilization of a processing mechanism of unit that alerts instantaneously for warning measures. Sensors play the key role in measuring certain dynamic and static variables like humidity, kind of fuel variance, by considering the slope of the land, the direction of wind, and wind speed, smoke, to name just a few. In such dangerous circumstances early identification and faster warning can result in lowering property and life losses.

Life and property safety concerns call for considering an energetic and reliable system of fire stability. It has seen an increased use as an emerging technology in the terrain of fire. A fire prevention system may be controlled locally at the premises, or if needed, remotely at a distant location. Remote alarm system allows the property owner for the perk to keep an eye on from a remote district and catch prompt action upon receiving an emergency call, unlike a manual device. That means it can be very useful for these sensor-based systems to detect a fire and to take decisions to eradicate it. Remote con-trol systems can be configured to use Wi-Fi, image processing, Ethernet and remaining technologies related in communication digital era in many different ways. Despite being robust and providing a broad boundaries of ruler, the systems are followed by burden around convoluted, uncompact, cost, non-standalone, and providing superfluous apparatus. By this way, a system that would be decisive and sensitive, easy to implement and price-impressive is required.

Even if a range of progressive methods are used in realistic situations, dependable, simple to implement, and price impressive mechanized fire based alarm system in developing countries is non-feasible. Accordingly, an analysis of reality of fire identification equipment is depleted in this examination. By this way an optimized cost and rapid-response fire based identification prevention mechanism was developed and implemented using one of those detectors. Through the message exchange protocol developed by IBM [1], the device is able to send data to IoT via MQTT using Wi-Fi communication technology and warning messages through the topics PUBLISH/SUBSCRIBE mechanism.

MQTT protocol framework acted as a networking protocol that can be helpful in saving power along with network bandwidth [2]. MQTT is a protocol [3] which takes less time for execution that offers messages tiny as stature. MQTT structure is based on Publish and Subscribe is more effective for implementing IoT applications compared with remaining protocols using Request and Response since the MQTT client is not required to deliver an upgrade request which leads to impressive bandwidth as pool as long losses in system life of battery [4] in this system. These properties reveal the perfection for multiple ways, considering restricted environments such as Machine to Machine (M2M) communication and Internet of Things (IoT) communication as well known. This MQTT protocol [5] is used on social media.

Cloud MQTT provides a lodging of services of related computations for cloud which make up a computing platform on insistence. Here this process we show is a particular MQTT along with cloud MQTT [6] which are acceptable specialized aspirants for applications for small IoT businesses. In order to apply for railway air conditioning or bus coaches, we developed a wise model to control fire; we are creating a Cloud MQTT broker. The MQTT broker was used as a forum for the provision of IoT services that can be used to track and regulate temperature and sensibility alarms for fire suppression via the carbon dioxide gas pipeline network in coaches. Arduino type boards were utilized for the IoT end system joining to the distributed network using Wi-Fi channel with a temperature reading device in a fire sensor and fire alarm, aerosol actuator and air conditioner. We’ve used the Web API based on Gluon for mobile application creation. This application facilitates indoor area temperature supervisor system that controls setting of desired temperature, reception of alarm based on fire and preventive functions.

Here we used the availability of half-sized single-board credit card computers such as the ESP32 that made it possible to build multiple automated and control systems with optimized power consumption, less response time for processing capabilities at small amount of price. The proposed fire control program combines the use of inexpensive devices, networking, and wireless communication. Here ESP32 called as microcontroller is used to interface with the flame sensor, gas sensor and temperature sensor and actuator. Whenever the connected sensor devices sends the signal to controller as collectively or independently then the controller will publish this messages to the cloud with the help MQTT protocol mechanism. If the required parameters are acquired to identify the fire incident by subscriber messages then actuator will activated to enable the carbon dioxide cylinder valve to release the fire suppression gaseous elements.

6.2 Literature Survey

Different types of research lead to diverse models of self-working security video camera system abide developed with the help of different platforms. With the latest advances in technology like Web server, GSM and Microcontroller called as embedded microprocessors, these extend the platform to design the various productions of various fire alarm indication systems.

Fang et al. [7] proposed a smart fire alarm system with the help of the fuzzy neural network concept using Single Chip Microcontroller (SCM) AT89C51 and voice chip IS1420.

Shunxia et al. [8] introduced a smart home fire accident alarm system consisting of antitheft feature with the help of wireless technology, fire proof feature and anti-harmful leakage feature from gas. Wireless communication and couple of SCMs were utilized to show the concentration of gas and hosting the warning signals given by the alarm. When smoke is detected by the sensor, a voice appended message is delivered to the correspondent department. Here there is some problem like if any error occurs at the time of detection then it leads to issue a false alarm by the lack of no user authentication in this system.

Jun et al. [9] introduced a protection device for home with intelligent behavior, using a surveillance camera to track important positions within a home using Zigbee. If any penetration has activated the device, the user is notified via SMS and also Multimedia Message Service (MMS). Using Zigbee modules, the temperature reading device and the gaseous level reading device were attached to the control board general purpose input output pins and also enables an umbrella of Wireless Sensor Network (WSN). While this might be used as accounting widely used advanced systems, the WSN management control board utilization is too costly.

With the help of Beagle board, Rakesh et al. [10] introduced FTP Web server and Zigbee which can be utilized to observe the significant locations within the home by installing a camera and identifying smoke presence and this system they called as real-time home surveillance security system. Here, whenever any smoke or some other persons entered the house environment, it can detect those incidents and immediately delivers the messages to mobile phones and also start recording the video camera for specific timing boundaries and raising the indicator as alarm. A drawback is that this system only delivers the SMS to set right the owner of the home and instead of transferring the streaming of the live video record, the recording of video is stored in internal memory of the system. The single board microcontroller covers the economic burden and it contains fewer technological requirements compared to the Raspberry Pi.

Luo Ren and Kuo Su [11] introduced the multisensory fire detection algorithm which handles significant current problems in the group of detection of fire systems used in smart homes via an adaptive-fusion algorithm. It works on fire and detection of fire and with the help of a sensor to measure smoke content, fire identification with a sensor and measuring temperature with a sensor. It is helpful to identify the origin of fire. To make a more accurate decision they considered the algorithm called as adaptive-fusion algorithm. It is very high complex in real world situations. Here the modified Taylor expression is compared with results of 1st, 2nd and 3rd order expressions by the simulation of adaptive-fusion. The updated adaptive-fusion technique might yield sufficient reliable computer simulation for fire detection using fusion to enhance the accuracy and adequacy of the adaptive fusion algorithm.

Qingying et al. [12] proposed a flexible rapid-reaction fire control system that would orient number of targets, set its system structure and analyze the mechanism of cooperative targets. A network environment is built that integrates physical media, wireless communication and data base maintained for the fire control with a structure of five layers, which leads to critically solve the problem of flexible control in the control system for fire. The machine should easily make a joint decision and efficiently harmonize all resources so that the working environment is balanced and the mission of fire control is accomplished with the lowest damage in the shortest time. Building a cooperative rapid-response fire control system is designed to efficiently enhance work efficiency, reduce losses and ensure on-site fire fighters’ health.

Muller et al. [13] developed a multi-sensor technology for tile enhancement of fire detective systems in the desired direction. The key point is the assessment and interpretation of tile signals provided by the monitored phenomena. This signal processing (detection algorithm) mainly defines the capabilities of lie detectors. Modern signal processing techniques (neural networks, fumy logic) could be used due to the availability of microcontrollers specific to fire detector technology with its extreme technological limitations (i.e., power consumption). This paper introduces an MSb FD Algorithm, which is based on the input as temperature and optical density of smoke for fire. These two input devices being selected as ionization systems lead extremely challenging to deploy due to the regulations for environment applied. This sensor signals estimation and analysis is performed using Fuzzy Reasoning.

Hu et al. [14] proposed to use nRF2401 applied for wireless communications within short range as well as GPRS utilized for long-range. Similarly, ARM9 dedicated to point soothe connectionless Multi-sensor utilized to identify as knob, BP algorithm to determine the likelihood of a fire. It consists of sensors called as electrochemical carbon monoxide sensors which consume less power, a smoke detector based on photoelectric and a temperature sensor depending on semiconductor mechanism. The BP algorithm software is implemented in the ARM S3C2440A. Samples of BP algorithm were obtained in accordance with the regular identification of fire within room of China’s State Main Fire Science Laboratory. Point console utilizes Embedded GIS to specify the state of fire location and use GPRS to send message to the fire control center as SMS.

Peinl et al. [15] introduced early detection of fires in the forests by using the Aspires an advanced system for the fire prevention. They collecting al the related data by using cameras, drones and sensors and stored to cloud. They provided the entire data freely accessible to everyone in cloud. By using this technology they allowed to minimise the observation of incidents.

Kodali and Valdas [16] proposed a network of IoT devices that work around the clock to monitor the incidents about fire and its location and send a message as alert to central hub by the chance of fire occurrence. This system might send data to the respective persons or corresponding authorities leads to take the necessary actions. They introduced a MQTT network with the help of Raspberry Pi microcontroller worked as MQTT Broker and Node MCU’s are distributed and interfaced with Pi. If any fire accidents happen in that location then that respective senior node issues the fire accident warning for that place.

Molla Shahadat, Tahia et al. [17] introduced smoke identification device by using wireless technology. They installed smoke detector devices within the range of Wi-Fi signal area. They used hard equipment as Microcontroller board, temperature reading sensor, smoke identifier, receiver and optimized power consumed transmitter along with receiver. Here drawback is arbitrary extraneous noise added from the different types of sources from electromagnetic radiation.

Luzuriaga et al. [18] introduced a technique to boost MQTT flexible to mobile users. They did not focus more on the network penetrated protocols as LISP or Mobile IP. Also, information loss was minimized due to the mobility of mobile devices through node to node transition. But it needs large number of buffers concerning nodes for mobile.

Kodali and Yerroju [19] proposed an emergency response system useful to fire accidents that is developed with the help of Internet of things system framework. For the implementation, they proposed a low cost scheme as Express if Wi-Fi module ESP-32 with Flame detection sensor, Smoke identification sensor MQ5, Flammable gaseous elements identification detection sensor and also with one GPS module are considered. The electronic devices are called sensors that monitor hazard and pass the information like location and incidents to the nearby team or group of people who are involved to control fire like fire department or police department and local emergency rescue organizations like fire departments. Here they used the protocol which consumes less data oriented publish–subscribe messages model based protocol MQTT for dependable and believable communication channel. Thus, they designed with the help of IoT but here human intervention is involved.

Kodali and Valdas [20], proposed a system which based on the IoT which can always monitor for fire mishaps and pass information to the central point by the occurrence of any fire, where there is a fire situation and place of where it happened. Thus the information is forwarded to the respective sources of the concerned responsible persons and in that way suppressive methods are applied. MQTT protocol based network with the help of a Raspberry Pi were utilized as the MQTT Broker and a distributed Node MCUs as group attached with smoke, temperature sensors behave as a sensor network to pass information to the Raspberry Pi. In this way, when there is a fire in some location, the appropriate sensor node passes a message as well as generated an email which tells about the incident to the respective authorities.

Kang et al. [21] made a MQTT operator on Amazon Web Service (AWS). The MQTT middle person has been helpful as a phase to give the Internet of Things (IoT) organizations the ability to screen and control room temperatures, and sense, alert, and cover fire. Arduino was used as the IoT end device interfacing sensors and actuators to the phase by methods for Wi-Fi channel. They made keen home circumstance and organized IoT rubs satisfying the circumstance need. They moreover executed some splendid structure in gear and programming, and checked the system action. They revealed that MQTT and AWS are adequate specific competitors for little IoT business applications.

Mahgoub et al. [22] introduced fire alert frameworks that are imperative to warn individuals before a fire incident is going to happen to their local places like their homes. By this way, today’s alarm systems should outfitted which require a mass of electrical links and labor. This demoralizes clients from introducing them in their homes. By the manner in which they proposed an IoT based remote alarm framework it should be anything but difficult to introduce. The proposed framework is a specially appointed system that is comprised of a few hubs dispersed over the house. Every one of these hubs comprises of a microcontroller (ESP8266 node MCU) associated with smoke, temperature, stickiness, fire, Methane and Carbon Monoxide (CO) sensors that ceaselessly sense the general condition to identify the nearness of fire. The hubs make their own Wi-Fi arrange. These hubs speak with an incorporated hub executed with a Raspberry Pi microcontroller coordinated with a 4G module. When fire is recognized by a hub, it imparts a sign to be brought together by the hub which is activated to send a SMS to the local group of fire-fighters and the client, by considering the client and caution about the house by delivering a neighborhood alert. The client can likewise get data about the status of his home through sending a SMS to the framework. The detecting hubs make a work system and they are connected to the focal hub by means of a scaffold hub. Correspondence between the extension hub and the detecting hub is through MQTT convention. A model was created for the proposed framework and it completed the ideal functionalities effectively with a normal postponement of fewer than 30 s.

Kodali and Mahesh [23] proposed that technology is phenomenal growling engine of change and Internet of Things (IoT) is the establishment of such dynamic engines. Basically, as a general rule the things having sensor limit, satisfactory power deftly and accessibility to web makes field like Internet of Things (IoT) possible. For such fast creating development, it needs to be amazingly light, affordable and have the least information transmission show like MQTT Protocol. By virtue of such non-set up show it is straightforward for the clients to convey or/and purchase in the aching subject through the host going about as server of the framework also known to be the expert. In this paper, it is demonstrated that correspondence between the low power ESP8266 Wi-Fi as client with the clients on PDAs and PC using a MQTT show gets less difficult and progressively reliable. The Wi-Fi enabled ESP8266 board interfaces with DHT11 sensor and LDR sensor to screen the encompassing condition and as shown by the light force level the splendor level of 8 ∗ 8 Neo-pixel network is controlled. The adafruit.io is the MQTT server, and that operator which furthermore gives the workplace a watching structure through the dashboard. The client on wireless and PC purchases into the subjects of temperature, moistness and light force level gets the different updates. The key objective of the paper is to realize the idea for the android to home machines, street light structure for the clever urban regions and fire prepared systems.

Kang et al. [21] presented component with the assistance of manufacturer a MQTT intermediary on Amazon Web Service (AWS). The MQTT merchant has used a stage to give the Internet of Things (IoT) administrations which screen and control room temperatures, and sense, caution, and smother fire. Arduino was utilized as the IoT end gadget associating sensors and actuators to the stage by means of Wi-Fi channel. They made savvy home situation and structured IoT rubs fulfilling the requirement. Kurniawan et al. [24] used the preceding technique to develop an application to control server room environment.

Cheng et al. [25] stressed that the regular fire mishaps of open vehicle have brought about the rejecting of vehicles, disastrous property misfortunes and setbacks, which had drawn across the board the worry of individuals and society for open security. The traveler lodge space of transport is generally little. When a fire happens, high temperature, warm radiation and smoke created by burning will cause incredible troubles for staff departure. Focusing on the prerequisites of Chinese GA1264-2015, this paper did full-scale fire-dousing tests in the transport lodge. The boundaries of temperature dispersion, smoke focus and putting out fires time in the traveler lodge of the transport are broken down, in order to confirm the putting out fires execution of oneself created water-based fire quenching operator and the fixed fire-stifling framework in the traveler lodge. The framework can extinguish fire rapidly and productively. Additionally, it can adequately diminish temperature and convergence of poisonous and destructive gases in the lodge after the fire. It could clearly improve the fire insurance limit.

Jun et al. [26] presented that IOT is viewed as another data industry wave following PC, Internet and versatile correspondence arrange, and has gotten one of key predominant places of new monetary and innovative advancement everywhere throughout the world. The general public putting out fires for the wellbeing of the executives is a significant application field of Internet of Things (IOT) innovation. Here we mainly focus on an IoT innovation which as indicated puts out fires, business prerequisite to talk about the putting out fires with IoT orderly edge and the proposed necessity of improvement purposes of society putting out fires securing the executives as IoT innovation.

Vijayalakshmi and Muruganand [27] presented that Internet of Things (IoT) gives a decent opportunity to assemble ground-breaking framework in fire industry. The growing demand of radio frequency identification (RFID) technology, mobile and wireless sensor network give fire region related applications with high utilization level. This paper is about the ebb and flow exploration, advances and uses of IoT in file related businesses and distinguishing research patterns and difficulties in fire enterprises. The fire IoT intends to associate various things over the systems related with fire. Administration Oriented Architecture is applied to help fire IoT in that layers communicate each other for checking fire and items. This paper practically understands a portion of the layer required for fire observing and industry. Detecting layer is practically acknowledged with WSN hub with sensors, RFID labeled gadget and Video hub for fire and item checking. Everything, for example, sensor arrange, versatile system are associated together in the system layer. Administration layer and interface layer are utilized to acknowledge Mobile hub information, WSN hub information and diagrams show the fire related boundaries.

Li and Hou [28] proposed NB-IoT alludes to a cell based narrowband Internet of Things, which has become a significant piece of the Internet of Things. NB-IoT is another innovation developing in the field of Internet of Things as of late. It has clear focal points in innovation and application. Moreover, the use of narrowband Internet of Things (NB-IoT) innovation in the field of fire assurance can on a very basic level improve the battle capacity of putting out fires powers, maintain a strategic distance from fire and lessen the death toll and property of the individuals. This theory investigates and presents a clever putting out fires framework dependent on the new business standard, and a smoke-fire identification and alert gadget dependent on the Internet of Things (IoT) stage and Nb-IoT innovation. It additionally advances relating answers for the issue of savvy smoke, for example, the worth, focal points and future desires for the arrangement.

Prabha [29] explained that the business’ dynamic nature presents uncommon difficulties to the government. High amount of dangerous material stock has expanded fire dangers with enormous misfortunes. Web of Things (IoT) is a structure of numerous simultaneous gadgets that are implanted and ready to work for information transmission over the Internet. It comprises of all internets empowered gadgets answerable for social occasion, transmitting and working on data extricated by encompassing environment using sensors, locators and processing equipment. In mechanical security and control, IoT assumes a significant job. This exploration work presents another gadget equipped for distinguishing fire and giving an admonition to clients. To screen the incorporated gadgets with a few sensors and cameras, the Raspberry Pi 3 has been utilized. The sensor ceaselessly sense and really starts to communicate esteems over a Wi-Fi relationship to the online advanced server. At whatever point fire is detected, the camera begins to record the picture just as the gadget begins to send the message with the influenced spot pictures. When the blast is detected by the fire transmitter, this will animate the smoke caution and initiate a sprinkler engine. For sensor data the database could be designed by the executive and checked at anyplace.

As mentioned above, the solution to the problems from the earlier introduced work is to create a new fire identification mechanism that warns respective authorities immediately if any incidents happened and then the user can take preventive action. The goal of this investigation is to fabricate a blaze identification and warning system with the help of an Arduino Uno processor based on a microcontroller in combination with other components that is a reliable and cost-effective system and is simple to implement.

6.3 Methodology

The main use of the MQTT protocol as message publish–subscribe mechanism is applied to monitoring the environment as fire alarm and prevention management. This is used to distantly notify fire and smoke events that occur inside or outer the cabins within the locations quickly by conveying short alert message through Wi-Fi to IOT cloud platform. The range of the fire notification arrangements is to make great use of contemporary communications in dealing with emergencies. The purpose of this system is to direct alert notification to a group of mobile numbers or even one (if desired) when fire happens in a specific locality and spontaneously activate the actuator to discharge the fire avoiding material such as carbon dioxide to destroy the fire. The intentions of this fire monitoring and avoidance by MQTT base protocol with ESP32 microcontroller board is to sense the environments for happening of fire with help of flame sensor, monitor temperature, humidity with DHT11 sensor and gaseous level by MQ2 sensor after distributing these characteristics as topics to the IOT cloud platform with the help of PUB/SUB messages based protocol. This system examines the data with the IOT cloud platform and distributes topics to the matching subscriber to trigger the actuator and distributing alerts to particular person’s mobile number.

Present fire panels use the Wireless Alarm Communicator (DACT) transmitter [30] to convey the significant commands as data to the station where it is central point. Here, DACT accompanies just few panels, while the majority of the panels required an external DACT device to transmit the data to that station. The use of DACT is old, since it needs additional hardware components and interface. The distribution unit is produced to resolve the oldness of the DACT that is used to build the cost effective product. Function block diagram could be seen in Figure 6.1.

During this job, the machine manufactured has a device that mechanically prevents fire and distributes any incident on premise fire to the corresponding authority. If the fire detector detects any fire-related incident, the data will be sent to the central station after handling the situation in the fire panel dialler. The built framework has smaller peripherals of hardware supporting parts and hence less the circuit connections with the control board. It eradicates the price and provides flexibility to reuse the programming part.

The MQTT is well-defined as protocol for PUBLISH/SUBSCRIBE messages to the cloud. It is a protocol which consumes less amount processor time for execution and embedded port no: 1883 for TCP/IP. It is also a protocol with free available for usage by open source mechanism by the OASIS Technical forum that finds out how the broker is used to transfer the messages among the clients and developed a tool for implementation and grant Quality of Services (QoS) that facilitates interfacing channel or web with the fine source of internet bandwidth, excels the reliability and to some extent the transfer on guarantee [32]. Either device to device interfaces or device to gateway interfacing will be instituted in this work. A device to gateway interfacing using hardware system displayed in Figure 6.2 is created. The experimentation could be completed with the support of device, gateway and applications. To work with MQTT, user can configure devices or use open software tools (Mqtt lens for MQTT) in place of several devices.

Eclipse Mosquitto is a freely available software tool used as message a broker to deliver the messages that defines variations 3.1 and 3.1.1 of the MQTT protocol. Mosquitto is trivial and ideal for use with complete servers on several devices within boundary of tiny power single board type computers.

It offers a low processing time for messaging conveyance technique using publish/subscribe methodology. This means it is ideally suited for communicating on the Internet of Things with optimized power consumption sensors or devices like mobiles, tablets, inbuilt computers or embedded microprocessors. The Mosquitto platform also facilitate “C-language” library helpful to clients of MQTT and it is most prevalent publish by mosquito and subscribe by mosquito command line.

Schematic illustration of the system architecture as shown as functional block diagram.

Figure 6.1 System architecture as shown as functional block diagram.

This para describes about “topic”. The term topic is described as an UTF8 string, which is used by the broker to filter the messages delivered to every connected client in this system.

Schematic illustration of MQTT protocol: publish–subscribe model.

Figure 6.2 MQTT protocol: publish–subscribe model.

Topics contains one or more topic levels, each is divided by forward-slash. Topics should contain minimum of length one character along with case sensitive and are lightweight. The topics are accepted by the broker without any initialization. Here the topics levels used are as shown in the Table 6.1.

In this work the sensor data parameters across several numbers of trains and buses are stored to the cloud platform with the unique id of TRAINO and BUSNO as top level

Table 6.1 Topic descriptions.

Topic Id Topic Topic description
T1 TRAINNO/COACHNO/FLAME The top level topic TRAINO, sublevel topic COACHNO and topic name FLAME
T2 BUSNO/CABINNO/FLAME FLAME related to Bus
T3 TRAINNO/COACHNO/SMOKE SMOKE related to Train
T4 BUSNO/CABINNO/SMOKE SMOKE related to Bus
T5 TRAINNO/COACH NO/TEMP TEMP related to Train
T6 BUSNO/CABINNO/TEMP TEMP related to Bus
T7 TRAINNO/COACHNO/FLAME FLAME related to Train
T8 BUSNO/CABINNO/FLAME FLAME related to Bus
T9 TRAINNO/COACHNO/ACTUATOR ACTUATOR related to Train
T10 BUSNO/CABINNO/ACTUATOR ACTUATOR related to Bus

Topic published to the cloud, further identifies the respective coach number or cabin number using sublevel topic COACHNO and CABINNO and finally topic values as FLAME, SMOKE and TEMP. Whenever these parameters reached threshold values then the subscribers topics from the clients enabled the topic ACTUATOR respective to the coach or cabin and released the carbon dioxide to suppress the fire immediately without intervention of human being.

6.3.1 IoT Message Exchange With Cloud MQTT Broker Based on MQTT Protocol

In this division we designate IoT messages interchange within MQTT clients and cloud MQTT broker proposal using MQTT protocol that allows appropriating for the establishment of the above atmosphere observing in train coaches or bus. Figure 6.3 demonstrates the MQTT protocol publish/subscribe message exchanges between MQTT broker and client devices. The IoT messages are for the management of room humidity, the detection or suppression of fire and the monitoring of system status. The name of the MQTT subject has been given for each message, who will deliver and subscribe in has been established, and the behaviour of the recipient after receiving the message has also been well defined.

MQTT protocol for coach cabin or outer cabin fire and monitoring temperature or controlling fire sensing or notifying or destruction and system status checking is done.

6.3.2 Hardware Requirement

  • ESP32
  • DHT 11 sensor
  • Flame sensor
  • MQ2 sensor
  • Connecting wires.
Schematic illustration of MQTT protocol message exchanges.

Figure 6.3 MQTT protocol message exchanges.

ESP32 Microcontroller Board

ESP32 is a sequence of financially lower priced with finest use of low power supply on microcontrollers with embedded Wi-Fi and dual-mode Bluetooth that is displayed in Figure 6.4.

Flame Sensor

Sensor is an electrical machine that works as input device. Not all the inputs are collected from sensors, but majority inputs make use of sensors. The output data depends on the measurement. There are several varieties of sensors. Fire sensor used in the section is illustrated below in Figure 6.5.

The flame sensor identifies the fire within its range. The range of flame sensor is

  1. i. 3-feet distance.
  2. ii. 60° angle.
Photo depicts an ESP 32 board.

Figure 6.4 ESP 32 board.

Photo depicts a flame sensor.

Figure 6.5 Flame sensor.

MQ2

MQ2 sensor is used to read the gaseous level and is used mainly to track the attentiveness of airborne LPG gas particles in air, propane, methane, propane, alcohol, carbon monoxide and smoke. The chemiresistor is best known or called as the MQ2 gas sensor. This contains a sensing substance whose resistance in contact with the gas varies. This variability in the resistance measurement is used to classify a gas. This sensor operates at voltage +5 V DC. This device can detect gasses within 200 to 10,000 ppm range as displayed below in Figure 6.6.

DHT11 Sensor

DHT11 device is a low priced, humidity and temperature sensor. It is not the wildest sensor nearby but it is less costly in price. This sensor requires tri-interfaces pins as positive 3 V, earth pin as Ground finally General purpose input/output (GP-I/O) pin. This device is equipped with Quadra pins out of which only three are used and 4th is not used. The DHT11 sensor is displayed in Figure 6.7. The components have three pins, and are easy to attach to the GPIO header of the microcontroller. It measures Humidity as 20 to 80 percentile with accuracy of only 5 percentile Temperature as 0 to 50 °C with accuracy of only 2 °C.

Photo depicts a MQ2 gas sensor.

Figure 6.6 MQ2 gas sensor.

Schematic illustration of DHT11 sensor.

Figure 6.7 DHT11 sensor.

Actuator

It is a part of a device which is responsible for providing control and move mechanism e.g. by triggering a valve. This is a “mover” in common terms. It should require signal for control purpose with sources of energy. Here optimized power is enough for all operations like pneumatic or hydraulic or even human strength. The central source of energy may be electric current, pneumatic strain, hydraulic fluid. By receiving the signal for controlling, it enables by energy of the source converting as some motion automatically, as shown in Figure 6.8.

Software Requirement

Arduino IDE: Arduino facilitates a Computer, “C” type programming language compiled for Arduino type boards and contains the server name such as adafruit.com and port no: 1883 used by server, which appears to use the MQTT protocol, Adafruit account username, as allocated to the TCP/IP address. Arduino IDE [31] are used to write and upload code onto an ESP32 board. The newest version of Arduino IDE is installed. The installation process of Arduino IDE on the computer is furnished below in Figure 6.9.

Arduino IDE split as quadruple.

  1. Tool-Bar
  2. Status Window
  3. Serial Monitor Window.
Photo depicts an actuator valve.

Figure 6.8 Actuator valve.

Snapshot of the initial window of Arduino IDE.

Figure 6.9 Initial window of Arduino IDE.

Snapshot of a sample Arduino IDE toolbar.

Figure 6.10 Sample Arduino IDE toolbar.

Table 6.2 Toolbar options.

Options Description
Option for Code Verify/code Compile This is the first left-hand press. To prove the exactness of the code, press this button to compile. We can see the consequences at the bottom of the Status pane.
Code Uploaded to the Board This is left-hand click 2. By connecting Arduino type board to the computer and selecting the usb port in the IDE, then the code will be transferred to the Arduino board. By using Status Window in the downside we will see the deployment progress.
New File/Open File/Save File As their names indicate, the next three buttons allow you to trigger a new blank sheet for writing the code named as code window or open an already created file. Arduino application files have as extension (.ino) e.g. filename.ino.
To view output Serial-Monitor The final right button let us open the Serial Monitor window.
Snapshot of sample compiling Arduino IDE status window.

Figure 6.11 Sample compiling arduino IDE status window.

Snapshot of logs file messages on the serial monitor window.

Figure 6.12 Logs file messages on the serial monitor window.

Toolbar

On the IDE, toolbar is placed on Upper side as displayed in Figure 6.10. It offers simple access to regularly used alternatives. The whole toolbar choices are displayed in Table 6.2.

Status Window

The Status window furnished in Figure 6.11 lists all results when you substantiate the code or upload it to a server. Any faults that occur during the validation or upload of code may appear in the Status window.

Serial Monitor Window

The Serial Monitor window as shown in Figure 6.12 prints all messages generated in login file and the code by the functions “Serial.print” and “Serial.println”. To print any message on the Serial Monitor window, initializing the message in the code is needed first.

6.4 Implementation

Figure 6.13 displays the MQTT Broker design assembled on Amazon Web Services (AWS) [33]. The execution process is as follows. At first, build a cloud MQTT account. Next, build a server by utilizing EC2 an Elastic-Compute-Cloud that can be called as best elementary and extremely wide spacey utilized setup in cloud MQTT that offers a virtual server associated to the Internet. Cloud MQTT spontaneously allocates internet Protocol address within Public domain to procured server. If consumers’ wants IP address in public domain to be permanent, they need to bear the cost of buying address of Internet Protocol. Else, every time while starting the server, new IP address in public domain will be generated and allocated to the respective server.

Schematic illustration of MQTT broker architecture built on cloud MQTT.

Figure 6.13 MQTT broker architecture built on cloud MQTT.

Figure 6.14 displays the hardware networks regarding the sensors (Flame.MQ2, DHT11) and actuators communicating with the microcontroller ESP32. Connect ESP32 to Arduino IDE by using USB cable and select the appropriate ESP32 board and upload the program to board. Once button is reset on micro controller ESP32 the MQTT client is linked to cloud MQTT by making use of wireless sensor network, sensors and actuators together initiates functioning and generates the original values. At this point flame sensor sends flame logic value as 1 if it predicts any flame, if it doesn’t not predict flame then will send flag logic value as 0, then message is circulated as the subject name FLAME to cloud MQTT broker. Likewise DHT11, MQ2 gas sensors reading initial values are also circulated as the subject name TEMP, SMOKE to cloud MQTT broker. At end the MQTT broker verifies the sensors values and functioning as described in the below flow chart illustrated in Figure 6.15.

Schematic illustration of interfacing flame sensor with Arduino.

Figure 6.14 Interfacing flame sensor with Arduino.

Schematic illustration of Internet of Things system data flow for PUBLISH/SUBSCRIBE in MQTT broker.

Figure 6.15 IoT system data flow for PUBLISH/SUBSCRIBE in MQTT broker.

6.4.1 Interfacing Diagram

Interfacing sensors and actuator with ESP32 are described in Figure 6.14.

The interfacing hardware connections are below:

  1. G2 of ESP32 microcontroller is linked to flame sensor D0 input line and GND of flame sensor is linked with GND of microcontroller ESP32. VCC of flame sensor is associated to 5v of ESP32 microcontroller.
  2. G4 of ESP32 microcontroller is linked to DHT11 sensor data line and GND of DHT11 sensor is linked with GND of microcontroller ESP32. VCC of DHT11 is associated to 3V of microcontroller ESP32.
  3. G15 of ESP32 microcontroller is linked to MQ2 gas sensor out line and GND of MQ2 gas sensor is linked with GND of microcontroller ESP32. VCC of MQ2 gas sensor is connected to 3V of ESP32 controller.
  4. G16 of ESP32 microcontroller is linked to Actuator EN line and GND of actuator is linked with GND of microcontroller ESP32. VCC of Actuator is linked to 3V of microcontroller ESP32.

Languages Used

The main motive for C language used here for this project due to the comfort and easily control, the Computer “C” language friendly to any program learner’s as starting language in computer programming and connected to circuit for input/output components. “C” type language is flexible and best fit with the system based coding to instance a level of intermediate coding terminology to maintain remembrance, Input/Output with marginal components. User interface part is developed in Android for smart phones and tablets.

Algorithm

Platform Used

Operating system Windows 7 or upper released version to be used for designing for the Embedded C for simulation based on Open AT platform.

6.5 Results

The testing of environment monitoring fire prediction and avoidance based fire notification used in this work is shown in Figure 6.16. The system has selected range boundaries. Flame sensor identifies the fire in a range of 3 feet expanse and inside the angle of 60°. In outcomes, there are four scenarios as displayed in Figures 6.17, 6.18, 6.19 and 6.20.

In two cases flame sensor successfully identifies the fire and in rest two cases it fails to predict the flame.

Case 1: In this scenario keep the fire in the range of distance <3 feet from fire sensor, so it detects the flame and sends the alert notification.

Case 2: In this scenario fire is placed outside the range of sensor, i.e. above the 3 feet distance. Then fire sensor is unable to predict the fire, and then no alert notification is sent.

Case 3: In this scenario fire is placed within the angle of 60° within the range of flame sensor. Then sensor identifies the flame and sends alert notification.

Case 4: In this scenario fire is placed outside the 60-degree range of flame sensor. Then flame sensor is unable to identify, no alert message is sent.

Photo depicts testing of fire detection.

Figure 6.16 Testing of fire detection.

Photo depicts flame placed within the range of flame sensor.

Figure 6.17 Flame placed within the range of flame sensor.

Photo depicts flame placing outside the range of flame sensor.

Figure 6.18 Flame placing outside the range of flame sensor.

Photo depicts flame is placed within 60° range of flame sensor.

Figure 6.19 Flame is placed within 60° range of flame sensor.

Photo depicts flame is placed outside the 60-degree range of flame sensor.

Figure 6.20 Flame is placed outside the 60-degree range of flame sensor.

6.6 Conclusion and Future Work

The designed fire identification and avoidance system for railway coaches or bus coaches could efficiently save lives of passengers during fire calamities. This system has its wide usage in airplanes, ships, households, shopping malls, film theaters and safety industries, particularly in growing countries such as India. By using the designed system, fast and consistent alert is likely to originate precautionary actions to avoid consequences of fire.

The designed system requires less costly environment monitoring system that acts consistently to safeguard against fire. It leads to easily equip this system in the domestic or commercial houses, industries, offices and warehouses, etc. The small scale industries where cost to rent internet is the main problem could easily use this system. Big scale industrial areas or dwelling spaces could be observed via the designed system by establishing many modules, one for each unit or floor. The system could be also promoted with additional characteristics such as forecasting the fire situation depending on the constraints like smoke, temperature and fire area tracing and then effective fire defeat resources could be deployed early.

References

1. The HiveMQ Team, Introducing the MQTT Protocol - MQTT Essentials: Part 1, https://www.hivemq.com/blog/mqtt-essentials-part-1-introducing-mqtt/, 2015.

2. Grgić, K., Špeh, I., Heđi, I., A web-based IoT solution for monitoring data using MQTT protocol. 2016 International Conference on Smart Systems and Technologies (SST), IEEE, pp. 249–253. 2016.

3. The HiveMQ Team, Quality of Service 0, 1 & 2 - MQTT Essentials: Part 6, https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/, 2015.

4. Karagiannis, V., Chatzimisios, P., Vazquez-Gallego, F. and Alonso-Zarate, A survey on application layer protocols for the internet of things. Trans. IoT Cloud Comput., 3, 1, pp. 11–17, 2015.

5. Lee, S., Kim, H., Hong, D.K. and Ju, H., Correlation analysis of MQTT loss and delay according to QoS level. The International Conference on Information Networking 2013 (ICOIN), pp. 714–717. IEEE, 2013.

6. Hou, L., Zhao, S., Xiong, X., Zheng, K., Chatzimisios, P., Hossain, M. S., Xiang. W., Internet of things cloud: Architecture and implementation. IEEE Commun. Mag., 54, 12, pp. 32–39, 2016.

7. Yu, Q., Zheng, D., Fu, Y. and Dong, Intelligent fire alarm system based on fuzzy neural network. 2009 International Workshop on Intelligent Systems and Applications, pp. 1–4, IEEE, 2009.

8. Shunxia, C. and Yanda, C., Design of wireless intelligent home alarm system. 2012 International Conference on Industrial Control and Electronics Engineering, pp. 1511–1513, IEEE, 2012.

9. Hou, J., Wu, C., Yuan, Z., Tan, J., Wang, Q. and Zhou, Y., Research of intelligent home security surveillance system based on Zigbee. 2008 International Symposium on Intelligent Information Technology Application Workshops, pp. 554–557, IEEE, 2008.

10. Rakesh, V.S., Sreesh, P.R., George, S.N., An improved real-time surveillance system for home security system using BeagleBoard SBC, Zigbee and FTP web server. 2012 Annual IEEE India Conference (INDICON), pp. 1240–1244, IEEE, 2012.

11. Luo, R.C. and Su, K.L., Autonomous fire-detection system using adaptive sensory fusion for intelligent security robot. IEEE/Asme Trans. Mechatron., 12, 3, pp. 274–281, 2007.

12. Li, C., Zhang, Q., Ma, F., Research on the cooperative quick-response fire control system. 2008 3rd International Conference on Innovative Computing Information and Control, pp. 516–516, IEEE, 2008.

13. Muller, H.C. and Fischer, A., A robust fire detection algorithm for temperature and optical smoke density using fuzzy logic. Proceedings the Institute of Electrical and Electronics Engineers. 29th Annual 1995 International Carnahan Conference on Security Technology, pp. 197–204, IEEE, 1995.

14. Hu, H., Wang, G., Zhang, Q., Wang, J., Fang, J. and Zhang, Y., Design wireless multi-sensor fire detection and alarm system based on ARM. 2009, 9th International Conference on Electronic Measurement & Instruments, pp. 197–204, IEEE, 2009.

15. Peinl, P., Goleva, R., Ackoski, J., Advanced system for the prevention and early detection of forest fires (ASPires). Proceedings of the 35th Annual ACM Symposium on Applied Computing, pp. 1200–1203, 2020.

16. Kodali, R. K. and Valdas, A., MQTT Based Monitoring System for Urban Farmers Using ESP32 and Raspberry Pi. In 2018 Second International Conference on Green Computing and Internet of Things (ICGCIoT), pp. 395–398, IEEE, 2018.

17. Lipu, Molla Shahadat Hossain, Tahia Fahrin Karim, Md Lushanur Rahman, and Sultana, F., Wireless security control system & sensor network for smoke & fire detection. In 2010 IEEE International Conference on Advanced Management Science, IEEE, 3, pp. 153–157, 2010.

18. Luzuriaga, J.E., Cano, J.C., Calafate, C., Manzoni, P., Perez, M. and Boronat, P., Handling mobility in IoT applications using the MQTT protocol. 2015 Internet Technologies and Applications (ITA), pp. 245–250, IEEE, 2015.

19. Kodali, R.K. and Yerroju, S., IoT based smart emergency response system for fire hazards. 2017 3rd International Conference on Applied and Theoretical Computing and Communication Technology (iCATccT), Tumkur, pp. 194–199, 2017.

20. Kodali, R.K. and Valdas, A., MQTT Implementation of IoT based Fire Alarm Network. 2018 International Conference on Communication, Computing and Internet of Things (IC3IoT), Chennai, India, pp. 143–146, 2018.

21. Kang, D.H., Park, M.S., Kim, H.S., Kim, D.Y., Kim, S.H., Son, H.J. and Lee, S.G., Room Temperature Control and Fire Alarm/Suppression IoT Service Using MQTT on AWS. 2017 International Conference on Platform Technology and Service (PlatCon), Busan, pp. 1–5, 2017.

22. Mahgoub, Tarrad, N., Elsherif, R., Al-Ali, A., Ismail, L., IoT-Based Fire Alarm System. 2019 Third World Conference on Smart Trends in Systems Security and Sustainablity (WorldS4), London, United Kingdom, pp. 162–166, 2019.

23. Kodali, R.K. and Mahesh, K.S., A low cost implementation of MQTT using ESP8266. 2016 2nd International Conference on Contemporary Computing and Informatics (IC3I), Noida, pp. 404–408, 2016.

24. Kurniawan, D.E., Iqbal, M., Friadi, J., Borman, R.I. and Rinaldi, R., Smart Monitoring Temperature and Humidity of the Room Server Using Raspberry Pi and Whatsapp Notifications. In Journal of Physics: Conference Series, IOP Publishing, 1351, 1, 2019.

25. Cheng, Y., Mou, C., Chen, K., Bai, H., Liu, Y., Zhang, Y., Experimental Study on Fire Extinguishing Effect of Water-based Fixed Fire Extinguishing System in full-Scale Bus Cabin. 2019 9th International Conference on Fire Science and Fire Protection Engineering (ICFSFPE), Chengdu, China, pp. 1–6, 2019.

26. Jun, W., Di, Z., Meng, L., Fang, X., Hu-Lin, S., Shu-Feng, Y., Discussion of Society Fire-Fighting Safety Management Internet of Things Technology System. 2014 Fifth International Conference on Intelligent Systems Design and Engineering Applications, Hunan, pp. 422–425, 2014.

27. Vijayalakshmi, S.R. and Muruganand, S., A survey of Internet of Things in fire detection and fire industries. 2017 International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), Palladam, pp. 703–707, 2017.

28. Li, T. and Hou, P., Application of NB-IoT in Intelligent Fire Protection System. 2019 International Conference on Virtual Reality and Intelligent Systems (ICVRIS), Jishou, China, pp. 203–206, 2019.

29. Prabha, B., An IoT Based Efficient Fire Supervision Monitoring and Alerting System. 2019 Third International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), Palladam, India, pp. 414–419, 2019.

30. Jesus Zepeda, Digital Alarm Communicator/Transmitter DACT-UD2, https://www.academia.edu/36459184/Digital_Alarm_Communicator_Transmitter_DACT_UD2, 2008.

31. Arduino Team, Control your Internet of Things projects from anywhere with the new Arduino IoT Cloud Remote app, https://blog.arduino.cc/2020/07/22/control-your-internet-of-things-projects-from-anywhere-with-the-new-arduino-iot-cloud-remote-app/,2020.

32. Upadhyay, Y., Borole, A., Dileepan, D., MQTT based secured home automation system. Symposium on Colossal Data Analysis and Networking (CDAN), pp. 1–4, IEEE, 2016.

33. Michael Garcia, MQTT Broker design assembled on Amazon Web Services (AWS), https://aws.amazon.com/blogs/iot/how-to-bridge-mosquitto-mqtt-broker-to-aws-iot/, 2020.

  1. *Corresponding author: [email protected]
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.185.123