Iot Based Coal Mine Safety Monitoring System: A Project Report

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 68

IOT BASED COAL MINE SAFETY

MONITORING SYSTEM

A PROJECT REPORT

Submitted by

ROHAN M 312319112006
SURYAHERAN J 312319112011

of
BACHELOR OF ENGINEERING

IN

INSTRUMENTATION AND CONTROL ENGINEERING

St. JOSEPH’S COLLEGE OF ENGINEERING


(An Autonomous Institution)

St. Joseph’s Groups of Institution

OMR, Chennai 600 119

ANNA UNIVERSITY: CHENNAI 600 025


April-2023
ANNA UNIVERSITY: CHENNAI 600 025

BONAFIDE CERTIFICATE

Certified that this project report “IOT BASED COAL MINE


SAFETY MONITORING SYSTEM” is the Bonafide work of
ROHAN M (312319112006) and SURYAHERAN J (312319112011)
who carried out theproject under my supervision.

SIGNATURE SIGNATURE

Dr.T.BABU,M.E., Ph.D, Dr.T.BABU,M.E., Ph.D,

HEAD OF THE DEPARTMENT SUPERVISOR

Department of Instrumentation and HEAD OF THE DEPARTMENT


Control Engineering Department of Instrumentation and
St.Joseph's College of Engineering, Control Engineering
OMR,Chennai- 600119.
St.Joseph's College of Engineering,
OMR,Chennai- 600119.

i
CERTIFICATE OF EVALUATION

COLLEGE NAME : St. .Joseph’s College of Engineering, Chennai-600 119.


BRANCH : B.E., ICE(Instrumentation and Control Engineering)
SEMESTER : VIII

S.NO NAME OF THE TITLE OF THE NAME OF THE


STUDENT PROJECT SUPERVISOR WITH
DESIGNATION

SURYAHERAN J
1 IOT BASED COAL Dr.T.BABU,Ph.D,
(312319112011) MINE SAFETY
HEAD OF THE
MONITORING AND
ALERTING SYSTEM DEPARTMENT
2 ROHAN M
(312319112006)

The report of the project work submitted by the above student in partial
fulfillment for the award of Bachelor of Engineering Degree in Electronics and
Instrumentation Engineering of Anna University was confirmed to be report of the
work done by theabove student and then evaluated.

Submitted to Project and Viva Examination held on

INTERNAL EXAMINER EXTERNAL EXAMINER

ii
ACKNOWLEDGEMENT

At the outset we would like to express my sincere gratitude to our


beloved Chairman, Dr.Babu Manoharan, M.A.,M.B.A., Ph.D., for
his constant guidance and support.

We would like to express our heartfelt thanks to our respected


Managing Director Mrs. S. Jessie Priya, M.Com., for his kind
encouragement and blessings.

We wish to express our sincere thanks to Executive Director Mr.


B. Shashi Sekar, M.Sc., for providing ample facilities in the institution.

We express deepest gratitude and thanks to our beloved Principal


Dr.Vaddi Seshagiri Rao, M.E., M.B.A., Ph.D., F.I.E., for his
inspirational ideas during the course of the project.

It is with deep sense of gratitude that we acknowledge our


indebtness to our supervisor and Head of the Department Dr.T.BABU.,
Ph.D., for his expert guidance and connoisseur suggestion.

iii
TABLE OF CONTENTS
CHAPTER TITLE PAGE NO.
NO.
ABSTRACT Vii

LIST OF FIGURES Viii

1 INTRODUCTION 1

1.1 Scope on Coal Mine Safety Monitoring 1

1.2 Objectives 1

1.3 Existing System 2

1.4 Proposed System 2

2 LITERATURE SURVEY 3

3 PROJECT DESCRIPTION 14

3.1 Methodology 14

3.2 Working 14

3.3 Block Diagram 15

4 HARDWARE DESCRIPTION 17

4.1 Node Mcu 17

4.1.1 GPIO Pins 19

4.1.2 Node Mcu GPIOs 20

4.1.3 ESP-12E Chip 21

4.1.4 Peripherals and I/O 23

4.1.5 Multiplexed I/Os 24

4.1.6 On-board Switches and LED Indicator 24

4.1.7 Switches & Indicator 24


iv
4.1.8 Serial Communication 25

4.1.9 ESP8266 Node Mcu Pinout 26

4.1.10 ESP8266 Development plateforms 28

4.1.11 Installation process 29

4.1.11.1 Arduino Example 30

4.1.11.2 Warning about Installation 32

4.1.12 ESP8266 Features 33

4.1.13 Applications 33

4.2 Gas Sensor 34

4.2.1 Applications 34

4.2.2 Features 34

4.3 DHT11 sensor 35

4.3.1 Working 35

4.3.2 Humidity(DHT11) 36

4.3.3 Communication process 37

4.3.4 DHT11 vs DHT22 39

4.3.5 Features 39

4.3.6 Applications 40

4.4 LoRa 41

4.4.1 Specifications 42

4.5 Fire Sensor 43

4.5.1 Working Principle 44

v
5 SOFTWARE DESCRIPTION 46

5.1 Arduino IDE 46

5.1.1 File 46

5.1.2 Tools 50

5.1.3 Tabs, Multiple Files and Compilation 51

5.1.4 Uploading 51

5.1.5 Arduino Libraries 52

5.1.6 Serial Monitor 53

5.1.7 Preferences 53

5.1.8 Boards 55

6 CONCLUSION 56

6.1 Conclusion 56
6.2 Future Work 56
REFERENCES 57

vi
ABSTRACT

Coal mines and coal-preparation plants have caused much environmental


damage and also cause health issues to the workers and miners in the
plant. If there any Hazardous incident to avoid this in advance we use this
device to predict and monitoring purposes. In this project, a data
transmission method called ThingSpeak is used to construct a coal mine
safety system. The system is used to monitor and regulate a number of
characteristics in coal mines, including light detection, gas leak
detection, temperature and humidity conditions, and coal mine fire
detection. These sensors are all installed in coal mines and are
regarded as a single unit. For analysis, all sensor values are continuously
uploaded to ThingSpeak. Here, the gas is continuously monitored, and
if there are any changes in the level of gas, a buzzer is utilised to
notify the staff. The LoRa is used in this system to Transmit the data
from the field to control room.. An alert notification is delivered to the
designated person's mailbox in the event that a coal mine fire occurs. The
serial monitor and the Thingspeak platform both continuously monitor
and show temperature and humidity measurements. The created
technology is primarily used to enhance worker safety and the working
environment in coal mines.

vii
LIST OF FIGURES

FIGURE NAME OF THE FIGURE PAGE


NO NO

3.1 Block Diagram 16

4.1 Node Mcu 17

4.2 ESP8266 Module 19

4.3 GPIO Pins 20

4.4 ESP-12E Chip 22

4.5 ESP External Components 23

4.6 Multiplexed GPIO 24

4.7 ESP-Buttons 25

4.8 ESP-Serial Communication 25

4.9 ESP8266- Pinout 26

4.10 ESP8266 Installation 29

4.11 Board Manager 30

4.12 Module Selection in Arduino Software 31

4.13 Tools Port of Arduino Software 32

4.14 Gas Sensor 34

4.15 DHT11 Sensor 35

4.16 Communication process Graph 36

viii
4.17 Start Pulse 37

4.18 Response Pulse 37

4.19 End of Frame 39

4.20 DHT11 vs DHT22 40

4.21 LORA 41

4.22 Fire Sensor 43

4.23 Fire Sensor Module 44

5.1 Arduino IDE preference 54

ix
CHAPTER 1

INTRODUCTION
1.1 Scope on Coal Mine Safety Monitoring
Overall, the scope of an IoT-based coal mine safety monitoring and alerting
system is quite extensive, and it has the potential to greatly improve the safety
of workers and reduce the risks associated with coal mining. By incorporating
advanced features such as real-time monitoring and alert mechanisms, these
systems can provide mine managers with a comprehensive and convenient
solution for improving the safety of their workers and operations.

1.2 Objectives
Coal mines are one of the most important and industries in the country, as they
are used as fuel in the steel and cement industries to extract iron from the stone
and create cement. To address this issue, there is a system that monitors basic
safety measures and regulates many restrictions on coal mines, such as gas
leaks, temperature and humidity conditions, and fire sensor. All the sensors are
assembled into a single unit and then placed in a coal mine.Internet of Things
(IoT) is nothing but the devices(things) communicating with each other by
using the internet . IoT applications vary on a large scale. European Research
Cluster on the Internet of Things classifies major IoT applications as smart
buildings, smart transportation, Smart energy, smart industry, smart health and
the smart city as major areas. IoT is a trend-setting innovation in which all the
data from sensors is stored in the cloud where it can be easily accessed from the
cloud. Sensors and actuators for gathering the data and sending across the
internet are also included in this advancement. We use cloud not only to store
data but also for data analysis, gathering, visualization. Such an emerging
technology can be used in various IoT applications like agriculture, health,
smart home etc, to make the already existing systems more efficient. The key

1
characteristics of the cloud include on-demand service provision, ubiquitous
access, resource pooling and, elasticity.

1.3 Existing System


In existing system Node MCU is used as controller and all sensors are
interfaced to it . There are these same sensors interfaced to node mcu and the
data is monitored using on premises data monitoring systems.

1.4 Proposed System


The gas sensor modules, temperature sensor, and fire sensor are fixed in this
proposed system for the coal mine safety systems. We connect Arduino to every
sensor. To begin, we must register for a Thingspeak account. We primarily use
monitoring and controlling systems in this system to keep track of all the data
coming from various sensors. Gas is detected by a gas sensor in the coal mine
environment; if the level of gas exceeds the normal threshold, the buzzer
activates to alert the mine personnel. Continuous uploads o f these sensor values
are made to the cloud (Thingspeak.io) for analysis and other purposes. Inside
the coalmine, the temperature and humidity levels are also measured. Anytime a
fire mishap happens, emails with fire alert messages are sent to the appropriate
people and the location's link is spread. Using the Thingspeak platform, the
controlling system has been completed. Internet of Things (IoT) is nothing but
the devices(things) communicating with each other by using the internet . IoT
applications vary on a large scale. IoT is a trend-setting innovation in which all
the data from sensors is stored in the cloud where it can be easily accessed from
the cloud. Sensors and actuators for gathering the data and sending across the
internet are also included in this advancement. We use cloud not only to store
data but also for data analysis, gathering, visualization. Such an emerging
technology can be used in various IoT applications like agriculture, health,
smart home to make the already existing systems more efficient.

2
CHAPTER 2
LITERATURE SURVEY
Literature Survey 1
Title An Optimized Multisource Bilinear Convolutional Neural Network
Model for Flame Image Identification of Coal Mine
Authors LI ZHANG1 , YUQIN ZHU1 , HAO WU2 , AND KUN LI
Published Year 2022
Drawbacks
 Complexity of its Real Time Implementation
 High complexity of installing and maintaining
Description
Underground fire monitoring is an important tool to improve coal mine
production safety. In this paper, a multi-source information identification
method based on bilinear convolutional neural network (BCNN) is proposed,
which consists of construction of multi-source image acquisition system, B-
CNN and integrated decision making based on multi-source B-CNN. Aiming at
the problem that Softmax loss function based on the gradient descent in B-CNN
is easy falling into the local optimum, an improved Grasshopper Optimization
Algorithm (GOA) is proposed to optimally selected two parameters of W and θ;
the method of initial solution generation based on sine mapping and the method
of accepting bad solution with certain probability are respectively adopted. In
order to solve high computational complexity in the stage of model training and
integrated recognition by multi-source B-CNN, an image feature preprocessing
method is proposed in this paper. Several feature vectors of color feature, shape
feature and texture feature of the collected image are extracted and used as input
vectors of B-CNN to complete model training and integrated recognition. In
simulation experiments, firstly, four Benchmark functions are used to verify the
performance of the improved GOA; then, by scaling, expanding and rotating the

3
image to simulate the results of image acquisition at multiple positions and
angles, different information sources can be formed to complete the integrated
recognition by B-CNN. Three performance indexes of Accuracy, Precision and
Recall are used to evaluate the simulation result of different comparative
models, which show that the proposed method has better recognition effects.

Literature Survey 2
Title Real Time Monitoring &AnalyzationOf Hazardous Parameters In
Underground Coal Mines Using Intelligent Helmet System
Authors Akshunya Mishra, Saksham Malhotra, Ruchira, Pallavichoudekar,
H.P.Singh
Published Year 2018
Drawbacks
 More expensive
 This system is Opportunistic and uncontrollable
Description
Coal mining has always been a necessary evil. We need the coal for various
operations, especially electrical power generation. However mining the coal has
proven to be very dangerous and has caused many accidental deaths over the
years. Keeping this in mind we have designed an intelligent system which can
be used on helmets of these underground coal miners and can monitor/analyze a
few major hazardous parameters found in these mines in real time. This
includes humidity, temperature and gas contents such as methane and sulfur
dioxide. These parameters, if above a certain level, can cause choking,
suffocation, flooding, gas poisoning, roof collapse or explosions. Our system
can detect these parameters, analyze them in real time and alert the ground
control and the worker about the situation using a buzzer. Compact sensors and
radio frequency modules are used to ensure practicality.

4
Literature Survey 3
Title Key technologies of data monitoring for coal machinery equipment in the
intelligent IOT environment
Authors Juanli Li* ,Menghui Li, Fangyuan Yan and Dong MiaoPublished
Year 2021
Drawbacks
 Generally have high polynomial running times.
 Cannot meet current network business demands
Description
Coal machinery equipment plays an important role in the process of coal
mining. It is of great significance for its safe, stable, reliable and healthy
operation to carry out the research on data monitoring methods of coal
machinery equipment. Aiming at the problems of repeated construction of
monitoring and diagnosis system of coal machine equipment, serious
“information island” phenomenon and poor expansion of transmission network,
this study puts forward the data monitoring method of coal machine equipment
based on the perception of Internet of Things (IoT) , and focuses on the key
technologies of data acquisition, data transmission, data processing and
application of coal machine equipment, and establishes the overall structure of
coal machinery equipment monitoring based on IoT. In the sensing layer, a
cooperative information acquisition system for key components of coal
machinery equipment based on Node Mcu short-distance wireless
communication technology is designed to realize real-time data acquisition. In
the network layer, a long-distance wireless data transmission and reception
platform based on 4G technology is established, and Message Queuing
Telemetry Transport (MQTT) communication protocol is used to send the data
to the cloud, the interface is reserved for future communication technology, the
real-time transmission and storage of data are realized. In the middleware layer,
the processing methods of heterogeneous data are proposed, and the

5
preprocessing technology of big data is studied to realize data sharing. In the
application layer, the application direction of coal machine equipment data
monitoring is proposed. Based on the interactive technology, a humanized and
visual fault monitoring and diagnosis platform is established, which verifies the
above theories and methods. This study not only realizes the effective
monitoring of coal machine equipment data, but also promotes the sharing of
coal machine information, which provides a new idea for the construction of
intelligent mine.

Literature Survey 4
Title IOT based Coal Mine Safety Monitoring And Alerting System
Authors Manohara K M, NayanChandan D C, Pooja S V, Sonika P,
Ravikumar K I
Published Year 2020
Drawbacks
 Tracking of all object will take times
 Tracking of objects is low
Description
Coal mines are one of the most important and industries in the country, as they
are used as fuel in the steel and cement industries to extract iron from the stone
and create cement. Every parameter, such as methane gas, high temperature, fire
incidents, etc., should be regularly checked in the underground mining business.
Due to the complexity of the mining environment and the variety of activities
performed in coal mines, it is important to monitor the working environment.
To address this issue, there is a system that monitors basic safety measures and
regulates many restrictions on coal mines, such as gas leaks, temperature and
humidity conditions, and fire sensor.

6
Literature Survey 5
Title Coal Mine Safety Intelligent Monitoring based on Wireless Sensor
Network
Authors XUAN LIU 1 , CHENFENG ZHANG 1 , YINGZHI WANG1 ,
KAI DING1 , TAILIN HAN
Published Year 2020
Drawbacks
 No analysis
 Process is very slow
Description
Wireless Sensor Network (WSN) explores the use of the latest WSN technology
in coal mine safety intelligent wireless monitoring, especially the three key
technologies that need to solve the WSN wireless communication, transmission
routing protocol and positioning algorithm for underground safety monitoring.
The application of wireless sensor network in coal mine safety intelligent
monitoring system is proposed, this paper discusses the principle and
advantages of wireless sensor network and the design basis of wireless sensor
network in intelligent monitoring system of coal mine safety. Based on the
current situation and existing problems of the low level of intelligence of coal
mine safety monitoring system, the design scheme and monitoring mechanism
of coal mine safety intelligent monitoring system are proposed, and the
feasibility of wireless sensor network in the application of coal mine safety
intelligent monitoring system is discussed. Finally, the gateway proposed in this
research was tested by laboratory simulation, and the results showed that the
gateway designed in this research

7
Literature Survey 6
Title Methods for Monitoring Fast and Large Gradient Subsidence in Coal
Mining Areas Using SAR Images: A Review
Authors BAILIN HU 1,2, LEI CHEN3 , YOUFENG ZOU1 , XUEXIAO
WU 2 , (Associate Member, IEEE), AND PROSPER WASHAYA4
Published Year 2021
Drawbacks
 No analysis
 Process is very slow
Description
Ground subsidence caused by coal mining may lead to serious damage to
ecological environment system and economic and social development. SAR
image interferometry technology has been widely used for monitoring coal
mining subsidence. However, at present monitoring fast and large subsidence
using SAR images is still a huge challenge. In order to obtain fast and large
gradient subsidence using SAR images, some scholars have resorted to other
methods and technology, which do not just depend on the interferograms, and
they have obtained better results. In summary, these methods and technology
can be grouped into three main categories: (i) Combining InSAR with coal
mining subsidence prediction models; (ii) Using SAR image amplitude
information offset tracking technology; (iii) Combining InSAR with terrestrial
3D laser scanning technology.

8
Literature Survey 7
TitleApplication of IPv6 in Coal Mine Safety Production Monitoring
Authors Liang Dan, Yao Jun
Published Year 2018

Drawbacks

 More costly
 Can lead to congested roads.
 Hardware debugging is the major problem

Description
The rise of internet and internet of things technology has brought new
opportunities for the construction of smart mines. This paper proposes a new
type of coal mine safety production monitoring system based on IPv6 network
transmission, aiming at the problems such as the transmission distance and the
small system capacity encountered in the existing coal mine safety production
monitoring system based on bus transmission. IPv6, as the core technology
adopted by the next-generation Internet, will be applied to the transmission of
coal mine safety monitoring systems, which can effectively realize underground
coal mine safety production monitoring and solve the problems encountered in
bus transmission. This paper proposes a coal mine safety production monitoring
system based on IPv6 network transmission. The system adopts 6LoWPAN
protocol, which mainly includes three parts: sensor, transmission network and
client.

9
Literature Survey 8
TitleUnderground Coal Fires Identification and Monitoring Using Time-Series
InSARWith Persistent and Distributed Scatterers: A Case Study of Miquan Coal
Fire Zone in Xinjiang, China
Authors JOSE-LUIS POZA-LUJAN 1 , (Member, IEEE), JUAN-JOSÉ
SÁENZ-PEÑAFIEL 2 , JUAN-LUIS POSADAS-YAGÜE 1 , J. ALBERTO
CONEJERO 3 , AND JUAN-CARLOS CANO
Published Year2019

Drawbacks
 Poor Application Performance
 Tedious message updating
Description
The Xinjiang is an important coal production base in China and also a serious
coal fire disaster area. Coal fires not only waste resources, but also cause air
pollution and damage to the ecological environment. Hence, it is very important
to identify and monitor the underground coal fire areas accurately and
efficiently for the control of coal fires. Interferometric synthetic aperture radar
(InSAR) technology identifies and monitors coal fire areas by monitoring
surface subsidence caused by burned out area. Compared with traditional coal
fire monitoring technology, InSAR technology has the advantages of allweather
and high efficiency. But the fire areas are often distributed in wild areas, this
factor significantly limits the application of the traditional Persistent Scatterer
interferometry (PSI) technology. In addition, Xinjiang coal fires are mostly
located in historical goafs, so it is necessary to distinguish the subsidence
caused by mining and coal fires. Therefore, distributed scatterer interferometry
(DSI) technology is used to monitor the Miquan fire area in Xinjiang in this
paper. The results show that compared with PSI technology, DSI technology

10
can expand the number of effective monitoring points 124 times. On this basis,
spatiotemporal analysis of surface subsidence in the study area suggests that the
subsidence caused by mining and coal fires exhibits significantly different
space-time evolution rules. Therefore, in the future, the coal fire area and
mining area can be separated and identified according to these rules. The final
identified coal fire area contains all measured coal fire points, and accurately
monitors the fire extinguishing area.

Literature Survey 9
Title Dynamic Monitoring of Mining Destruction on Coal Seam Floor With
Constrained Time-Lapse Resistivity Imaging Inversion
Authors HAIPING YANG 1 , SHENGDONG LIU1,2, AND CAI YANG
Published Year 2022
Drawbacks
 Solutions have been proved ineffective
 Complexity of its Real Time Implementation
Description
With the increase in coal mining depth, water hazards in deep, strong karst
aquifers have seriously threatened the safety of coal mine production. Dynamic
monitoring of floor damage during coal seam mining under complex conditions
is of great significance for the prediction of water inrush at the working face and
for improving coal mining methods. Based on parallel electrical monitoring
technology, a constrained time-lapse resistivity inversion method was adopted
to process the electrical data of the working face floor. The background
resistivity inversion results were used as an a priori model to act on the
inversion of subsequent monitoring resistivity data, and the subsequent
inversion results of resistivity were fed back to the prior model, which greatly

11
eliminated inversion artifacts. Finally, the dynamic change process of the
resistivity profile before and after the failure of the bottom floor of the mining
face was determined, and the maximum depth of the failure zone of the floor is
25m, which is located above the lower aquifer. The field monitoring data show
that compared with the method of directly comparing the differences between
consecutive monitoring images, the inversion profiles obtained by the
constrained time-lapse resistivity inversion method have clearer differences in
the spatial and temporal dimensions. The depth of the waterconducting damage
zone of the floor was clarified, and the basic development characteristic of the
floor damage zone of the working face was obtained, which has practical
application value for ensuring the safe mining of the working face.

Literature Survey 10
TitleResearch on the Processing of Coal Mine Water Source Data by
Optimizing BP Neural Network Algorithm With Sparrow Search Algorithm
Authors PENGCHENG YAN 1,2, SONGHANG SHANG 2 , CHAOYIN
ZHANG2 , NINI YIN1 , XIAOFEI ZHANG
Published Year 2021
Drawbacks
 Solutions have been proved ineffective
 Complexity of its Real Time Implementation
Description
Coal mine safety is crucial to the healthy and sustainable development of the
coal industry, and coal mine flood is a major hidden danger of coal mine
accidents. Therefore, the processing of coal mine water source data is of great
significance to prevent mine water inrush accidents. In this experiment, the
water source data were obtained by laser induced fluorescence technology with

12
the assistance of laser. The water sample data information was preprocessed by
standard normal variable transformation (SNV) and multiple scattering
correction (MSC), and then the principal component analysis (PCA) was used to
reduce the dimension of the data and ensure the information characteristics of
the original data unchanged. In order to identify the water inrush type of coal
mine water source, the sparrow search algorithm (SSA) is used to optimize the
BP neural network in this study. This is because the SSA algorithm has the
advantages of strong optimization ability and fast convergence rate compared
with particle swarm optimization (PSO) and other optimization algorithms.

13
CHAPTER 3
PROJECT DESCRIPTION

3.1 Methodology
Traditional monitoring systems in coal mines are difficult to
install, hazardous, and difficult to power. Because of the complexity of the
mining environment and the wide range of operations performed in coal mines,
it is vital to monitor and maintain the parameters in the background t increase
the efficiency and safety of mineworkers. As a result, traditional monitoring
methods cannot be relied on to ensure coal workers'safety. In this project we
have two nodes i.e transmission node and monitoring node . In transmission
node arduino is used to collect the data from sensors.The data collected through
sensors will be sent to monitoring node through LoRa transmitter.At the
transmitter node , we have LoRa receiver which will accept the data from lora
transmitter , and this data will be sent to cloud using Node MCU controller
which comes with an inbuilt wifi module i.e ESP8266 wifi chip.The Arduino
microcontroller is used to detect and monitor variables in a coal mine. Live
readings are provided by the temperature sensor, humidity sensor, Fire sensor,
and gas sensor. A microcontroller and a transceiver are connected to all of these
sensors. The data is sent to the microcontroller, and communication between the
gateway and the specific node.

3.2 Working
Arduino Uno is the central component, and it sends the information on the
internet via the Node Mcu module. DC power supply is used for supplying
voltage to the circuit. This is the circuit diagram for the smart helmet's
monitoring and alerting system. This system will be built using Arduino, Node

14
Mcu modules, and sensors such as the DTH11 humidity sensor and the IR flame
sensor, among others. The sensors we'll use will detect changes in the coal
miner's environment, and variables like temperature, gas concentration, and fire
detection will be continuously monitored. It will also have an extension that will
connect to an Thing Speak, which will be placed at the entrance to the coal
minefield. Also, the data which will be recorded by sensors will be transmitted
via the Node Mcu module to the control room so that proper actions can be
taken effectively in minimum time. Fig.4 shows the representation of the circuit
diagram designed. A push-button, a buzzer, and a Node Mcu transmitter will be
included in another safety device, the smart helmet. If any worker becomes
uneasy or requires medical attention at any time, that worker can use the push
button to activate the buzzer and send an emergency message to the control
room via Node Mcu.

3.3 Block Daigram


This Block diagram is of a prototype that includes some
sensors that would be needed in a coalfield and are connected to a
microcontroller to detect environmental conditions. The Arduino Uno
microcontroller was used and connected to LoRa Fig. 3.1: Block Diagram Of
Coal Mine Safety And Monitoring System. (Temperature sensor) DHT11
(Humidity sensor), Mq5 (Gas sensor) and an Fire sensor. With the help of these
sensors, continuous readings of temperature, humidity, and gases present in the
coalfield can be taken, as well as air density, and we've programmed the
Arduino board in such a way that any abnormality in the parameters as
mentioned above will trigger an alert. IoT concepts and sensors are used to
create a small, effective, and cost-efficient prototype. The temperature was
successfully measured using DHT11 sensors during the testing phase, and the
output was satisfactory.

15
The DHT11 sensor was also used to monitor humidity accurately. The MQ2 gas
sensor detected gas concentrations in the area and successfully displayed a
warning message on the screen. The IR flame sensor also detected fire and
displayed an alert message informing the user of its presence. For wireless
communication, the Node Mcu Protocol was developed and tested in
variouslocations and distances. Wireless communication was functional, and
Node Mcu delivered the best results and was fully functional.

DH11

LoRa THING
Gas
TX SPEAK
Sens
or ARDUINO
NODE
UNO
MCU

LoRa Fire
RX Sensor

Figure 3.1 Block diagram

16
CHAPTER 4
HARDWARE DESCRIPTION
4.1 Node Mcu

General-purpose input/output (GPIO) is a pin on an IC (Integrated Circuit). It


can be either input pin or output pin, whose behaviour can be controlled at the
run time.

Figure 4.1 Node Mcu


The ESP8266s is a very user friendly and low cost device
to provide internet connectivity to your projects. The module can work both
as a Access point (can create hotspot) and as a station (can connect to Wi-Fi),
hence it can easily fetch data and upload it to the internet making Internet of
Things as easy as possible. It can also fetch data from internet using API’s
hence your project could access any information that is available in the

17
internet, thus making it smarter. Another exciting feature of this module is
that it can be programmed using the Arduino IDE which makes it a lot more
user friendly. However this version of the module has only 2 GPIO pins (you
can hack it to use upto 4) so you have to use it along with another
microcontroller like Arduino, else you can look onto the more standalone
ESP-12 or ESP-32 versions. So if you are looking for a module to get started
with IOT or to provide internet connectivity to your project then this module
is the right choice for you.

There are so many methods and IDEs available to with ESP


modules, but the most commonly used on is the Arduino IDE. So let us
discuss only about that further below. The ESP8266s module works with
3.3V only, anything more than 3.7V would kill the module hence be cautions
with your circuits. The best way to program an ESP-01 is by using the FTDI
board that supports 3.3V programming. If you don’t have one it is
recommended to buy one or for time being you can also use an Arduino
board. One commonly problem that every one faces with ESP-01 is the
powering up problem. The module is a bit power hungry while programming
and hence you can power it with a 3.3V pin on Arduino or just use a potential
divider. So it is important to make a small voltage regulator for 3.31v that
could supply a minimum of 500mA. One recommended regulator is the
LM317 which could handle the job easily. A simplified circuit diagram for
using the ESP8266s-01 module is given below.

18
Figure 4.2 ESP8266 Module

The switch SW2 (Programming Switch) should be held pressed to hold the
GPIO-0 pin to ground. This way we can enter into the programming mode and
upload the code. Once the code is released the switch can be released.

4.1.1 GPIO PINS:

NodeMCU Development kit provides access to these GPIOs of ESP8266s. The


only thing to take care is that NodeMCU Dev kit pins are numbered differently
than internal GPIO notations of ESP8266s as shown in below figure and table.
For example, the D0 pin on the NodeMCU Dev kit is mapped to the internal
GPIO pin 16 of ESP8266s.The Internet of Things (IoT) has been a trending
field in the world of technology. It as changed the way we

19
work. Physical objects and the digital world are connected now more than ever.
Keeping this in mind, Expressive Systems (A Shanghai-based Semiconductor
Company) has released an adorable, bite-sized Wi-Fi enabled microcontroller –
ESP8266s, it can monitor and control things from anywhere in the world

Figure 4.3 GPIO Pins

4.1.2 NodeMCU GPIOs

The GPIO’s shown in blue box (1, 3, 9, 10) are mostly not used for GPIO
purpose on Dev Kit.ESP8266S is a system on a chip (SoC) design with
components like the processor chip. The processor has around 16 GPIO lines,

20
some of which are used internally to interface with other components of the
SoC, like flash memory.Since several lines are used internally within the
ESP8266SSoC, we have about 11 GPIO pins remaining for GPIO purpose.

Now again 2 pins out of 11 are generally reserved for RX and TX in order to
communicate with a host PC from which compiled object code is
downloaded.Hence finally, this leaves just 9 general purpose I/O pins i.e. D0 to
D8.As shown in above figure of NodeMCU Dev Kit. We can see RX, TX, SD2,
SD3 pins are not mostly used as GPIOs since they are used for other internal
process. But we can try with SD3 (D12) pin which mostly like to respond for
GPIO/PWM/interrupt like functions.Note that D0/GPIO16 pin can be only used
as GPIO read/write, no special functions are supported on it.ESP-12E
ModuleThe development board equips the ESP-12E module containing
ESP8266S chip having TensilicaXtensa® 32-bit LX106 RISC
microprocessor which operates at 80 to 160 MHz adjustable clock frequency
and supports RTOS.

4.1.3 ESP-12E Chip

 TensilicaXtensa® 32-bit LX106


 80 to 160 MHz Clock Freq.
 128kB internal RAM
 4MB external flash
 802.11b/g/n Wi-Fi transceiver 

21
Figure 4.4 ESP-12E Chip

There’s also 128 KB RAM and 4MB of Flash memory (for program and data
storage) just enough to cope with the large strings that make up web pages,
JSON/XML data, and everything we throw at IoT devices nowadays.

The ESP8266S Integrates 802.11b/g/n HT40 Wi-Fi transceiver, so it can not


only connect to a WiFi network and interact with the Internet, but it can also set
up a network of its own, allowing other devices to connect directly to it. This
makes the ESP8266SNodeMCU even more versatilePower RequirementAs the
operating voltage range of ESP8266S is 3V to 3.6V, the board comes with a
LDO voltage regulator to keep the voltage steady at 3.3V. It can reliably supply
up to 600mA, which should be more than enough when ESP8266S pulls as
much as 80mA during RF transmissions. The output of the regulator is also
broken out to one of the sides of the board and labeled as 3V3. This pin can be
used to supply power to external components.

 Operating Voltage: 2.5V to 3.6V


 On-board 3.3V 600mA regulator 
 80mA Operating Current
 20 µA during Sleep Mode

22
Figure 4.5 ESP-External components

Power to the ESP8266SNodeMCUis supplied via the on-board MicroB USB


connector. Alternatively, if you have a regulated 5V voltage source, the VIN
pin can be used to directly supply the ESP8266S and its peripherals.The
ESP8266S requires a 3.3V power supply and 3.3V logic levels for
communication. The GPIO pins are not 5V-tolerant! If you want to interface the
board with 5V (or higher) components, you’ll need to do some level shifting.

4.1.4 Peripherals and I/O


 ADC channel – A 10-bit ADC channel.
 UART interface – UART interface is used to load code serially.
 PWM outputs – PWM pins for dimming LEDs or controlling motors.SPI,
I2C & I2S interface – SPI and I2C interface to hook up all sorts of
sensors and peripherals.
 I2S interface – I2S interface if you want to add sound to your project.

23
4.1.5 Multiplexed I/Os
 2 UART interfaces
 4 PWM outputs
 SPI, I2C & I2S interface

Figure 4.6 ESP Multiplexed GPIO


The ESP8266S’s pin multiplexing feature (Multiple peripherals multiplexed on
a single GPIO pin). Meaning a single GPIO pin can act as PWM/UART/SPI.

4.1.6 On-board Switches & LED Indicator


The ESP8266SNodeMCU features two buttons. One marked as RST located on
the top left corner is the Reset button, used of course to reset the ESP8266S
chip. The other FLASH button on the bottom left corner is the download button
used while upgrading firmware.

4.1.7 Switches & Indicators


 RST – Reset the ESP8266S chip
 FLASH – Download new programs
 Blue LED – User Programmable

24
The board also has a LED indicator which is user programmable and is
connected to the D0 pin of the board.

Figure 4.7 ESP-Buttons


4.1.8 Serial Communication
The board includes CP2102 USB-to-UART Bridge Controller from Silicon
Labs, which converts USB signal to serial and allows your computer to program
and communicate with the ESP8266S chip.
 CP2102 USB-to-UART converter
 4.5 Mbps communication speed
 Flow Control support

Figure 4.8 ESP-Serial Communication

25
4.1.9 ESP8266 NodeMCU Pinout
The ESP8266 NodeMCU has total 30 pins that interface it to the outside world.
The connections are as follows:

Figure 4.9 ESP8266- Pinout

Power Pins
There are four power pins viz. one VIN pin & three 3.3V pins. The VIN pin can
be used to directly supply the ESP8266S and its peripherals, if you have a
regulated 5V voltage source. The 3.3V pins are the output of an on-board
voltage regulator. These pins can be used to supply power to external
components.
GND
GNDis a ground pin of ESP8266SNodeMCU development board.

26
I2C Pins
I2C Pins are used to hook up all sorts of I2C sensors and peripherals in your
project. Both I2C Master and I2C Slave are supported. I2C interface
functionality can be realized programmatically, and the clock frequency is 100
kHz at a maximum. It should be noted that I2C clock frequency should be
higher than the slowest clock frequency of the slave device.
GPIO Pins
ESP8266SNodeMCU has 17 GPIO pins which can be assigned to various
functions such as I2C, I2S, UART, PWM, IR Remote Control, LED Light and
Button programmatically. Each digital enabled GPIO can be configured to
internal pull-up or pull-down, or set to high impedance. When configured as an
input, it can also be set to edge-trigger or level-trigger to generate CPU
interrupts.
ADC Channel
The NodeMCU is embedded with a 10-bit precision SAR ADC. The two
functions can be implemented using ADC viz. Testing power supply voltage of
VDD3P3 pin and testing input voltage of TOUT pin. However, they cannot be
implemented at the same time.
UART Pins
ESP8266SNodeMCU has 2 UART interfaces, i.e. UART0 and UART1, which
provide asynchronous communication (RS232 and RS485), and can
communicate at up to 4.5 Mbps. UART0 (TXD0, RXD0, RST0 & CTS0 pins)
can be used for communication. It supports fluid control. However, UART1
(TXD1 pin) features only data transmit signal so, it is usually used for printing
log.

SPI Pins
ESP8266S features two SPIs (SPI and HSPI) in slave and master modes. These
SPIs also support the following general-purpose SPI features:

27
 4 timing modes of the SPI format transfer
 Up to 80 MHz and the divided clocks of 80 MHz
 Up to 64-Byte FIFO

SDIO Pins
ESP8266S features Secure Digital Input/Output Interface (SDIO) which is used
to directly interface SD cards. 4-bit 25 MHz SDIO v1.1 and 4-bit 50 MHz SDIO
v2.0 are supported.
PWM Pins
The board has 4 channels of Pulse Width Modulation (PWM). The PWM output
can be implemented programmatically and used for driving digital motors and
LEDs. PWM frequency range is adjustable from 1000 μs to 10000 μs, i.e.,
between 100 Hz and 1 kHz.

4.1.10 ESP8266S Development Platforms


There are a variety of development platforms that can be equipped to program
the ESP8266S. You can go with Espruino – JavaScript SDK and firmware
closely emulating Node.js, or use Mongoose OS – An operating system for IoT
devices (recommended platform by Espressif Systems and Google Cloud IoT)
or use a software development kit (SDK) provided by Espressif or one of the
platforms listed on WiKiPedia.Fortunately, the amazing ESP8266S community
took the IDE selection a step further by creating an Arduino add-on. If you’re
just getting started programming the ESP8266S, this is the environment we
recommend beginning with, and the one we’ll document in this tutorial.This
ESP8266S add-on for Arduino is based on the amazing work by Ivan
Grokhotkov and the rest of the ESP8266S community.

28
4.1.11 Installing the ESP8266 Core on Windows OS
Let’s proceed with installing ESP8266S Arduino core.
The first thing is having (Arduino 1.6.4 or higher) installed on your PC. If don’t
have it, we recommend upgrading now.To begin, we’ll need to update the board
manager with a custom URL. Open up Arduino IDE and go to File >
Preferences. Then, copy below URL into the Additional Board Manager URLs
text box situated on the bottom of the window:
http://arduino.ESP8266S.com/stable/package_ESP8266Scom_index.json

Figure 4.10 ESP8266 Installation

Hit OK. Then navigate to the Board Manager by going to Tools > Boards >
Boards Manager. There should be a couple new entries in addition to the

29
standard Arduino boards. Filter your search by typing ESP8266S. Click on that
entry and select Install.

Figure 4.11 Board Manager

The board definitions and tools for the ESP8266S include a whole new set of
gcc, g++, and other reasonably large, compiled binaries, so it may take a few
minutes to download and install (the archived file is ~110MB). Once the
installation has completed, a small INSTALLED text will appear next to the
entry. You can now close the Board Manager.

4.1.11.1 Arduino Example: Blink


To make sure ESP8266S Arduino core and the NodeMCU are properly set up,
we’ll upload the simplest sketch of all – The Blink!We will use the on-board
LED for this test. As mentioned earlier in this tutorial, D0 pin of the board is
connected to on-board Blue LED & is user programmable. Perfect!Before we
get to uploading sketch & playing with LED, we need to make sure that the
board is selected properly in Arduino IDE. Open Arduino IDE and select
NodeMCU 0.9 (ESP-12 Module) option under your Arduino IDE > Tools >
Board menu.

30
Figure 4.12 Module Selection in Arduino Software

Now, plug your ESP8266SNodeMCU into your computer via micro-B USB
cable. Once the board is plugged in, it should be assigned a unique COM port.
On Windows machines, this will be something like COM#, and on Mac/Linux
computers it will come in the form of /dev/tty.usbserial-XXXXXX. Select this
serial port under the Arduino IDE > Tools > Port menu. Also select the Upload
Speed : 115200

31
Figure 4.13 Tools port of Arduino Software

4.1.11.2 Warning
More attention needs to be given to selecting board, choosing COM port and
selecting Upload speed. You may get espcomm_upload_mem error while
uploading new sketches, if failed to do so.
Once you are done, try the example sketch below.
void setup()
{
pinMode(D0, OUTPUT);
}
void loop()
{
digitalWrite(D0, HIGH);

32
delay(500);
digitalWrite(D0, LOW);
delay(500);
}
Once the code is uploaded, LED will start blinking. You may need to tap the
RST button to get your ESP8266 to begin running the sketch.

4.1.12 ESP8266 Features

 Low cost, compact and powerful Wi-Fi Module


 Power Supply: +3.3V only
 Current Consumption: 100mA
 I/O Voltage: 3.6V (max)
 I/O source current: 12mA (max)
 Built-in low power 32-bit MCU @ 80MHz
 512kB Flash Memory
 Can be used as Station or Access Point or both combined
 Supports Deep sleep (<10uA)
 Supports serial communication hence compatible with many development
platform like Arduino
 Can be programmed using Arduino IDE or AT-commands or Lua Script

4.1.13 Applications

 IOT Projects
 Access Point Portals
 Wireless Data logging
 Smart Home Automation
 Learn basics of networking
 Portable Electronics

33
4.2 Gas Sensor
Ideal sensor for use to detect the presence of a dangerous LPG leak in your car
or in a service station, storage tank environment. This unit can be easily
incorporated into an alarm unit, to sound an alarm or give a visual indication of
the LPG concentration. The sensor has excellent sensitivity combined with a
quick repsonse time. The sensor can also sense iso-butane, propane, LNG and
cigarette smoke.

Figure 4.14 Gas Sensor


4.2.2 Applications
 Gas leak detection system
 Fire/Safety detection system
 Gas leak alarm
 Gas detector
 High Sensitivity

4.2.3 Features
• Detection Range: 100 - 10,000 ppm iso-butane propane
• Fast Response Time: <10s
• Heater Voltage: 5.0V
• Dimensions: 18mm Diameter, 17mm High excluding pins, Pins - 6mm High

34
4.3 DHT11 Sensor
DHT11 humidity and temperature sensor is available as a sensor and as a
module. The difference between this sensor and module is the pull-up resistor
and a power-on LED. DHT11 is a relative humidity sensor. To measure the
surrounding air this sensor uses a thermistor and a capacitive humidity
sensor.This sensor is used here to monitor the humidity variation of the
environment where the crops are cultivated. This is a digital sensor and
measures the humidity value in percentage format.

Figure 4.15 DHT11 Sensor

DHT11 is a low-cost digital sensor for sensing temperature and humidity. This
sensor can be easily interfaced with any micro-controller such as Arduino,
Raspberry Pi etc… to measure humidity and temperature instantaneously.

4.3.2 Working

DHT11 sensor consists of a capacitive humidity sensing element and a


thermistor for sensing temperature. The humidity sensing capacitor has two
electrodes with a moisture holding substrate as a dielectric between them.
Change in the capacitance value occurs with the change in humidity levels. The
IC measure, process this changed resistance values and change them into digital

35
form.For measuring temperature this sensor uses a Negative Temperature
coefficient thermistor, which causes a decrease in its resistance value with
increase in temperature. To get larger resistance value even for the smallest
change in

The temperature range of DHT11 is from 0 to 50 degree Celsius with a 2-degree


accuracy. Humidity range of this sensor is from 20 to 80% with 5% accuracy.
The sampling rate of this sensor is 1Hz .i.e. it gives one reading for every
second. DHT11 is small in size with operating voltage from 3 to 5 volts. The
maximum current used while measuring is 2.5mA.DHT11 sensor has four pins-
VCC, GND, Data Pin and a not connected pin. A pull-up resistor of 5k to 10k
ohms is provided for communication between sensor and micro-controller.

4.3.3 Humidity (DHT11):

● DHT11 uses only one wire for communication. The voltage levels with
certain time value defines the logic one or logic zero on this pin.
● The communication process is divided in three steps, first is to send
request to DHT11 sensor then sensor will send response pulse and then it
starts sending data of total 40 bits to the microcontroller.

Figure 4.16 Communication process

36
4.3.4 Communication process:

Figure 4.17 Start pulse

● To start communication with DHT11, first we should send the start pulse
to the DHT11 sensor.
● To provide start pulse, pull down (low) the data pin minimum 18ms and
then pull up, as shown in diag.

Response

Figure 4.18 Response pulse

37
● After getting start pulse from, DHT11 sensor sends the response pulse
which indicates that DHT11 received start pulse.
● The response pulse is low for 54us and then goes high for 80us.

● To provide start pulse,pull down(low) the data pin minimum 18ms and
then pull up,as shown under diagram.

Data

● After sending the response pulse, DHT11 sensor sends the data, which
contains humidity and temperature value along with checksum.
● The data frame is of total 40 bits long, it contains 5 segments (byte) and
each segment is 8-bit long.
● In these 5 segments, first two segments contain humidity value in decimal
integer form. This value gives us Relative Percentage Humidity. 1st 8-bits
are integer part and next 8 bits are fractional part.
● Next two segments contain temperature value in decimal integer form.
This value gives us temperature in Celsius form.
● Last segment is the checksum which holds checksum of first four
segments.
● Here checksum byte is direct addition of humidity and temperature value.
And we can verify it, whether it is same as checksum value or not. If it is
not equal, then there is some error in the received data.

38
End of frame

Figure 4.19 End of Frame

● After sending 40-bit data, DHT11 sensor sends 54us low level and then
goes high. After this DHT11 goes in sleep mode.

4.3.5 DHT11 vs DHT22

Two versions of the DHT sensor, they look a bit similar and have the same
pinout, but have different characteristics and specifications:

4.3.6 Features

● Ultra-low cost
● 3 to 5V power and I/O
● 2.5mA max current use during conversion (while requesting data)
● Good for 20-80% humidity readings with 5% accuracy
● Good for 0-50°C temperature readings ±2°C accuracy
● No more than 1 Hz sampling rate (once every second)
● Body size 15.5mm x 12mm x 5.5mm
● 4 pins with 0.1" spacin

39
Figure 4.20 DHT11 vs DHT22

4.3.7 Applications

This sensor is used in various applications such as measuring humidity and


temperature values in heating, ventilation and air conditioning systems. Weather
stations also use these sensors to predict weather conditions. The
humidity sensor is used as a preventive measure in homes where people are
affected by humidity. Offices, cars, museums, greenhouses and industries use
this sensor for measuring humidity values and as a safety measure.

40
4.4 LoRa

Figure 4.21 LoRa

GT-38 wireless serial communication module is a new


generation of multi-channel embedded wireless data transmission module. The
wireless working frequency band is 433-458.5MHz, multiple channels can be
set, the step is 100KHz, and there are 255 channels in total. The maximum
transmit power of the module is 100mW (20dBm), the receiving sensitivity is -
116dBm at 5000bps air baud rate, and the communication distance can be up to
1200 meters in the open field.

The module contains an MCU, users do not need to program


the module separately, and various transparent transmission modes only need to
send and receive serial data, which is convenient to use. The module adopts a
variety of serial port transparent transmission modes, users can use AT
commands to choose according to the requirements of use. The four modes

41
FU1, FU2, FU3, FU4 in idle state, the average operating current is 3.6mA,
80μA, 16mA and 16mA, the maximum operating current is 100mA (at full
power emission state)

4.4.2 Specification:

1.Working frequency band: 433 ~ 458.5MHz

2.Communication interface: UART 3.3V / 5V TTL level

3.Antenna interface: spring antenna / antenna socket

4.Working voltage: 3.2 ~ 5.5V

5.Sleep current: no sleep mode

6.Communication level: 3.3V / 5V level

7.Working humidity: 10% ~ 90%

8.Transmit power: 20dBm (MAX)

9.Working temperature: -25 ℃ ~ + 75 ℃

10.Reference distance: 1200m

11.Storage temperature: -40 ℃ ~ + 85 ℃

42
4.5 Fire Sensor

Figure 4.22 Fire Sensor

A sensor which is most sensitive to a normal light is known as a flame sensor.


That’s why this sensor module is used in flame alarms. This sensor detects
flame otherwise wavelength within the range of 760 nm – 1100 nm from the
light source. This sensor can be easily damaged to high temperature. So this
sensor can be placed at a certain distance from the flame. The flame detection
can be done from a 100cm distance and the detection angle will be 600. The
output of this sensor is an analog signal or digital signal. These sensors are used
in fire fighting robots like as a flame alarm.

A fire-sensor is one kind of detector which is mainly designed for detecting as


well as responding to the occurrence of a fire or flame. The flame detection
response can depend on its fitting. It includes an alarm system, a natural gas
line, propane & a fire suppression system. This sensor is used in industrial
boilers. The main function of this is to give authentication whether the boiler is
properly working or not. The response of these sensors is faster as well as more
accurate compare with a heat/smoke detector because of its mechanism while
detecting the flame.

43
4.5.2 Working Principle

This sensor/detector can be built with an electronic circuit using a receiver like
electromagnetic radiation. This sensor uses the infrared flame flash method,
which allows the sensor to work through a coating of oil, dust, water vapor,
otherwise ice.

4.5.3 Fire Sensor Module

Figure 4.23 Fire Sensor Module

The pin configuration of this sensor is shown below. It includes four pins which
include the following. When this module works with a microcontroller unit then
the pins are

Pin1 (VCC pin): Voltage supply rages from 3.3V to 5.3V

Pin2 (GND): This is a ground pin

Pin3 (AOUT): This is an analog output pin (MCU.IO)

Pin4 (DOUT): This is a digital output pin (MCU.IO)

44
4.5.4 Applications

 Hydrogen stations

 Industrial heating

 Fire detection

 Fire alarm

 Fire fighting robot

 Drying systems

 Industrial gas turbines

 Domestic heating systems

 Gas-powered cooking devices

Thus, this is all about a flame sensor. From the above information finally, we
can conclude that the main purpose of this sensor is to reduce the risks which
are associated with the ignition. These sensors respond frequently than a smoke
or heat detector.

45
CHAPTER 5

SOFTWARE DESCRIPTION

5.1 Arduino IDE

 Writing Sketches
o File
o Edit
o Sketch
o Tools
o Help
 Sketchbook
 Tabs, Multiple Files, and Compilation
 Uploading
 Libraries
 Third-Party Hardware
 Serial Monitor
 Preferences
 Language Support
 Boards

5.1.1File

 New
Creates a new instance of the editor, with the bare minimum structure of a
sketch already in place.
 Open
Allows to load a sketch file browsing through the computer drives and folders.

46
 Open Recent
Provides a short list of the most recent sketches, ready to be opened.
 Sketchbook
Shows the current sketches within the sketchbook folder structure; clicking on
any name opens the corresponding sketch in a new editor instance.
 Examples
Any example provided by the Arduino Software (IDE) or library shows up in
this menu item. All the examples are structured in a tree that allows easy access
by topic or library.
 Close
Closes the instance of the Arduino Software from which it is clicked.
 Save
Saves the sketch with the current name. If the file hasn't been named before, a
name will be provided in a "Save as.." window.
 Save as...
Allows to save the current sketch with a different name.
 PageSetup
It shows the Page Setup window for printing.
 Print
Sends the current sketch to the printer according to the settings defined in Page
Setup.
 Preferences
Opens the Preferences window where some settings of the IDE may be
customized, as the language of the IDE interface.
 Quit
Closes all IDE windows. The same sketches open when Quit was chosen will be
automatically reopened the next time you start the IDE.

47
 Undo/Redo
Goes back of one or more steps you did while editing; when you go back, you
may go forward with Redo.
 Cut
Removes the selected text from the editor and places it into the clipboard.
 Copy
Duplicates the selected text in the editor and places it into the clipboard.
 Copy for Forum

Copies the code of your sketch to the clipboard in a form suitable for posting to
the forum, complete with syntax coloring.
 Copy as HTML
Copies the code of your sketch to the clipboard as HTML, suitable for
embedding in web pages.
 Paste
Puts the contents of the clipboard at the cursor position, in the editor.
 Select All
Selects and highlights the whole content of the editor.
 Comment/Uncomment
Puts or removes the // comment marker at the beginning of each selected line.
 Increase/Decrease Indent
Adds or subtracts a space at the beginning of each selected line, moving the text
one space on the right or eliminating a space at the beginning.
 Find
Opens the Find and Replace window where you can specify text to search inside
the current sketch according to several options.
 Find Next
Highlights the next occurrence - if any - of the string specified as the search
item in the Find window, relative to the cursor position.

48
 Find

Highlights the previous occurrence - if any - of the string specified as the search
item in the Find window relative to the cursor position.

 Verify/Compile
Checks your sketch for errors compiling it; it will report memory usage for code
and variables in the console area.
 Upload
Compiles and loads the binary file onto the configured board through the
configured Port.
 Upload Using Programmer
This will overwrite the bootloader on the board; you will need to use Tools >
Burn Bootloader to restore it and be able to Upload to USB serial port again.
However, it allows you to use the full capacity of the Flash memory for your
sketch. Please note that this command will NOT burn the fuses. To do so
a Tools -> Burn Bootloader command must be executed.
 Export Compiled Binary
Saves a .hex file that may be kept as archive or sent to the board using other
tools.
 Show Sketch Folder
Opens the current sketch folder.
 Include Library
Adds a library to your sketch by inserting #include statements at the start of
your code. For more details, see libraries below. Additionally, from this menu
item you can access the Library Manager and import new libraries from .zip
files.
 Add File...
Adds a source file to the sketch (it will be copied from its current location). The
new file appears in a new tab in the sketch window. Files can be removed from

49
the sketch using the tab menu accessible clicking on the small triangle icon
below the serial monitor one on the right side o the toolbar.

5.1.2 Tools
 Auto Format

This formats your code nicely: i.e. indents it so that opening and closing curly
braces line up, and that the statements inside curly braces are indented more.
 Archive Sketch
Archives a copy of the current sketch in .zip format. The archive is placed in the
same directory as the sketch.
 Fix Encoding & Reload
Fixes possible discrepancies between the editor char map encoding and other
operating systems char maps.
 Serial Monitor
Opens the serial monitor window and initiates the exchange of data with any
connected board on the currently selected Port. This usually resets the board, if
the board supports Reset over serial port opening.
 Board
Select the board that you're using. See below for descriptions of the various
boards.
 Port
This menu contains all the serial devices (real or virtual) on your machine. It
should automatically refresh every time you open the top-level tools menu.
 Programmer
For selecting a harware programmer when programming a board or chip and not
using the onboard USB-serial connection. Normally you won't need this, but if
you're burning a bootloader to a new microcontroller, you will use this.
 Burn Bootloader
The items in this menu allow you to burn a bootloader onto the microcontroller

50
on an Arduino board. This is not required for normal use of an Arduino or
Genuino board but is useful if you purchase a new ATmega microcontroller
(which normally come without a bootloader). Ensure that you've selected the
correct board from the Boards menu before burning the bootloader on the target
board. This command also set the right fuses.

5.1.3 Tabs, Multiple Files, and Compilation

Allows you to manage sketches with more than one file (each of which appears
in its own tab). These can be normal Arduino code files (no visible extension),
C files (.c extension), C++ files (.cpp), or header files (.h).

5.1.4 Uploading

Before uploading your sketch, you need to select the correct items from
the Tools > Board and Tools > Port menus. The boards are described below. On
the Mac, the serial port is probably something like /dev/tty.usbmodem241 (for
an Uno or Mega2560 or Leonardo) or /dev/tty.usbserial-1B1 (for a
Duemilanove or earlier USB board), or /dev/tty.USA19QW1b1P1.1 (for a serial
board connected with a Keyspan USB-to-Serial adapter). On Windows, it's
probably COM1 or COM2 (for a serial board) or COM4, COM5, COM7, or
higher (for a USB board) - to find out, you look for USB serial device in the
ports section of the Windows Device Manager. On Linux, it should
be /dev/ttyACMx , /dev/ttyUSBx or similar. Once you've selected the correct
serial port and board, press the upload button in the toolbar or select
the Upload item from the Sketch menu. Current Arduino boards will reset
automatically and begin the upload. With older boards (pre-Diecimila) that lack
auto-reset, you'll need to press the reset button on the board just before starting
the upload. On most boards, you'll see the RX and TX LEDs blink as the sketch

51
is uploaded. The Arduino Software (IDE) will display a message when the
upload is complete, or show an error.

When you upload a sketch, you're using the Arduino bootloader, a small
program that has been loaded on to the microcontroller on your board. It allows
you to upload code without using any additional hardware. The bootloader is
active for a few seconds when the board resets; then it starts whichever sketch
was most recently uploaded to the microcontroller. The bootloader will blink
the on-board (pin 13) LED when it starts (i.e. when the board resets).

5.1.5 Libraries

Libraries provide extra functionality for use in sketches, e.g. working with
hardware or manipulating data. To use a library in a sketch, select it from
the Sketch > Import Library menu. This will insert one or
more #include statements at the top of the sketch and compile the library with
your sketch. Because libraries are uploaded to the board with your sketch, they
increase the amount of space it takes up. If a sketch no longer needs a library,
simply delete its #includestatements from the top of your code.

There is a list of libraries in the reference. Some libraries are included with the
Arduino software. Others can be downloaded from a variety of sources or
through the Library Manager. Starting with version 1.0.5 of the IDE, you do can
import a library from a zip file and use it in an open sketch. See
these instructions for installing a third-party library.

To write your own library, see this tutorial.

Third-Party Hardware

52
Support for third-party hardware can be added to the hardware directory of your
sketchbook directory. Platforms installed there may include board definitions
(which appear in the board menu), core libraries, bootloaders, and programmer
definitions. To install, create the hardware directory, then unzip the third-party
platform into its own sub-directory. (Don't use "arduino" as the sub-directory
name or you'll override the built-in Arduino platform.) To uninstall, simply
delete its directory.

For details on creating packages for third-party hardware, see the Arduino IDE
1.5 3rd party Hardware specification.

5.1.6 Serial Monitor

Displays serial data being sent from the Arduino or Genuino board (USB or
serial board). To send data to the board, enter text and click on the "send" button
or press enter. Choose the baud rate from the drop-down that matches the rate
passed to Serial.begin in your sketch. Note that on Windows, Mac or Linux, the
Arduino or Genuino board will reset (rerun your sketch execution to the
beginning) when you connect with the serial monitor.You can also talk to the
board from Processing, Flash, MaxMSP, etc (see the interfacing page for
details).

5.1.7 Preferences

Some preferences can be set in the preferences dialog (found under


the Arduino menu on the Mac, or File on Windows and Linux). The rest can be
found in the preferences file, whose location is shown in the preference dialog.

53
Figure 5.1 Arduino IDE preferences
Since version 1.0.1 , the Arduino Software (IDE) has been translated into 30+
different languages. By default, the IDE loads in the language selected by your
operating system. (Note: on Windows and possibly Linux, this is determined by
the locale setting which controls currency and date formats, not by the language
the operating system is displayed in.)

If you would like to change the language manually, start the Arduino Software
(IDE) and open the Preferences window. Next to the Editor Language there is a
dropdown menu of currently supported languages. Select your preferred
language from the menu, and restart the software to use the selected language. If
your operating system language is not supported, the Arduino Software (IDE)
will default to English.

You can return the software to its default setting of selecting its language based
on your operating system by selecting System Default from the Editor

54
Language drop-down. This setting will take effect when you restart the Arduino
Software (IDE). Similarly, after changing your operating system's settings, you
must restart the Arduino Software (IDE) to update it to the new default
language.

5.1.8 Boards

The board selection has two effects: it sets the parameters (e.g. CPU speed and
baud rate) used when compiling and uploading sketches; and sets and the file
and fuse settings used by the burn bootloader command. Some of the board
definitions differ only in the latter, so even if you've been uploading
successfully with a particular selection you'll want to check it before burning the
bootloader. You can find a comparison table between the various boards here.

Arduino Software (IDE) includes the built in support for the boards in the
following list, all based on the AVR Core. The Boards Manager included in the
standard installation allows to add support for the growing number of new
boards based on different cores like Arduino Due, Arduino Zero, Edison,
Galileo and so on.

55
CHAPTER 6
CONCLUSION AND FUTURE WORK
6.1 Conclusion
Implementation of Coal mine safety system is implemented using Fire sensor,
Gas sensor, LDR sensor, DHT11 sensor to increase the safety of the workers in
the coal mine and to prevent them from danger, By using this system constant
checking of the coalmine and alerting the worker is done by using Thinkspeak.
The system is cost-effective and efficient. The Arduino microcontroller is used
to create a prototype for a mine safety system in this proposed method. This
device is made from each hardware and software program factors. The hardware
is made from several sensors, while the software program is made of an
Android software that connects to the Arduino board and other hardware
additives via the internet of things. The use of the wireless community to
growth mine safety is a solution for reaching each protection and development
in mining initiatives.

6.2 Future Work

Real-time location tracking: By incorporating real-time location tracking, the


system can provide more precise information about the location of workers and
equipment within the mine. This can help identify potential safety hazards and
improve response times in case of an emergency. Integration with wearable
devices: The system can be integrated with wearable devices like smart helmets,
smart watches, or body sensors, allowing for more detailed monitoring of
workers' health and safety. Wearables can also alert workers if they are entering
a hazardous area or if their vital signs indicate they are in distress. Advanced
analytics and AI: The system can incorporate advanced analytics and AI to
provide deeper insights into the data collected from the sensors.

56
REFERENCES

1. Li Zhangi, Yuqin Zhu1, Hao Wu2 ,And Kun Li “An optimized


multisource bilinear convolutional neural network model for flame image
identification of coal mine, vol.10, pp 472-84, 2022.

2. Akshunya Mishra, Saksham Malhotra, Ruchira, Pallavichoudekar,


“H.P.Singh “Real Time Monitoring & Analyzation Of Hazardous
Parameters In Underground Coal Mines Using Intelligent Helmet System,vol.
24(5), pp 818-19, 1988.

3. Juanli Li* ,Menghui Li, Fangyuan Yan and Dong Miao, “Key technologies
of data monitoring for coal machinery equipment in the intelligent IOT
environment,vol.225-27, 2009.

4. Manohara K M, NayanChandan D C, Pooja S V, Sonika P, Ravikumar K I,


“IOT based Coal Mine Safety Monitoring And Alerting System, pp 374-
378, 2020.

5. Xuan Liu 1 , Chenfeng Zhang 1 , Yingzhi Wang1 , Kai Ding1 , Tailin


Han, “Coal Mine Safety Intelligent Monitoring based on Wireless Sensor
Network, pp 310-14, 2020

6. Bailin Hu 1,2, Lei Chen3 , Youfeng Zou1 , Xuexiao Wu 2 , (Associate


Member, Ieee), And Prosper Washaya4, “Methods for Monitoring Fast and
Large Gradient Subsidence in Coal Mining Areas Using SAR Images: A
Review, pp 375-65, 2021

57
7. Liang Dan, Yao Jun, “Application of IPv6 in Coal Mine Safety Production
Monitoring, pp 818-19, 2018.

8. Jose-Luis Poza-Lujan 1 , (Member, Ieee), Juan-José Sáenz- Peñafiel 2 ,


Juan-Luis Posadas-Yagüe 1 , J. Alberto Conejero 3 , And Juan-Carlos Cano,
“Underground Coal Fires Identification and Monitoring Using Time-Series
InSARWith Persistent and Distributed Scatterers: A Case Study of Miquan
Coal Fire Zone in Xinjiang, China , pp 287-78, 2019.

9. Haiping Yang 1 , Shengdong Liu1,2, And Cai Yang, “Dynamic


Monitoring of Mining Destruction on Coal Seam Floor With Constrained
Time-Lapse Resistivity Imaging Inversion, pp 420-11, 2022

10. Pengcheng Yan 1,2, Songhang Shang 2 , Chaoyin Zhang2 , Nini Yin1 ,
Xiaofei Zhang,” Research on the Processing of Coal Mine Water Source Data
by Optimizing BP Neural Network Algorithm With Sparrow Search
Algorithm, pp 376-45, 2021.

11. Singh, A., Singh, U. K., & Kumar, D. IoT in mining for sensing,
monitoring and prediction of underground mines roof support. In 2018 4th
International Conference on Recent Advances in Information Technology
(RAIT) (pp. 1-5). IEEE 2018.

58

You might also like