Construction and application of wireless sensor network based on ZigBee technology

Publisher:CelestialSoulLatest update time:2012-04-20 Source: 电子工程师 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

The market development of wireless networks can be logically divided into two categories: voice-oriented market and data-oriented market. In many wireless networks that are mainly used for data transmission, small, low-cost, and low-complexity wireless networks are widely used. ZigBee is one of the representative short-range wireless communication technologies, and its network standard is specified by IEEE802.15.4. The ZigBee protocol is simpler and more practical than Bluetooth, high-speed PAN (personal area network) or IEEE802.11x wireless LAN.

1 IEEE802.15.4 Standard and ZigBee Technology

The IEEE802.15.4 technical standard developed by the IEEE Wireless PAN Working Group is the basis of ZigBee technology, which aims to provide low-speed connections with an effective coverage range of about 10m for simple low-energy devices.

1.1IEEE802.15.4 protocol architecture and its technical features

IEEE802.15.4 meets the ISO (International Organization for Standardization) OSI (Open Systems Interconnection) reference model. It defines a single MAC (Media Access Control) layer and multiple physical layers, as shown in Figure 1.

The MAC layer of IEEE802.15.4 can support multiple LLC standards, carry the LLC standard of IEEE802.2 Type 1 through the SSCS (Service-Specific Convergence Sublayer) protocol, and allow other LLC standards to directly use the MAC layer services of IEEE802.15.4.

IEEE802.15.4 defines two standards for the 2.4 GHz physical layer and the 868/915 MHz physical layer. Both are based on DSSS (direct sequence spread spectrum) and use the same physical layer data packet format. The differences are in the operating frequency, modulation technology, spread spectrum chip length and transmission rate. The 915/868 MHz band is based on differentially coded BPSK (binary phase shift keying), and the 2.4 GHz band uses hexadecimal quadrature modulation. The 2.4 CHz band has 16 different channels and is a globally unified ISM (industrial, scientific, and medical) band that does not require application. The use of high-order modulation technology can provide a transmission rate of 250 kbit/s, which helps to obtain higher throughput, smaller communication delays and shorter working cycles, thereby saving more power. 868 MHz is the ISM band in Europe with only one channel, and 915 MHz is the ISM band in the United States with 10 channels. The introduction of these two bands avoids mutual interference among various wireless communication devices near 2.4 GHz. The transmission rate of 868 MHz is 20 kbit/s, and that of 916 MHz is 40 kbit/s. The wireless signal propagation loss in these two frequency bands is relatively small, so the requirements for receiver sensitivity can be reduced, and a longer effective communication distance can be obtained, so that a given area can be covered with fewer devices.

1.2 ZigBee Technology

ZigBee technology is a short-range, low-complexity, low-power, low-data-rate, low-cost two-way wireless communication technology. It is mainly suitable for the fields of automatic control and remote control. It can be embedded in various devices and supports geolocation. Compared with various existing wireless communication technologies, ZigBee technology will be the technology with the lowest power consumption and cost.

The ZigBee protocol suite consists of high-level application specifications, application convergence layer, network layer, data link layer and physical layer, as shown in Figure 2.

a) Physical layer: It complies with the IEEE802.15.4 protocol and is the lowest layer of the protocol. It is responsible for interacting directly with the outside world, controlling the operation of the RF transceiver, and adopting spread spectrum communication. The signal transmission distance is 50m indoors and 150m outdoors.

b) MAC layer: complies with the IEEE802.15.4 protocol, is responsible for the establishment, maintenance and termination of wireless data links between devices, data transmission and reception in confirmation mode, optional time slots, low-latency transmission, and support for various network topologies. Each device in the network is addressed by a 16-bit address.

c) Network layer: establish new networks, handle nodes entering and leaving the network, set the node's protocol stack according to the network type, enable the network coordinator to assign addresses to nodes, ensure synchronization between nodes, provide network routing, ensure data integrity, and use optional AES-128 to encrypt communications. [page]

d) Application layer: The application support layer maintains the functional properties of the device, discovers the working of other devices in the workspace of the device, enables communication between multiple devices based on services and requirements, and is developed by the user based on specific applications.

2 ZigBee Network Structure

Zigbee supports three network topologies: star network, peer-to-peer network and hybrid network. Figure 3 shows a hybrid ZigBee network. Each network has its own advantages. A star network uses a powerful master device as the center of the network, responsible for coordinating the work of the entire network, and other master devices or slave devices are distributed within its coverage. The control and synchronization of this network are relatively simple, and it is suitable for occasions with a relatively small number of devices. Peer-to-peer networks are divided into point-to-point and cluster tree types, which are connected by master devices. This network can provide higher reliability. The combination of star network and peer-to-peer network forms a hybrid network, in which each subnet is connected in a star shape, and the master devices are connected in a peer-to-peer manner. This network is suitable for situations with the most complex network requirements. Generally, in real application environments, hybrid types have greater practicality.

The nodes in the wireless sensor network are realized by the cooperation of the software layer and the hardware layer. When the ZigBee chip is used to build a wireless sensor network, the ZigBee chip hardware has some functions of the physical layer and MAC layer built in, and other high-level functions are solved by the external MPU. The high-level protocol of ZigBee is realized by writing to the MPU. Figure 4 is a diagram of the internal structure of the node.

Node applications are devices that perform different functions depending on the location being monitored (such as temperature, sound, vibration, pressure, motion, or pollutants). These devices are usually small and cheap, can be manufactured and deployed in large quantities, so their resources (energy, storage, computing speed, and bandwidth) are severely limited. Each node has a radio transceiver, a small microcontroller, and an energy source (usually a battery). These devices help each other transmit data to a monitoring computer.

Since most nodes only need to have data transmission functions and do not need control capabilities, ZigBee technology divides nodes into three categories based on devices (see Figure 3):

a) RFD (Reduced Function Device). RFD has small memory and low power consumption. It acts as a source node in the network, only sending and receiving signals, and does not act as a repeater/router.

b) FFD (Full Function Device). In the network, FFD is a node with forwarding and routing capabilities, with sufficient storage space to store routing information, and the processing and control capabilities are also enhanced accordingly.

c) Network host or gateway. ZigBee also supports a third type of node, the network host or gateway node, which interfaces with external systems or coordinates routing with other networks. FFD sometimes acts as a gateway.

A network only needs one network coordinator, and other terminal devices can be RFD or FFD. The price of RFD is much cheaper than FFD, and it only occupies about 4kB of system resources, so the overall cost of the network is relatively low.

Typically, the underlying FFD and RFD will be controlled by an MCU (microcontroller) that is connected to the ZigBee transceiver via a queued QSPI (serial peripheral interface). The choice of MCU depends on whether the device is an FFD with a ZigBee network layer underneath it. The basic RFD is usually controlled by an 8-bit MCU, but for FFDs, the control unit can be an 8-bit, 16-bit or low-end 32-bit MCU depending on its complexity and the network it is connected to.

The PAN coordinator is responsible for coordinating the entire network and communicating with the central control point, so it is the key to building a ZigBee network. The key requirements for the PAN coordinator include:

a) In larger and more complex systems (such as a manufacturing site), the central control point is likely to be beyond the coverage of the ZigBee network and may even be placed in another building. Therefore, the PAN coordinator may need to communicate with the central control point through a wired connection. Because Ethernet is becoming more and more popular in the industrial market, Ethernet is the most likely choice in most cases. The application of Ethernet in the system brings two potential impacts to the network design: first, it is necessary to consider the processor bandwidth required to handle the Ethernet interface; second, to drive the Ethernet interface, the network will need the corresponding low-level driver and protocol stack, which increases the demand for program memory for the PAN controller in the system.

b) Drive the communication of the entire PAN network. Because a large PAN network will increase the amount of communication, the PAN coordinator requires a higher bandwidth.

[page]

c) Label the entire ZigBee PAN. The PAN coordinator must store a "map" of the entire network and identify which nodes in the network are FFDs or RFDs and the functions of each part. For complex and large industrial systems, more memory will be required to store such a map.

d) The ability to dynamically establish links with new nodes in the network. During the life cycle of a large system, new nodes may need to be added to the system. The PAN coordinator must be able to easily establish connections with these new nodes, no matter where they are in the network, and no matter whether they are FFDs or RFDs. In addition, the PAN coordinator must be able to determine the responsibilities of these new nodes in the network. In order for the PAN coordinator to perform this task effectively, it requires a larger program memory and must also have the ability to access this memory.

A ZigBee-based WPAN (Wireless Personal Area Network) can support up to 254 nodes, plus a full-featured device, to achieve two-way communication. The full protocol is used for 4kB of a basic node that can be directly connected to one device at a time or 32kB of a coordinator that acts as a hub or router. Each coordinator can connect up to 255 nodes, and several coordinators can form a network, with no limit on the number of routing transmissions.

3. Building a wireless sensor network based on ZigSee chip

The wireless sensor network built on ZigBee chip is a wireless network composed of a group of ZigBee nodes in AdHoc mode. Its purpose is to collaboratively sense, collect and process the information of the sensed objects in the geographical area covered by the network, and publish it to the observers. Sensors, sensed objects and observers are the three basic elements of sensor networks; the communication between sensors and observers is wireless, which is used to establish a communication path between sensors and observers; collaborative sensing, collection, processing and publishing of sensed information are the basic functions of sensor networks. A group of sensors with limited functions collaboratively completing large sensing tasks is an important feature of sensor networks. Some or all nodes in the sensor network can move, and the topology of the sensor network will also change dynamically with the movement of nodes. Nodes communicate in AdHoc mode. Each node can act as a router, and each node has the ability to dynamically search, locate and restore connections.

The wireless sensor network built based on ZigBee chips can use GSM (Global System for Mobile Communications) networks, CDMA (Code Division Multiple Access) networks, Ethernet, etc. to realize data transmission and control (see Figure 5). The network can adopt a star or hybrid topology and a communication method that wakes up the ZigBee module when needed, effectively reducing the power consumption of each ZigBee sensor node and reducing the probability of collision between sensor nodes when reporting data to the sink node.

The central control center is connected to multiple sink nodes through the network. The sink nodes and sensor nodes realize wireless information exchange through ZigBee technology. The wireless sensor nodes with RF transceivers are responsible for sensing and processing data and transmitting them to the sink nodes. The control center obtains the collected relevant information through the network to realize effective control and management of the site. The sink nodes distributed in the sensor network are mainly used to receive the data reported by the sensor nodes, and perform fusion processing on them, and transmit them to the wireless communication data transmission module, and then transmit them to the central information control center through the network. The connection between the ZigBee module and the MCU is realized through the asynchronous serial port. The communication speed between them is 38.4kB/s. The MCU controls the communication module to complete the communication between the sink node and the central control center. Since there are multiple sink nodes distributed in the sensor network, the 16-bit MCU must use software interrupts to realize polling and scanning of the uploaded data of sink nodes with different IDs, so that the data of the sink nodes can be processed by the MCU in an orderly and complete manner and then transmitted. The sink node acts as a gateway between the sensor node and the network in this sensor network.

Recently, Xuang has successfully developed a ZigBee to Ethernet module, which mainly uses the information collected by the ZigBee wireless sensor network to upload to the Internet through the TCP/IP protocol. No matter where you are in the world, you can use the ZigBee to Ethernet module for real-time remote monitoring. You can also use the Sie-mens TC35 module as a data transmission terminal through the GSM network to quickly and reliably transmit data in the sensor network. Use the MSP430 MCU to control the TC35 module to complete the communication between the sink node and the central control center.

4 Conclusion

The combination of wireless sensor networks and ZigBee technology has broad application prospects. This paper mainly discusses the construction and application of wireless sensor networks based on ZigBee technology. According to the ZigBee protocol, the Zig-Bee wireless sensor network node structure is proposed, and the control and collection of information through the ZigBee wireless sensor network in a larger range via the GSM network, CDMA network or Ethernet is discussed. This method has strong applicability in reality. In the near future, more and more devices with built-in ZigBee functions will be put into use, which will greatly improve our lifestyle and experience.

Reference address:Construction and application of wireless sensor network based on ZigBee technology

Previous article:Communication Design between Intelligent Instrument and Kingview Based on MSP430
Next article:Design of wireless data transmission system based on MSP430 and nRF905

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号