| Recently, with the rapid development of short-range wireless communication technology, embedded technology, computer network technology, microelectronic technology and sensor technology, wireless sensor network which is regarded as the integration of these technologies has become a promising international research area. The wireless sensor network is high-cross-multidisciplinary and high-concentrate-knowledge. It is considered to be one of the most important technologies of the 21st century which has a tremendous impact on the development of society. And it has been attached great importance by the academic and industry.Wireless sensor network is constituted by a large number of tiny sensor nodes which are distributed in the monitoring area. It is a self-organization multi-hop network and it transmits information by the way of wireless communication. It is able to perceive, collect and process the real-time information of the monitoring object in the coverage area and sent the information to the PC through the wireless network. ZigBee is a new kind of wireless communication technology. It is low-complexity, low-power and low-cost. Because of these features, it has become the best technology platform of wireless sensor network. ZigBee-based wireless sensor network technology is widely used in industry, agriculture, military, medical and other fields. There are three kinds of ZigBee network topology: star, tree and mesh. The star and the tree topology network are limited in coverage and the number of nodes, and are inflexible. If some nodes break down, the whole network will be paralyzed and the communication will be failed. However, the mesh topology ZigBee wireless network has a high coverage capability, and the routing is not unique, so it is flexible in configuration and it has more potential applications. Therefore, the mesh topology ZigBee wireless network has important theoretical and practical significance.In this paper, we firstly introduce the equipment category of ZigBee network, then compare three types of ZigBee network topology and analyze their respective characteristics. The reference model, layer interfaces and functions of PHY layer, MAC layer, network layer and application layer in ZigBee protocol stack are described in this peper. The ZigBee networking process which includes ZigBee coordinator creating a network, ZigBee coordinator or router allowing devices to join the network and the child devices adding to the network through the parent devices is discussed.The classifications of mesh topology networks and classical routing algorithms are analyzed in this paper. We combine the demand-driven routing algorithm (AODV) to ZigBee network and point out the shortage of this algorithm used in ZigBee network. Considering the characteristics of ZigBee network, we retain the main features of AODV algorithm and propose improved AODVjr algorithm. Some researches in the distributed address allocation mechanism of ZigBee network are also done, and specific examples are given. Then the routing process of Cluster-Tree algorithm is illustrated. Finally, combining the advantages of these two routing algorithm, the Cluster-Tree+AODVjr hybrid routing algorithm which is fit to the mesh topology ZigBee networks is proposed. The basic operation process of ZigBee node which is applied the hybrid routing algorithm is analyzed. The process is begun with routing process, then the node receives a routing request command frame, finally the node receives the routing response frame. In this paper, we study the ZigBee protocol stack and network layer routing algorithm, and produce the ZigBee nodes module on the basis of these research. These nodes are small, widely distributing and dynamic networking. The PIC18LF4620 SCM which is low power consumption is used as the main controller part, and CC2420 radio transceiver which is controlled through SPI interface is used for data transmission. The SHT11 is added to the ZigBee terminal node. SHT11 is a type of digital temperature and humidity sensor. By comparing with the traditional analog temperature and humidity sensor, for it is no need to design signal conditioning circuits, the node size and power consumption are reduced.In this paper, we use MpZBee V1.0-3.5 version of ZigBee stack protocol as the ZigBee network protocol. This type of ZigBee protocol stack meets the requirements of ZigBee technology, and is fit to the PIC18LF4620 microprocessor platform. It also has many advantages such as open source code, easy to transplant, easy to maintain and so on. The layers functions and the original language of protocol stack are studied, and then we add a suitable hybrid routing algorithm which is fit to the mesh topology network to the network layer. ZigBee terminal node is driven by the I2C bus to collect the temperature and humidity. At the same time, the PC program which is written by the LabVIEW virtual instrument software is used to display and process the information.One small ZigBee wireless sensor network which is mesh topology has been built in this paper. It is able to collect the information through temperature and humidity sensor and transmit the information by wireless network. We have also done a lot of experiments which are about ZigBee coordinator networking, node joining, and transmitting the information which is collected by the terminal node. All these experiments verify the effectiveness of the ZigBee networking processing and routing algorithm. And the reminder information of serial assistant and the LED state of ZigBee node are used to reflect the process which includes creating network, joining network and routing information. The monitoring platform can dynamically display the process of ZigBee node networking and the temperature and humidity information which is collected by the ZigBee terminals. By testing the performance of communication and analyzing the experiment results, all these indicate that the network has a lot of advantages such as ideal communication distance and coverage, high efficiency data transmission and low power consumption. |