Keywords

1 Introduction

In Bangladesh economy, ready-made garments (RMG) industry has acquired a substantial facet in comparison with any other sectors for foreign exchange earnings and growth. According to the world trade organization (WTO), Bangladesh is the second-largest apparel supplier that holds 6.5% market share in the world in 2017 [1]. In every year, nearly about $5 billion earned from this sector which is around two-third of total exports. Around 2,500 garment factories are in Bangladesh, on which ten million livelihoods are indirectly or directly depend on it [2]. This sector also participates significant contribution in exporting which is almost 80% of total export of country [3]. Unfortunately, nowadays, this sector is under threat because of security risk of garment factories.

The best precedent is Tazreen Garment’s fire, which is the deadliest fire incident in the country’s history. It was November 24, 2012, a tragic fire incident was experienced by Tazreen Garment’s Factory, where 117 people were dead [4]. On December 14, 2010, in Ashulia, Dhaka, “That’s It Sportswear Ltd” garment factory was affected by fire where at least 28 more people had died, and also huge number of workers was grimly injured. Again at the “Garib and Garib” factory, situated at Dhaka, 21 peoples lost their lives in the deadly fire broke out [5]. In garment industry, the pollution level is increased along with the advent of the technology. There are many reasons for pollution: intense sound, temperature and humidity. It can cause hearing problem, heat illness, fatigue, heatstroke and cold-related medical conditions. So, we need to maintain a reasonable range of sound, temperature and humidity to control the pollution level. Consequently, worker feels less comfort to work. Therefore, these terrible incidents demonstrate that an early warning system is crying need to handle the risky situation in the garment factory.

Our proposed system is assuring the early warning in a factory’s workplace. In this system, we used an intelligent algorithm to decide when to warn for fire breakout and gas leakage. If fire breakout and gas leakage are detected via flame and gas sensor, then their value sends to the controller office with snapshot of affected region and activates the buzzer in the office. The camera module is placed in the middle of the workplace and positioned at zero degree. If an incident is occurred, the system will start firing suppression system using uncovered water valve and also stop electricity and gas supplies. At the same time, GSM module sends the SMS to the owner and nearby fire service station for informing this incident. The system also collects the noise level using sound sensor and temperature and humidity level using humidity sensor to make the workplace comfortable for the workers. The main aim of this paper is to develop IoT-based smart early warning system in workplace. To the best of our knowledge, smart warning system in workplace is not implemented in Bangladesh yet. Moreover, operating the proposed system is more comfortable than other existing related systems.

2 Literature Review

The garment industry of Bangladesh is the largest manufacture sector which has a great impact on the socio-economic development of Bangladesh. Unfortunately, different types of sufferings in the workplace of factories are incredibly increasing nowadays that badly effects on this sector. At least 1,601 workers died in garment factories in last 2005–2016 where 280 workers in fire breakout, 1,221 in building collapse and 100 in gas leakage [6]. So, a smart warning system is essential to save valuable lives and growth of this sector.

Imteaj et al. [7] implemented a system for fire detection in workhouse using Raspberry Pi 3. They used gas and light intensity sensor to sense any indicators of fire and gas leakage. The system can extinguish fire breakout using water valves and can notify by SMS with location. But, they did not work on noise level also did not explain how to extinguish fire breakout. Moreover, Fuzi et al. [8] used Zigbee wireless module to sense signs of fire. The system composed of temperature sensor, Arduino Uno microcontroller, buzzer and operating software. To detect fire, they used only temperature sensor. Similarly, Islam et al. [9] also used Zigbee and localization technique to find the distance and position of fire which is cost expensive. Again, Sowah et al. [10] developed a system to sense fire using fuzzy logic in vehicle. They can put out fire breakout using air-conditioning system of vehicle.

For alerting an fire occurrence in any industrial premises, Sathishkumar [11] worked on automated fire voice alert system. They used automatic voice recorder to extinguish fire and GSM inside the system to send up-to-date information of surrounding area to the company’s IP. The Yu et al. [12] proposed video processing based on fire alarming system. To detect the possible fire breakout, they adopted smoke color and its spreading features. But, detection of fire via video processing is time consuming.

So, our motive is to design an intelligent and early warning system to detect the fire breakout, gas leakage and noise pollution in the worksite which has to overcome the defect observed in the earlier system.

3 System Description

3.1 System Architecture

The system we designed consists of IoT and wireless technology that equipped in a room to monitor symptom of fire, gas leakage and noise pollution. We use Raspberry Pi 3 as our main device and use a series of sensors and module which are flame sensors, gas sensors, sound sensors, humidity sensors, servo motor, GSM module, camera module, two-channel relay module and water valve. The flame sensor can detect the fire in particular place. The existence of gas is detected by gas sensor. The camera module is used for taking the snap of affected area with the help of servo motor. The sound sensor is used to detect the noise level of industry. The output of the flame sensor, gas sensor and sound sensor is a digital value. We use a converter to get the analog value from flame, gas and sound sensor.

Data transmits from sensors to cloud server and picture sends to email through 802.11n LAN wireless module which is built in Raspberry Pi 3. When the certain condition is true, then the relay module activates the alarm and uncovers the water valve. At the same time, GSM module notifies owner and nearby fire station by sending SMS after admin confirmation. To measure the level of noise pollution, we use sound sensor. Humidity sensor is used for measuring temperature and humidity of workplace. By these sensors, we can see the situation of pollution level by cloud. In the flow chart, flame sensor is denoted as F, and Gas sensor is denoted as G. To detect the fire breakout and gas leakage, we used four pairs of flame and gas sensors and also used a camera module which is embedded with servo motor for rotating 360°. Camera module is placed in the middle of the room. Initially, we set the direction of the camera module at 0°. If the value of F1 and G1 is true, then the camera rotates 45° angle with the help of servo motor and takes a snap of the first quadrant. Similarly, it rotates 135°, 225° and 315° angles for second, third and fourth quadrant, respectively, for taking a snap of these quadrant.

3.2 Blog Diagram and Flow Chart

After giving power supply, the Raspberry Pi 3 gets power, and the input–output port gets ready as shown in Fig. 1. Flame sensor, gas sensor, sound sensor and humidity sensor transmit data to Raspberry Pi 3, and camera module also sends snap through it. Raspberry Pi 3 used it’s built in 802.11n LAN wireless module for sending data and snapshot to the admin. When certain condition is satisfied, then buzzer is activated, and GSM module is used for sending SMS to owner and fire service. The implementation of our proposed system is followed by this flow chart which is shown in Fig. 2, and circuit diagram is shown in Fig. 3.

Fig. 1
figure 1

Block diagram of the proposed systems

Fig. 2
figure 2

Flowchart of the designed system

Fig. 3
figure 3

Circuit diagram

3.3 System Implementation

The code for total device is written in Python. Python program checked every part individually and set threshold value for flame sensor and MQ-5 sensor. If the threshold exceeded, then Raspberry Pi Infrared Camera Module takes snap of this. A sim is placed in GSM to communicate with administration and send location of specific affected area.

Each sensor is connected to Raspberry Pi 3. Where, Flame and MQ-5 sensors have four pins. We used ADS 1115 16-Bit I2C ADC module to get the analog value from sensors. The signal pin of flame is connected with ADC module pin A1, and MQ-5 is connected with ADC module pin A2. SCL and SDA pin of ADC module is connected to GPIO2 and GPIO3 of Raspberry Pi 3. DHT11 and RKI-3103 sound sensor has three pins. Where, signal pin of RKI-3103 sound sensor is connected with ADC module pin A0. Signal pin of DHT11 is connected with GPIO18 pin of Raspberry Pi 3. VCC and GND pins of all sensors are connected with 5 V and GND of Raspberry Pi 3. The servo motor and relay module have digital pin. Signal pin of relay is directly connected with pin GPIO22 and GPIO10 of Raspberry Pi 3. The signal pin of servo motor is connected with GPIO25 pin of Raspberry Pi 3. VCC and GND pin is connected with 5 V and GND of Raspberry Pi 3 in both sensors. The ribbon of camera module is connected to Raspberry Pi 3’s CSI camera port.

Then, we enable the camera module by raspi-config. A Python script is written to take snap when flame and gas are detected. A servo motor is used to rotate the camera. The servo motor and relay module have digital pin. Signal pin of relay is directly connected with pin GPIO22 and GPIO10 of Raspberry Pi 3. The signal pin of servo motor is connected with GPIO25 pin of Raspberry Pi 3. VCC and GND pin is connected with 5 V and GND of Raspberry Pi 3 in both sensors. We use SIM800 GSM/GPRS to send SMS. Where RX pin of SIM800 is connected to GPIO14 TX pin, and TX pin of SIM800 is connected to GPIO15 RX pin of Raspberry Pi 3. The ground pin of SIM800 and Raspberry Pi 3 is connected to each other. In our system, the Raspberry Pi 3 is connected with an external 5000 mAh power bank. A 2 A power supply adapter is used to operate SIM800 GSM/GPRS.

4 Experiments and Results

Flame sensor, gas sensor, camera module, sound and humidity sensor based on a smart warning system can measure symptom of fire breakout, gas leakage, pollution of noise, humidity and temperature level of workplace. The camera module takes the snap after satisfying required value of flame and gas sensor. A prototype of our proposed system is shown in Fig. 4. Humidity, sound, flame and gas sensor send data to the server through 802.11n LAN wireless module which has built in Raspberry Pi. At the server, the gas and flame sensors’ data are presented graphically in Figs. 5 and 6. Representation of noise level and temperature level is shown in Figs. 7 and 8. Camera module sends the snapshot of affected area through this module in admin’s email as shown in Fig. 9. Controller office checked it and activated the buzzer alarm, uncovered the water valve and shut off the power circuit if data is exceeded. The system also sends SMS to owner and nearest fire service station as shown in Fig. 10.

Fig. 4
figure 4

Prototype of our proposed system

Fig. 5
figure 5

Gas sensor’s data representation

Fig. 6
figure 6

Flame sensor’s data representation

Fig. 7
figure 7

Representation of noise level

Fig. 8
figure 8

Temperature representation

Fig. 9
figure 9

Email from Raspberry Pi

Fig. 10
figure 10

SMS alert

5 Conclusion

To provide the safety of workstation, traditional system is not sufficient and also has many limitations. This paper designed a smart warning system to monitor workstation efficiently and effectively. By investigating sensor data, our system gives the authentication of incident and warns at real time. Cloud server is used for presenting sensor data graphically and storing purpose. This is a remarkable idea in context of developing nations, particularly Bangladesh. The entire framework is cost effective than existing system. If our designed system can be successfully implemented in every factory, then it is expected that the damage of life and wealth because of the fire and gas accidents and noise pollution will minimize remarkably, and the nation’s economy won’t be faltered by such heartbreaking accidents. When data gets massive, some features like Hadoop HDFS, MapReduce are initiated to handle big data. So, our proposed system should integrate into every factory to change the current terrible situation of the workstation of Bangladesh.