Professional Documents
Culture Documents
Iot Based Coal Mine Safety Monitoring System: A Project Report
Iot Based Coal Mine Safety Monitoring System: A Project Report
Iot Based Coal Mine Safety Monitoring System: A Project Report
MONITORING SYSTEM
A PROJECT REPORT
Submitted by
ROHAN M 312319112006
SURYAHERAN J 312319112011
of
BACHELOR OF ENGINEERING
IN
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
i
CERTIFICATE OF EVALUATION
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.
ii
ACKNOWLEDGEMENT
iii
TABLE OF CONTENTS
CHAPTER TITLE PAGE NO.
NO.
ABSTRACT Vii
1 INTRODUCTION 1
1.2 Objectives 1
2 LITERATURE SURVEY 3
3 PROJECT DESCRIPTION 14
3.1 Methodology 14
3.2 Working 14
4 HARDWARE DESCRIPTION 17
4.1.13 Applications 33
4.2.1 Applications 34
4.2.2 Features 34
4.3.1 Working 35
4.3.2 Humidity(DHT11) 36
4.3.5 Features 39
4.3.6 Applications 40
4.4 LoRa 41
4.4.1 Specifications 42
v
5 SOFTWARE DESCRIPTION 46
5.1.1 File 46
5.1.2 Tools 50
5.1.4 Uploading 51
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
vii
LIST OF FIGURES
4.7 ESP-Buttons 25
viii
4.17 Start Pulse 37
4.21 LORA 41
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.
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.
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
16
CHAPTER 4
HARDWARE DESCRIPTION
4.1 Node Mcu
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.
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.
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
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.
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.
22
Figure 4.5 ESP-External components
23
4.1.5 Multiplexed I/Os
2 UART interfaces
4 PWM outputs
SPI, I2C & I2S interface
24
The board also has a LED indicator which is user programmable and is
connected to the D0 pin of the board.
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:
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.
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
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.
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.
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.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.
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.
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
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
● 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.
36
4.3.4 Communication process:
● 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
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
● After sending 40-bit data, DHT11 sensor sends 54us low level and then
goes high. After this DHT11 goes in sleep mode.
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
40
4.4 LoRa
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:
42
4.5 Fire Sensor
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.
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
44
4.5.4 Applications
Hydrogen stations
Industrial heating
Fire detection
Fire alarm
Drying systems
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
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.
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.
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.
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
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.
56
REFERENCES
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.
57
7. Liang Dan, Yao Jun, “Application of IPv6 in Coal Mine Safety Production
Monitoring, pp 818-19, 2018.
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