Design of Data Acquisition System Based on Zigbee for Wireless Sensor Networks

. With the continuous development of modern network technology, sensor technology and wireless communication technologies, the emergence and development of wireless sensor networks has been promoted. Among many wireless communication technologies, wireless communication technology featuring low power consumption, close proximity and low cost for ZigBee has attracted the research interest of researchers. Based on the current status of communication systems, based on the review and system analysis of wireless sensor networks, this paper proposes a ZigBee-based wireless sensor network data acquisition system, which avoids the reliability and installation of traditional wired sensor network data acquisition systems and shortcomings such as high maintenance costs and large wiring.


Introduction
In recent years, with the rapid development and integration of wireless communication technology and computer networks, Wireless Sensor Networks (WSN) is rapidly emerging and its knowledge is highly integrated, involving multiple disciplines and has become an internationally-recognized research.In people's daily life environment, the demand for wireless data communication is increasing.Wireless data communication is widely used in many fields such as smart home, agricultural irrigation, intelligent meter reading, etc., which promotes the rapid development of wireless sensor networks.ZigBee technology stems from the technical needs of industrial automation control, industrial telemetry technology and remote control.In the process of cable data collection and transmission, there are a series of problems such as system wiring trouble, high cost, high power consumption and low flexibility.However, the traditional wireless data acquisition and transmission methods also have the disadvantages of complicated communication protocols, high system cost and large power consumption.Based on this, ZigBee wireless sensor network technology emerges as the times require, as a new short-range wireless communication technology has been widely used in intelligent control, wireless monitoring and environmental monitoring.Zig Bee wireless communication technology has the advantages of low cost, low power consumption, strong anti-interference and no royalty, making Zig Bee wireless sensor solution a more competitive advantage in data acquisition applications.

Zigbee technology overview
Compared with traditional wireless communication technologies, Zigbee is a wireless communication technology between electronic devices at a low transmission rate and in a short range.The technology not only has the advantages of short communication distance, low cost, small size and low power loss, but also has the advantage of flexible network layout, which makes up for the shortcomings of the previous monitoring system.Therefore, ZigBee is a low-cost, low-power, close-range wireless networking communication technology.This wireless technology has the characteristics of low cost, short distance, low speed, low power consumption, large network capacity, good security, short delay, flexible working frequency, etc.It is mainly used for personal area network and peer-to-peer network.One of the new technologies in wireless sensor networks.
The architecture of the ZigBee protocol stack is based on the standard open system interconnection seven-layer model, which only describes and standardizes four layers according to the needs of ZigBee technology.The ZigBee Alliance defines and designs the network layer and application layer framework of the protocol stack and defines security management specifications.The lowest two layers of the ZigBee protocol stack: the physical layer and the media access control layer are defined by the IEEE 802.15.4 standard.The ZigBee structure layering is shown in Figure 1.

data acquisition system design
The data acquisition system consists of two parts: system hardware design and system software design.The following two parts are introduced separately.

System hardware design
This design realizes the application of ZigBee data acquisition system by selecting TI's CC2420 chip.The CC2420 includes a 2.4 GHz DSSS RF transceiver and its sleep mode transitions to active mode for an extremely short time.This feature meets the low power and cost requirements of wireless sensor networks.In the wireless sensor network, the PDA data acquisition system can not only realize wireless communication with other nodes in the network through the CC2430 wireless RF module, but also can interact with the upper computer server in the system to perform real-time mobile monitoring within a certain range.Through ZigBee technology, a network is first established and then the child node module joins the network and the networking process is automatically performed without manual intervention.The overall design block diagram of the wireless data acquisition and transmission system is shown in Figure 2. According to the functional requirements of the data acquisition system, the hardware part of the system includes a data acquisition terminal, a data receiving system and a portable control.Among them, the data acquisition terminal circuit is mainly composed of power module, ZigBee wireless module, sensor interface circuit and other important modules.The data receiving end circuit also includes a serial port module and the like.The portable control circuit mainly includes key modules such as an input circuit and a liquid crystal display module.Among them, the most critical wireless module circuit consists mainly of CC2430 chip and its peripheral circuits.

System software design
A complete working system includes not only the hardware part, but also the software part.After the hardware part of the system is designed, the functions of the entire system are implemented by software.The reliability of the system and the degree of its intelligence depend on the reasonable design of the software architecture and the fault tolerance of the software code.
The development environment selected by the software implementation of this article is IAR Embedded Workbench (EW).Due to its internal C/C++ cross compiler and debugger, EW is the world's most recognized professional embedded application development tool.
In this paper, the star topology network structure is adopted.The task of the network terminal node is to apply to join the network where the coordinator is located and then transmit the collected data information to the coordinator.After the terminal node is started, first, hardware resources need to be initialized to determine the role of the device.Second, the terminal node scans the default channel to check whether there is an existing network and then applies to join the existing network and the coordinator allows to join.After the network, the network node is successfully added to the network.Finally, the terminal node sends a binding request to the coordinator.After accepting the binding request, the coordinator stores the address information of the terminal node in the address mapping table.After the binding is successful, the application is applied.The data can be sent without the destination address.
The software of the terminal node includes a collection program of the number and a wireless communication program between the coordinators.After the terminal node successfully joins the coordinator network, the data collection and communication program flow chart of the terminal node is shown in figure 3. The direct impact on the system life is the power consumption of the terminal data acquisition node.The microprocessor core of CC2430 uses 8051.The terminal node will not receive and process any data sent by the parent node due to the sleep timing.Information, so it is unrealistic to do a sleep wakeup scheme through the parent node.That is, if the terminal node can receive data in the sleep state, the node is still in the listening state and the design finally combines the sensor data collection of the terminal node with the node sleep mechanism and sleeps the terminal node by sleep timing.After the data collection is completed, the terminal node sends the collected data to its parent node.After the data is successfully transmitted, the terminal node starts to sleep.When the sleep time expires, the terminal node enters the next round of data collection and transmission.This can effectively reduce the power consumption of the terminal nodes of the wireless data acquisition system.Based on the above considerations, the terminal node selects the PM2 mode sleep mode and provides the clock frequency to the system through the low speed RC oscillator.In the practical application of the wireless data acquisition system, although the PM3 has the lowest power consumption, it cannot automatically enter the PM0 mode to enter and receive data.Therefore, the PM2 mode is an optimal choice.After the terminal node successfully joins the network, it sends data to the coordinator, sets the timer value, turns on all interrupts, sets the value of the sleep register, enters the low power state and then starts.Loop work.

Conclusion
According to the discussion in this paper, due to the short distance, small size, low power consumption and low price of ZigBee technology, the ZigBee-based wireless sensor network data acquisition system improves the intelligence of data collection and becomes one of the current research hotspots.It not only realized the technical value of ZigBee, but also expanded new ideas for data collection research and gradually applied to all aspects of life.

Figure 1 .
Figure 1.Zig Bee structure layering In addition to ZigBee technology, wireless communication technology includes many other

Figure 2 .
Figure 2. Wireless sensor network acquisition system

Figure 3 .
Figure 3. Terminal node acquisition and transmission data flow chart

Table 1 .
, such as Wi-Fi, Infrared Data Transmission (IrDA), Ultra-Wideband Technology (UWB) and Bluetooth.Table1shows the data comparison with other short-range wireless communication technology indicators.It can be seen from the comparison data that the low-cost and low-power characteristics of ZigBee technology have great advantages in some industrial environments and security systems.Therefore, the Zig-Bee wireless communication technology solution is a good choice.ZigBee compared with other short-range wireless communication technologies technologies