The design of network coordinator based on CC2420 radio frequency chip and S3C2440 chip

There are various wireless communication methods. Compared with Bluetooth, Wi-Fi, and GSM mobile communication methods, the ZigBee method formulated by the ZigBee Alliance has the advantages of low power consumption, reliable data transmission, good compatibility, low implementation cost, and convenient networking. Very suitable for wireless sensor networks with low rate transmission. The ZigBee Alliance was established in 2001. Invensys, Mitsubishi Electric, Motorola, and Philips Semiconductors joined in 2002 and are now rapidly growing.

Authors: Wang Ping, Wu Yi, Shi Wenzao, Cheng Mingchuan, Jiang Huali

1 Overview

There are various wireless communication methods. Compared with Bluetooth, Wi-Fi, and GSM mobile communication methods, the ZigBee method formulated by the ZigBee Alliance has the advantages of low power consumption, reliable data transmission, good compatibility, low implementation cost, and convenient networking. Very suitable for wireless sensor networks with low rate transmission. The ZigBee Alliance was established in 2001. Invensys, Mitsubishi Electric, Motorola, and Philips Semiconductors joined in 2002 and are now rapidly growing. This alliance researches and develops other high-level protocols suitable for wireless sensor networks on top of the PHY layer, MAC layer and data link layer based on IEEE 802.15.4.

The two standards of the physical layer are 2. 4 GHz and 868/915 MHz, both are based on the direct sequence spread spectrum DSSS (Direct Sequence Spread Spec-trum) technology, and use the same physical layer data packet format. 2. The 4 GHz band is a globally unified ISM frequency band that does not need to be applied for, which is helpful to the promotion of ZigBee equipment and the reduction of production costs. Its physical layer can provide a transmission rate of 250 kb/s through the use of 16-phase high-order modulation technology, which helps to obtain higher throughput, smaller communication delays and shorter working cycles, thereby saving more power.

The ZigBee Alliance defines two types of physical devices: Full Function Device (FFD) and Reduced Function Device (RFD). The star topology of the ZigBee network usually consists of one FFD and several RFDs. FFD acts as a network coordinator function, other devices only communicate with the coordinator, and the coordinator decides what to do. If a terminal device needs to transmit data to another terminal device, it will send the data to the coordinator, and then the coordinator will forward the data to the target receiver terminal device. Through FFD relay transmission, the network can be expanded into other topological structures, as shown in Figure 1.

The design of network coordinator based on CC2420 radio frequency chip and S3C2440 chip

With the development of ZigBee research and development, in 2005, major chip manufacturers launched transceiver modules and communication kits that comply with the ZigBee standard, but currently only the Norwegian Chip-con company (CC2420/CC2430 and CC2500/CC2550, etc.), the United States Freescale semiconductor The company’s (MC13192 and MC13193), American CompXs (ML7065) and American Ember (EM2420) four original equipment manufacturer (OEM) ZigBee kits meet the standards set by the alliance. In 2007, Texas Instruments (TI) announced the launch of a free download version of the ZigBee protocol stack (Z-Stack).

2 Design and debugging

2.1 Research goals

The main function of the network coordinator is to coordinate the establishment of the network. Other functions include: transmitting network beacons, managing network nodes and storing network node information, and providing routing information between associated nodes; in addition, the network coordinator should store some basic information , Such as node data equipment, data forwarding table and equipment association table, etc.

The problem is that the current ZigBee protocol is mainly implemented on low-end 8-bit or 16-bit microcontrollers. For the network coordinator node, its data processing ability is not strong, and limited to its own hardware resources, it is rarely able to achieve a good human-computer interaction interface. For ZigBee coordinators with high functional requirements, this architecture is difficult to meet the needs of applications. The PC-based network coordinator node is not only large in size, high in price, and high in power consumption. It is a waste of resources for sensor networks with low transmission rates. Therefore, a network based on the ARM series embedded chips as the core microprocessor is developed. The coordinator is necessary. The experiment is based on a star structure. On the basis of realizing the RFD function, the ARM9 embedded network coordinator is developed, and a 3.5-inch TFTLCD touch screen is provided as a human-computer interaction to Display the working status and test parameters of other nodes. Provide a platform for advanced applications.

2.2 Coordinator hardware structure

Originally design the radio frequency chip to choose the CC2420 (2.4 GHz, support 250 kb/s data transmission rate) of Norway Chipcon Company. The microprocessor adopts S3C2440 embedded industrial grade chip. The hardware block diagram is shown in Figure 2, ARM (left) + RFD (right) = ARM embedded network coordinator.

The design of network coordinator based on CC2420 radio frequency chip and S3C2440 chip

2.3 Coordinator software structure

Using embedded Linux operating system, based on TI’s ZigBee protocol stack, modify the file system on the original Bootloader and Kernel, add GUI applications, and modify the system startup script to make the applications run automatically when the system starts. The realization of the network coordinator uses multi-threading technology, serial port data sending and receiving, GUI Display and button response, ZigBee node disconnection detection 3 threads concurrently to improve the system response speed. The software structure is shown in Figure 3.

The design of network coordinator based on CC2420 radio frequency chip and S3C2440 chip

2.4 System data flow

The MAC frame format consists of the following basic parts:

①MAC Header (MHR), including frame control field, sequence number and address information;
②MAC payload (variable length), the information contained in it specifies the type of frame;
③MAC layer frame tail (MAC footer, MFR), contains a frame check sequence.

Among them, MHR has a fixed order, and not all frames include address fields. The general MAC frame format is shown in Figure 4.

The design of network coordinator based on CC2420 radio frequency chip and S3C2440 chip

2.5 Definition and analysis of system ZigBee frame format

In the design of RFD, ZigBee device adopts 16-bit short address, load the sampling voltage value from photoresistor, it is 2 bytes, FCS is checked automatically by CC2420. Therefore, the frame length used in this design is 15 bytes. The data format that defines the ZigBee frame is as follows:

The design of network coordinator based on CC2420 radio frequency chip and S3C2440 chip

Connect the RFD node and the PC through the serial port, and use the serial debugging assistant to observe the frame similar to the following format:

41 88 0A 01 OO 01 OO 00 OO 00 00 E2 03 F9 EB

The first 2 bytes (88 41) are the frame control field, the third byte (OA) is the frame sequence number, the 4 to 5 bytes (00 01) are the PAN ID of the destination address, and the 6 to 7 bytes are the destination address ( 00 01), 8-9 bytes (00 00) are the PAN ID of the source address, 10-11 bytes (00 00) are the source address, 12-13 bytes (03E2) are the load, and 14-15 bytes ( F9 EB) is the check digit.

2.6 Data flow and software flow of the coordinator

The data frame transmitted by the RFD is received through the antenna, and it is automatically verified by the CC2420. If it is correct, it will be decoded and decoded, and then sent to ATmega128L via SPI interface, and then sent to S3C2440 via serial port UART1. After data processing, it will be displayed on the corresponding LCD touch screen. The software flow of the coordinator is shown in Figure 5.

The design of network coordinator based on CC2420 radio frequency chip and S3C2440 chip

3 Experimental results

When two RFDs enter the monitoring range of the network coordinator, two green balls will be displayed in the LCD, as well as the corresponding address, data and other information. In the same way, when the RFD is removed or stopped, the two green balls will disappear from the LCD at the same time.

4 summary

This design refers to TI’s ZigBee protocol stack. After completing the RFD function, it adds the ARM9 chip and peripheral circuits to expand to become a wireless sensor network coordinator. This coordinator has rich functions: LED can indicate the working status, the processor can increase the calculation speed, the LCD can be human-computer interaction, and the network port can be connected to the Internet. Therefore, not only can the overall performance of the network be improved, but it also provides a foundation for future applications. The application prospects of sensor networks are very broad, and they can be widely used in military, environmental monitoring and forecasting, health care, smart home, building condition monitoring, complex machinery monitoring, urban traffic, space exploration, large-scale workshop and warehouse management, as well as airports, large-scale Safety monitoring of industrial parks and other fields. With the in-depth research and wide application of sensor networks, sensor networks will gradually penetrate into all areas of human life.

The Links:   FP50R12KS4C G150XG01-V2

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *