Design and application research of wireless network node based on ZigBee

The former GSM and 3G and other wireless mobile communication technologies and wireless local area network technologies such as Bluetooth, WiFi, and Ad-hoc are widely used, but their equipment systems are complex, power consumption is large, and the cost is high, which is not suitable for some low data rates and communication. Smaller areas, such as sensor networks, home automation, and toys. The ZigBee network only needs one network coordinator in the communication process to establish the network and manage and coordinate the data transmission of the entire network, without the need for expensive and bulky base stations.

Authors: Liang Guangsheng, Liu Danjuan, Hao Fuzhen

At present, wireless mobile communication technologies such as GSM and 3G, and wireless local area network technologies such as Bluetooth, WiFi, and Ad-hoc are widely used, but their equipment systems are complex, power consumption is high, and cost is high. Smaller areas, such as sensor networks, home automation, and toys. The ZigBee network only needs one network coordinator in the communication process to establish the network and manage and coordinate the data transmission of the entire network, without the need for expensive and bulky base stations. The network coordinator is not only the master node in the network, but also the gateway node that interconnects the network with other wired or wireless networks. ZigBee is a low-complexity, low-power and low-cost low-speed wireless connection technology. The development and application of wireless systems based on ZigBee technology has become a research hotspot.

1 ZigBee technology

ZigBee is an emerging short-range, low-rate wireless networking communication technology. It is a technical proposal between wireless tagging technology and Bluetooth. Mainly used for short-range wireless connections. It has its own wireless standard that communicates through coordination among thousands of tiny sensors. These sensors require very little energy and relay data from one sensor to another via radio waves, so the communication is very efficient. ZigBee is a wireless data transmission network platform composed of up to 65 000 wireless data transmission modules, similar to the CDMA network or GSM network of mobile communication. Each ZigBee network data transmission module is similar to a base station of a mobile network, and within the entire network range, they can communicate with each other; the entire ZigBee network can also be connected with various other existing networks.

2 Hardware Design of ZigBee Wireless Network Node

2.1 Overall design of hardware system

Figure 1 is the overall block diagram of the hardware system of the ZigBee wireless network node. The system consists of CC2430 device modules and wireless transceiver modules. The CC2430 RF device module consists of the CC2430 device and related peripheral circuits. Although CC2430 integrates a wireless transceiver and 805l core, it can simplify the circuit design, and can communicate without adding an interface circuit between the single-chip microcomputer and the wireless transceiver, but the communication distance is limited. After measurement, it is found that the communication distance between two network nodes in the open ground is 10-100 m, which sometimes cannot meet the application needs. A first-level interface circuit, that is, a wireless transceiver module, is added between the CC2430 device and the antenna to amplify the power of receiving and sending information, thereby increasing the data transmission distance.

2.2 CC2430 device module

The circuit principle of the CC22430 device module is shown in Figure 2. The module mainly includes 3.3 V and 1.8 V power supply filter circuit, chip crystal oscillator circuit, balun circuit and reset circuit. The local oscillator signal of the chip can be provided by an external active crystal or by an internal circuit. Here, it is provided by the internal circuit, and an external crystal oscillator and two load capacitors are required. The size of the capacitor depends on the frequency of the crystal and the input capacitive reactance and other parameters. R2 and R3 are bias resistors, and resistor R3 is mainly used to provide a suitable operating current for the 32 MHz crystal oscillator. Use a 32 MHz quartz resonator (X1) and 2 capacitors (C9 and C10) to form a 32 MHz crystal oscillator circuit. Use a 32.768 kHz quartz resonator (X2) and two capacitors (C7 and C8) to form a 32.768 kHz crystal oscillator circuit. The transmission and reception of CC2430 RF signals are transmitted in differential mode. The optimal differential load is 115+j180 Ω, and the impedance matching circuit should be adjusted according to this value. The design uses a 50Ω monopole antenna. Since the differential RF port of the CC2430 has two ports, and the antenna is a single port, a balun circuit (balanced/unbalanced conversion circuit) is required to complete the conversion from dual ports to single ports. The balun circuit consists of inductors (L1, L2, L3) and capacitors (C15, C17, C26).

CC2430 uses 1.8 V working voltage internally, which is suitable for battery-powered equipment, and the external digital I/O interface uses 3.3 V voltage to maintain compatibility with 3.3 V logic devices. CC2430 integrates a self-current regulator on-chip, which can convert 3.3 V voltage into 1.8 V voltage, so that equipment with only 3.3 V power supply can work normally without an external voltage conversion circuit. C1, C11, C15, etc. are decoupling capacitors, which are mainly used for power supply filtering to improve the working stability of the device.

2.3 Wireless transceiver module

When the CC2430 sends data, the signal changes from the differential radio frequency ports RF_P and RF_N to the single-ended signal through the balun circuit. The RXTX_SWITCH signal controls the two logic switches, gates the power amplifier circuit (PA), and the amplified signal is transmitted from the antenna. When receiving the signal, under the control of the RXTX_SWITCH signal, the signal received from the antenna is amplified by the low noise amplifier circuit (LNA), converted by the balun circuit, and received by the RF_P and RF_N ports. Figure 3 is a block diagram of the connection between the wireless transceiver module and the CC2430.

The circuit principle of the wireless transceiver module is shown in Figure 4. The circuit is mainly composed of two logic switch circuits, power amplifier circuit (PA), low noise power amplifier circuit (LNA), impedance matching circuit, power filter circuit and bias circuit. The power amplifier circuit adopts the power amplifier UP2202V of Bubec Company. The device is powered by 3.3 V power supply, which is the same as the power supply of CC2430. There is no need to design another power supply circuit. The output power of the 1 dB compression point is 23 dBm, the linear gain is 26 dB, and the internal input Matched to 50Ω.

The low-noise power amplifier circuit adopts the UA2723 of Bubec Company, the device uses 3.3v power supply, the internal input and output have been matched to 50 Ω, no impedance matching is required in the design, and the frequency range is 0.05-4 GHz. The power gain is 20 dB at 2 GHz, and the output power at the 1 dB compression point at 2.5 GHz is greater than -1.5 dBm.

In order to ensure the sensitivity of the low noise power amplifier, the 3.3 V power supply is adjusted by Richtek’s ultra-low noise, low quiescent current power supply regulator RT919333PB, and then sent to the UA2723, as shown in Figure 5.

3 Software Design of ZigBee Wireless Network Node

3.1 ZigBee protocol stack

The ZigBee protocol consists of a set of sub-layers. Each layer provides a specific set of services for its upper layer; data entities provide data transfer services; management entities provide all other services. Each service entity provides a service interface for its upper layer through a service access point (SAP), and each SAP provides a series of basic service instructions to complete the corresponding functions.

The architecture of ZigBee protocol stack includes: ZigBee application layer, ZigBee network layer, IEEE. 802.15.4 MAC layer and IEEE802.15.4 PHY layer. IEEE. The 802.15.4 2003 standard defines the bottom two layers: the physical layer (PHY) and the medium access control layer (MAC). The ZigBee Alliance provides the design of the network layer and application layer (APL) framework. The application layer framework mainly includes 3 parts: Application Support Sublayer (APS), ZigBee Device Object (ZDO) and the application object formulated by the manufacturer.

3.2 ZigBee channel assignment

The communication frequency of ZigBee is specified in the physical layer, and ZigBee provides different operating frequency ranges in different countries or regions. The frequency ranges used are 2.4 GHz and 816/915 MHz. Therefore, 2 physical layer standards of 2.4 GHz and 816/915 MHz are defined in ZigBee, and they are all based on direct sequence spread spectrum (DSSS) technology.

The globally unified 2.4 GHz band is used here, and there is no need to apply for the ISM band, which is suitable for ZigBee equipment promotion and production cost reduction. The 2.4 GHz physical layer adopts 16-phase modulation technology, which can provide a transmission rate of 250 kb/s, improve data throughput, shorten communication delay and data sending and receiving time, and reduce power consumption.

3.3 Network establishment and joining

ZigBee devices pass NLME-NETWORK-FORMATION. request primitive to initiate the establishment of a new network. An attempt to establish a new network should only be attempted if there is a device with ZigBee coordinator capability and there is currently no connection to the network. If the process is started by another device, the network layer management entity will terminate the process and issue an illegal request report to its upper layer.

This step is performed by issuing an NLME-NETWORK-FORMATION with a status parameter of INVAUD_REQUEST. confirm primitive to complete. Only when the device is a ZigBee coordinator or router can an attempt be made to allow the device to connect to the network. Available through NLME-PERMIT-JOINING. The request primitive allows connections.

3.4 Data transmission and reception

When sending data, first construct frame data according to the frame format specified in the protocol. Frame data includes frame header and frame content. The frame header includes frame type, source address, destination address, PAN, CLUSTERID and other information. After the frame is constructed, the primitive MCPS-DATA of the MAC layer is called. request, and pass the received result through MCPS-DATA. confirm returns. In Z-Stack, the sending and receiving of data must be called through the application layer. The Flash sending function provided by the application layer is as follows:

In order to receive data, a device must turn on its receiver. The upper layer uses NLME-SYNC. The request primitive initializes the device and turns on its receiver. This primitive will cause the network layer to use MLME-POLL. The request primitive polls its parent device. The network layer of the ZigBee coordinator or router must ensure that the receiver is always in the receiving state at all times.

The network layer uses NLDE-DATA. The indication primitive indicates the received data frame to its higher layers. Once the frame information is received, the network layer data entity will check the value of the security subfield in the frame control field. If the value is not zero, the network layer data entity will pass the frame to the security service provider and process it securely according to the specified security standard.

After receiving the data sent by Flash, the network layer will calculate the data interval of the small light flashing according to the sent data. The source function program is as follows:

4 Conclusion

The ZigBee wireless network node designed in this paper is applied to the military vehicle-mounted recorder, which is used to transmit the data of the vehicle’s speed, fuel quantity, water temperature, and driving distance to the base station. After measurement, the data can be accurately transmitted to the base station within 292 m from the base station, which basically achieves the predetermined design goal.

ZigBee network nodes are simple in design, low in cost, and have a wide range of applications. They are suitable for home automation, health care services, wireless automatic meter reading systems, smart communities, wireless sensor networks, wireless industrial control, and smart labels. For example, in the field of precision agriculture, traditional agriculture uses isolated mechanical equipment without communication capabilities, and mainly relies on manpower to detect the growth status of crops. With the adoption of sensors and ZigBee networks, agriculture will gradually shift to an information- and software-centric production model. Farm with more automated, networked, intelligent and remotely controlled equipment.

The Links:   CLAA201WA03S PM20CEF060 DISPLAY-COMPANY