You are on page 1of 6

2013 Ninth International Conference on Natural Computation (ICNC)

Combustible Gas Monitoring Based on Zigbee and


Network Building Techniques
Yunan Cao
Min Li, Yuduo Wang
Oil-gas Technical Service Co. Ltd.
School of Information and Communication Engineering Oil-chemistry Co. of China
Being Information Science and Technology University
Langfang, China
Beijing, China

Abstract— Most of traditional gas monitoring uses wired or over cable system. For example, in mobile devices, the location
handled devices to transmit signals, while the complicated wiring of the devices can be moved according the needs without the
causes great inconvenience for power supply, signal transmission, restriction of cable. In addition, the volume of the sensors can
management and maintenance. To overcome these shortcomings, be reduced by decreasing the sensor attached on a large number
the paper gives a wireless combustible gas monitoring solution
of transmission lines. ZigBee has the characteristics of lower
based on ZigBee technique using CC2530 chip which made by TI
(Texas Instruments) [1] as the master chip, in which the ZigBee power consumption, stronger capability of extended network. It
condense protocol is analyzed, network building solution is given, has widely been used in the field of automatic control and
the software for application layer and driver are designed, and remote control, etc. It can satisfy the wireless network and
the real-time monitoring of combustible gas and selfish network control of the small cheap devices. A system of combustible
building of sensor nodes are completed. The study results gas monitoring and networking building technique is described
demonstrate that the parameters such as combustible gas in the paper.
concentration, micro-seismic signal under the case of harsh
environment can be collected. II. ANALYSIS OF ZIGBEE PROTOCOL
Keywords- ZigBee; Network building; CC2530; Combustible A. Main Features of ZigBee
gas monitoring
ZigBee is a technical standard about wireless standard
developed by the networking, security and application software
I. INTRODUCTION ratified by the IEEE [2] (Institute of Electrical and Electronic
The coal mine gas explosion is one of the biggest threats to Engineers) 802.15.4. Different from other wireless standard
coal mine safety production. In recent years, a lot of coal such as 802.11 or 802.16, ZigBee and 802.15.4 carries a
mining enterprises at home and abroad apply mature industrial maximum transmission rate of 250Kbps limited data traffic
monitoring technologies to coal production, which has played [3]. It is the new standard developed by IEEE working group
an important role to protect the safety of mining personnel. But for short-range communications specifically, and it belongs to
the majority of the monitoring systems are isolated, self- wireless personal area network (PAN). This technical standard
contained, so the access of sensor nodes is not flexible enough. includes three frequency bands. The first one is the 2.4GHz
At the same time, data acquisition has a feature of narrow frequency band which is universal. And it defines 16
scope, low efficiency and poor linkage. According to the status independence communication channels. Its transfer rate is
for coal mine monitoring system at home and abroad, and the 250kbps. The second is 868MHz in Europe, it has 1 channel
analysis for analyzing monitoring needs comprehensively, a and its transfer rate is 20kbps. The other one is 915MHz
solution of monitoring and network building technique for frequency band in United States. Its transfer rate is 40kbps and
combustible gas based on ZigBee effectively is proposed in it has 10 channels. And the three frequency bands are ISM
this paper. With the use of tree network topology, the solution frequency band exempting from license [4].
expands the acquisition range, effectiveness and improves the IEEE deals with low-level media access control layer
reliability of transmission of the node. (MAC) and physical layer (PHY) protocol, whereas ZigBee
With the development of science and technology, more and Alliance standardizes to its network layer (NWK) and
more attention is paid to the wireless communication network application layer framework (API). Application-layer
technology. As a new kind of information acquisition and framework includes application support sub-layer (APS), the
management technology, wireless communication can reduce device object (ZDO) and the manufacturer-defined application
the production cost, improve the productivity, and make use of objects [5]. The characteristics of ZigBee protocol are as
energy more effectively. In wireless system electromagnetic follows [6]:
wave is used as the transmission medium, and disadvantages of 1) Saving device power: ZigBee can work for up to 6
cable transmission can be avoided in this solution, while cable months to 2 years in energy-saving mode.
system’s costs are increasing in installation, troubleshooting, 2) Reliable communication: ZigBee uses the CSMA-CA
maintenance and upgrade in spite of the advanced technology. avoidance mechanism to avoid competition and conflict; MAC
At the same time, wireless system is more flexible and practical

The paper is aided by Study on tracking and estimating system and


mating tools about horizontal well increasing-yield, The Item Number is
2011ZX05042-002-002

Authorized licensed use limited to: Polytechnic


978-1-4673-4714-3/13/$31.00 ©2013University
IEEE of Bucharest. Downloaded
1563 on July 27,2023 at 05:40:36 UTC from IEEE Xplore. Restrictions apply.
layer uses a full acknowledgment mechanism, so each network establishment and responsible for the initialization of
transmitted packet must wait for the acknowledgment the network which determines the PAN ID number and the
information. communication channel. The coordinator must be a full
3) Strong ability of self-organization and self-healing for function device with the function of routing and data
networking:The ZigBee network node can sense node existing forwarding. The router must be a full device and has the
or not, determine connected and form a networking without ability of data routing. The terminal node can be a full
human intervention. The net has a function of self-healing and function device or a reduced device. As a child node of the
adjusting topology when a node increased or removed, or a network, it can only communicate with its parent node and
node’s position moved. So,it can ensure the entire system to without the ability to join any other node.
work properly. A. ZigBee Network topology
4) Low cost: The device complexity is low, and the ZigBee ZigBee supports three network topologies: start network,
protocol is free-royalty, working band is flexible, license-free tree network and mesh network, as shown in Figure 1.
at 2.4GHz, this can reduce costs effectively.
B. The data frame in wireless sensor network
The data transmission among the coordinator, routers and
end nodes must follow a certain format, so that it can guarantee
the accuracy and validity of the data. When the terminal nodes
send data to coordinator, the coordinator must know its device
characteristics and its data types. In this way, the corresponding
measures can be taken to avoid accidents according to the
characteristics of the devices and the data anomalies.
Therefore, the results of the data in transmission should be
stored with a predetermined format. Table 1 is the definition of
the data frame at network layer.

TABLE I. DEFINITION OF THE DATA FRAME

Frame Node Data


0XAAH checksum 0XBBH
type identification field

1) 0XAAH is a data frame’s start flag which is called the Figure 1. Network Topology
Checksum is used for the data frame to verify whether the data
bit change or not in the transmission process by the parity bit. By analyzing three network topology structure of ZigBee,
2) Sensor nodes write their own short address’s low byte the following can be known: Star network is one of the most
in the domain of device identifies as a flag. So, the superior simple network topology and there is only one coordinator and
network can find which device the data belongs to. one or more of the terminal nodes in the star network. The
3) The data field is the main part of the data frame. Data terminal nodes can’t communicate with each other directly.
field includes several measurement parameters values defined All nodes information must be forwarded by coordinator. If
by system, such as gas concentration, temperature, humidity, the coordinator fails, the entire network will not be able to run
etc. And each parameter position is fixed, in order to verify properly. The mesh network is a high-reliability detection
network and the routing information must not be transferred
whether the data acquisition successes.
along the tree path. The mesh network can provide a plurality
III. THE OVERALL SYSTEM DESIGN SCHEME of data communication channels. Each full function device can
be thought as a router, which can achieve the function of
Zigbee protocol defines two types of physical devices
message’s routing forwarding. Therefore, once the device data
which are used to cooperate with each other. They are full
communication fails, there is another path for data
function device and reduced function device respectively. Full
communication. This can greatly improve the reliability of the
function device can support any kind of topology structure,
data transmission. But network construction is complicated,
and it can be used as a coordinator, a router or a terminal node.
the needs for maintenance of network nodes information is
The full function device has the function of the controller and
much more than tree network, and the cost is higher. A tree
it can communicate with any kind of device. The reduced
network is composed of multiple simple star topologies. The
function device supports the star network topology only. It
terminal node can be connected to coordinator or router.
cannot be used as a coordinator or a router , but it can Router provides two functions: the first one is to increase the
communicate with coordinator or router. number of network nodes, the second is to extend the physical
There are three kinds of network roles in the ZigBee scope of network. In the tree network, terminal nodes will
network: coordinator, router or terminal node [7]. A ZigBee generally send the data to the router nodes. Then the routers
network has only one coordinator. It is the starting point of

Authorized licensed use limited to: Polytechnic University of Bucharest. Downloaded


1564on July 27,2023 at 05:40:36 UTC from IEEE Xplore. Restrictions apply.
complete the forwarding of the data, and the coordinator is the up mode, sleep mode and interrupt mode. Under the case of
network management defenders [8]. Compared with mesh power management the use of different low-power modes for
network, the structure of tree network is simpler, and the tree low–power application with a long life is allowed .
network can also extend the range of network communication. 3) On-chip peripherals: The chip allows the designer to
develop advanced applications. It includes DMA channels, a
B. System network topology diagram MAC timer, four oscillators used for system clock and the
timing operation, one general 16-bit and two 8-bit timers, an
The system uses the tree network to finish monitoring
and networking. A router node is responsible for relaying and infrared generating circuit, one 32 KHz sleep timer, 12-bit
uploading the data of child nodes. The coordinator can control analog-to-digital converter(ADC) with 8 input channels, one
the energy range beyond the sensor node and expand AES128 coprocessor, a watchdog timer, a power-on reset
coverage. At the same time, the tree network is more reliable circuit, a brown-out detection circuit and 21 programmable
than star network for data transmission. Compared with the pins, etc .
mesh network, the redundancy and the total power 4) Interrupt: There are 18 interrupt sources and has 4
consumption of the system can be reduced in tree network. priorities in its internal interrupt controller.
The system network topology is shown in Figure 2. CC2530 chip functional structure is shown in Figure 3.
Vdd
Flash ROM Power Clock OSC
Dcoup1

Memory 8051 CPU


SRAM DMA
Arbitrator Core

Radio Register AES ADC

I/O controller
FIFO and Frame Control CDMA/CA USART1

Radio Data Interface USART2

Modulator Timer1

Timer2 MAC

Synthesizen
Frequency
RF Timer3
Chain
Figure 2. The System Network Topology Timer4

Figure 3. The Basic Structure of CC2530


IV. THE HARDWARE DESIGN OF ZIGBEE NODES

A. Chip Instruction of CC2530 B. The hardware design of ZigBee nodes


The CC2530 system-on-chip solution for 2.4GHz is There are two parts in ZigBee node hardware design: the
suitable for a wide range of applications. There can easily be wireless transmission module design and the testing module
built on top of the IEEE 802.15.4 based standard protocols. design. The wireless transmission module includes the data
This is a real piece of system solutions which can also ensure interface circuit, power supply filtering, crystal oscillator
the ZigBee network performance. The system meets the circuit, reset circuit, etc. ZigBee node is the data source of the
network applications to the 2.4GHz band. It performs well in system, and is primarily responsible for the data collection such
network cost and power consumption of the nodes and it as the combustible gas concentration, temperature, humidity
satisfies the needs of commercialization. It integrates ZigBee and the other environmental and receives the control command
radio frequency (RF), memory and microcontroller on a single transmitted by the monitoring center. The testing module uses
chip. With the use of this node structure, the system not only the RS232 serial converter circuit to finish the network
eliminates the trouble of connecting the processor and wireless functions and the testing performances. Finally, it realizes the
communication module, but also builds a strong network at a function of PC binding data, transmission of node’s and
very low cost. CC2530’s main function is as follows: network’s information or command [9]. The whole system
1) CPU configuration: Chip integrates the enhanced high hardware architecture diagram is shown in Figure 4.
speed 8051 core, supports 256K flash program memory, 8K
data memory and hardware debugging. It also supports for the
lasted version of ZigBee 2007 Pro protocol.
2) Power supply: The range of power supply is from 2.0V
to 3.6V. It has three kinds of power management mode: wake

Authorized licensed use limited to: Polytechnic University of Bucharest. Downloaded


1565on July 27,2023 at 05:40:36 UTC from IEEE Xplore. Restrictions apply.
parent node is selected, and a network request is sent. If the
node is joined to the network successfully, the node is set to
sleep mode to wait for an interrupt. When sleeping time is
coming, response to an interrupt is executed and the node is
activated. Finally, the node starts to collect the data and sends
the data to its parent node. If sending data is failed, the
sending operation is repeated until the data is sending
successfully. The router is used to accept the endpoint to enter
the network, and collect and forward the data. Its network
Figure 4. System Schematics
flowchart doesn’t repeat here. The endpoint’s program
flowchart is shown in Figure 6.
V. THE SYSTEM SOFTWARE DESIGN
Y
A. Flowchart of coordinator node Initialize Send packets
Node success?
The coordinator is a full-function device (FFD) and the N
core of the network, which is responsible for the establishment
and the management of the network. The endpoints and Scan
routers can issue binding application signals and join the Channel
Send data
network after the coordinator sets up the network successfully.
It can receive data from routers and endpoints and complete
the data storage and processing. Finally, it sends the data N
Receive
receiving from RS232 serial to PC for further processing and Frame? Collect gas
analysis [10].The coordinator should always be in the active information
state, listening for wireless and serial data. Its design flowchart Y
is shown in Figure 5.
Join parent
node
Wake up node

Send network Y
request
N
Time interrupt?

N Join network
success?
Set sleep mode

Figure 6. Program Flow Chart of Endpoin

C. Part of Software Program Code


The Embedded Workbench is used as 8051 integrated
development environment in the system developing and the
open source C language streamline protocol stack introduced
Figure 5. Program Flow Chart of Coordinator by TI can be used to complete the procedures for the
preparation. The system modifies the code of application
layer, writes the code of the ADC collection and endpoint’s
B. Flowchar of Endpoints
information accepted by the coordinator. It has the advantage
The endpoint is responsible for the data collection such as of good portability and readability. The solution takes the
the gas concentration, temperature and the other parameters. advantage of low-power mode, uses the event polling
After the data is simply processed, it is sent to its parent node mechanism, and each layer comes into the low power mode
through the wireless channel. The software workflow is as after initialization. Once the event occurs, the system is
followed: Firstly, the node initialization operation is carried aroused up and the interrupt event handling starts.
out, including hardware, protocol stack, interrupt. Secondly, Consequently, the system will enter low-power mode after the
channel scanning is executed and it is determined whether the
node receives the beacon frame. If receiving is allowed, the

Authorized licensed use limited to: Polytechnic University of Bucharest. Downloaded


1566on July 27,2023 at 05:40:36 UTC from IEEE Xplore. Restrictions apply.
end of the interruption. In this software architecture the power basicRfConfig.channel = appSelectChannel();
consumption can greatly be reduced. int_enable(INTS_ALL);
After the devices is connected to the personal computer //enable all interrupts.
(PC), and when the software begins to run, the function (void appMode = appSelectMode();
main ()) is called. It is important to note that the essence of the //Select mode.
ZigBee protocol stack is operating system OSAL task if(appMode == MODE_TX)
scheduling. Therefore, the initialization of the operating //Transmitter application
system in the preparation is particularly important before the {
main loop processing functions begins. The protocol stack appTransmitter(); //No return from here.
work flowchart is shown in figure 7. }
Parts of the software program code are as follows: else if(appMode == MODE_RX)
void main() //Receiver application.
{
appReceiver(); //No return from here.
}
HAL_ASSERT(FALSE);
//Role is undefined .This code should not be reached.
}
VI. CONCLUTIONS
With the use of ZigBee’s wireless communication
technology, the system monitoring and networking for the
combustible gas concentration, temperature, humidity, etc. is
completed, the real-time and flexible wireless sensor network
is ensured. And the disadvantage of the wired data acquisition
system can be overcome. The results of the study show that:
with the use of the ZigBee wireless sensor network, the
solution is more convenient for the data’s automatic
collection, processing, analysis, and the solution has the
advantages of high reliability, a wide range of acquisition and
low cost. Meanwhile, the corresponding system has a good
portability.
REFERENCES

[1] Wenzhong Li, Chaoyu Duan, “Introduction and actual combat of ZigBee
wireless network technology,” Beijing: Beijing aeronautics and
astronautics press, 2007.
[2] Chun Jin, Zuqiu Luo, Feng Luo, “Analysis of ZigBee technology and
case,” Beijing: National Defence Industry Press, 2008.
[3] Xiuli Ren, Haibing Yu, “Study of realizing technology on ZigBee
wireless communication protocol,” Computer Engineering and
Figure 7. Flowchart of Protocol Stack Application, vol.43, pp. 143–145, 2007.
[4] Que Lei, Shengde Liu, Xianbing Hu, “ZigBee technology and
{ application,” Beijing: Beijing aeronautics and astronautics press, 2007.
basicRfConfig.panid = PAN_ID; [5] Zhiqing He, “ Development and research of constable gas monitoring
system based on ZigBee,” Shenyang university of technology.
// initialization wireless network ID number Shengyang: Master thesis, 2010.
basicRfConfig.ackRequest = FALSE; [6] http://focus.ti.com/docs/prod/folders/print/cc2530.html, “CC253X
halBoardInit(); User’s Guide [Rev.A],” June 2010.
//initialize board peripherals. [7] Doo Seop Yun, Sung Ho Cho, “A data transmission method in zigbee
if(halRfinit() == FAILED) networks using power efficient devices.advanced technologies
communications, pp.162–165, 2008.
{
[8] De Liu, “ ZigBee Net working technology based on CC2530,”
HAL_ASSERT(FALSE); Programmable Controller & Factory Automation, pp. 93-95, 2012.
} [9] R. Challooa, A. Oladeindea, N. Yilmazera, S. Ozcelikb, and L.
HalLedSet(1); Challooc, “An Overview and Assessment of Wireless Technologies and
//Indicate that device is powered. Co- existence of ZigBee, Bluetooth and Wi-Fi Devices,” Procedia
while( halButtonpushed() != HAL_BUTTON_1); Computer Science, vol.12, pp. 386–391, 2012.
halMcuWaitMs(350);
//Wait for user to press S1 to enter menu;

Authorized licensed use limited to: Polytechnic University of Bucharest. Downloaded


1567on July 27,2023 at 05:40:36 UTC from IEEE Xplore. Restrictions apply.
[10] Longkang Wang, Baisheng Nie, Zhang Ruming, Zhai Shengrui , and Li Engineering,vol.26, pp.2046–2414, 2011.
Hailong, “Zigbee-Based Postioning System For Coal Miners,” Procedia

Authorized licensed use limited to: Polytechnic University of Bucharest. Downloaded


1568on July 27,2023 at 05:40:36 UTC from IEEE Xplore. Restrictions apply.

You might also like