TMCnet News

Research on the ZigBee Network and Equipment Design Based on the CC2530 [Sensors & Transducers (Canada)]
[April 22, 2014]

Research on the ZigBee Network and Equipment Design Based on the CC2530 [Sensors & Transducers (Canada)]


(Sensors & Transducers (Canada) Via Acquire Media NewsEdge) Abstract: It is known to us all that embedded systems designed on the 51 chip microcomputer are mature. This research finished to plant the system from 51 chip microcomputer to the CC2530 chip of TI. After analyzing and mastering the ZigBee 2007 PRO protocol stack, a new set of wireless sensor network (WSN) products has been developed. In the system, the coordinator can establish the Mesh network on its own initiative and the child nodes can join the network. The coordinator can be connected to the personal computer or the embedded gateway. The gateway had the Ethernet port and can send the data from the sensors to the cable or wireless network. The operator can issue instructions automatically and manually. The information of the sensor nodes can be returned and displayed on the serial debugging assistant. The equipment has passed the test with different environments in which there are obstacles among the communicating sensors and can be applied in the traffic, environmental monitoring and other fields widely. Copyright © 2013IFSA.



Keywords: CC2530, ZigBee Protocol Stack, Special Function Register (SFR), 51 chip microcomputer.

1. Introduction CC2530 is a real system-on-chip (SoC) solution, the version upgrading of the CC2430 [1], It provides a robust and complete ZigBee solution and ZigBee RF4CE remote control solution. Its system can program in the flash memory because of 8-KB RAM and many other powerful features. CC2530 has four different flash versions: CC2530F32/64/128/256. It has 32 / 64 / 128 / 256 KB flash respectively. It especially adapts to ultra-low power requirements of the system [2]. The short time for the transitions between operating modes ensures that low energy consumption.


The ioCC2530.h header file also applies to the LAR, Keil and SDCC compiler. The Keil development are commonly used for the 51 singlechip software which can solve the intelligent home gated security and defense system by sensors and GSM module [3]. The papers [4-6] implemented the wireless monitor system, distributed temperature detection system and soil temperature measurement based on the Zigbee wireless communication respectively. The paper [7] reported the development of a novel device, integrated into an insole, to monitor plantar pressure during stand and natural walking. To make the Meteosat Second Generation (MSG) infrared images to control the activation of the gauge sensors, the research [8] developed routing strategies for the Zigbee WSN. The designs [9, 10] used RFID, GPS, WiFi and ZigBee technique to do positioning detections. The ZigBee protocol is used to enhance the communication reliability in [11].

2. The Overall Hardware Design The wireless ZigBee communication network mainly includes the coordinator, the gateway, routers and terminal equipment. The each network has one and only one coordinator node and mainly responsible for starting the network, initializing parameters, managing information and maintenance and also helping establish security and application layers binding network. The coordinator node includes the processor modules, the RF module, power management module and the external interfaces. In this system, GPS / GPRS modules have been integrated into the gateway.

2.1. Description of the Functional Modules The wireless communication module includes the CC2530 Chip, 2.4GHz and the ceramic antenna. The design of CC2530EM is shown as the Fig. 1. The system has defined the data transmission based on the ZigBee 2007 protocol stack or ZigBee PRO stack. The system package achieves a dynamic network formed by the wireless communication nodes. And it also acquisis and transmits the data from the sensor. The CC2530 chip can connect the external 5 V power supply or two AA batteries. The hardware resources include 4 different colors of LED lights, UART serial port, DS18B20 temperature sensor, 10K adjustable resistor, buzzer, flash chips M25PE20, directional buttons, the debugging interface for the Zigbee module, the interface for the sensor module as same as the gateway board, pluggable GPS made by Switzerland ublox NEO chips module. The AM2302 temperature and humidity sensor module, TM121 single temperature module, ADXL345 three-axis accelerometer module, infrared modules and the matrix keyboard are connected with the SPI bus. The external key, the reset key and the external interrupt are fully utilized. All in all, the system is versatile, scalable and supports pluggable universal sensor interface up to eight different sensors. When the external power of each node is invalid, batteries can ensure the normal operation of the system. The interface for the coordinator node includes a serial port, power, the JTAG interface and maybe USB interface. When the computer has no serial port, for example, the laptop, the USB interface applies more conveniently and flexibly.

The coordinator can start the network. The child wireless sensor nodes try to join in the network. In order to test whether the network has been connected or not, the led lights indicate the status of the network. The hardware circuits are as shown in the Fig. 2. The motherboard of the node includes the memory chip m25pe20, DS18B20 temperature sensor, the extended interfaces for other sensors and multipoint configurations.

The circuit schematic designs provide users with a universal sensor interfaces for the SPI Bus. Users design their own pluggable modules to make the system versatile.

The gateway includes the GPRS, GPS, LCD screen and so on. Their types are SIM300, Ublox_NEO-5, TFT-40 and so on. Its main control chip is STC12C5A60S2 shown in the Fig. 3.

3. The Software Design for the Nodes and Research on how to Build Networks The program downloaded to the CC2530 nodes is finished on the IAR platform. The compiler abstraction determined the compiler to choose C program, C++ or extended C. In addition, assembly language compiler selects the compiling method in the IAR systems.

In the system, the definition of SFR is often using the macro to develop the function of the hardware. So the SFRBIT, XREG, PXREG and VECT are important concepts. The SFRBIT is the special function register bit. XREG is a null pointer to unsigned char volatile_xdata type. The PXREG is a pointer to the unsigned char volatile_xdata type. The VECT is the interrupt vector table, which contains the interrupt number and interrupts address. The SFR defined the port P0-P2, interrupt flag bit, timer, program status control word, but no P3 port.

To form the networks, the coordinator finishes the initialization of the network and nodes' joining the network. In the Fig. 4, its execution flow is on the left in the direction of the arrow. It scans a beacon request actively to determine whether there is the coordinator in the network or not. If there are no beacons detected in the scanning period, then the coordinator is itself. And it broadcasts beacons constantly. Then it scans the channel and detects the energy of the designated channel or the default channel to avoid the potential interference. And those channels exceeding the permissible level are discarded. The remaining channels are scanned actively to check whether there are other ZigBee networks existing. If not, the existing ZigBee network identifier (PANID) can be got. In this system, the running order of functions is as follows.

The child sensor node joins the network through two methods. One is initiating the association with the network by itself. Because its parent is the coordinator or the router, the other is joining its parents' network. The communication between layers is implemented by primitives. The general sensor nodes and the coordinator of the network communicate by associated primitives as shown in the Fig. 4. Some of the main codes are as follows: PCNodeAddrPacket_t PCNodeAddrPacket; PCGeneralMSGPackett PCGeneralMSGPacket; uint8 i, num = 0; osaljnemcpy ((void *) & PCNodeAddrPacket, pBuf, 10); //save the information of the relationship //between the parent and the child //nodes, if (FandSCheckcount) {if (FandSCheckpaddr==PCNodeAddrPacket.NodeAddr ) FandSCheckcount=0; else FandSCheckcount + +; if (FandSCheckcount =12) { FandSCheckcount = 0; PCGeneralMSGPacket.Hdr = PCGeneralMSGPacket.Len = 8; PCGeneralMSGPacket.TransportID =PCNodeAddrPacket.TransportID; PCGeneralMSGPacket.MSGCode = NODE_S YSTEMRESET ; PCGeneralMSGPacket.NodeAddr=FandSCheckaddr; for (i = 0; i < 7; i + +) num+= ((uint8 *) (& PCGeneralMSGPacket)) [i]; PCGeneralMSGPacket.Checksum = num; sendDummyReport (uint8 *) (& PCGeneralMSGPacket), PCGeneralMSGPacket.NodeAddr, 8); } } else (if(PCNodeAddrPacket.NodePAddr) {FandSCheckpaddr =PCNodeAddrPacket.NodePAddr; FandSCheckaddr = PCNodeAddrPacket.NodeAddr; FandSCheckcount + +; } else FandSCheckcount=0; } } 4. The Test of the Product The whole system must be tested. One of the products is shown in the Fig. 5. The coordinator and the child nodes have been put different places to test whether the data has been sent or received. Using the serial debugging assistant software can send the data or display the received data. The serial debugging assistant is set as the following request. The baud rate is 38400 b/s. And there is no parity, 8 data bits, 1 stop bit. Experimental results show that the system can send and receive data correctly. The performance parameters of the nodes can be tested by the TI's SmartRF Studio7 software. In the test, the communication channel should be set constant. The test nodes can use the external power supplies. The test results are listed in the Table 1.

The system designed the built-in antenna, Antenna_IIFA_cc2530, in the circuit. The test results are verified without the outer antenna. If the signal chip is designed in the board, the communication range is up to 1.6 kilometers.

5. Conclusion This paper introduces the methods of designing the ZigBee coordinator node and the ZigBee router or the end device based on TI's CC2530 chips. It shows the procedures of forming the network. It displays the schematic of the hardware. And the whole system is complete. It included the gateway and the CC2530 nodes. Through the actual test, the coordinator node and the other nodes of the system can work and communicate efficiently. The equipment based on wireless sensor network system can send the information from the sensors to the upper personal computer by serial port or to the gateway. So the system can be applied in the traffic, smart home and so on.

6. Acknowledgements This paper are sponsored by the Education Department of Anhui Province Key Natural Science Research Foundation of China under Grant (KJ2010A352), Research Open Platform of Suzhou University (Laboratory of Intelligent Information Processing, 2012YKF39) University Culture Research Center, 2012YKF24), University science research project of Anhui Province (KJ2011B180, KJ2012A263, KJ2012B185), Quality project of Anhui Province (2012jyxm545) and Professor (doctor) research starting foundation project (No.2012jb01). The innovation training program projects for the Anhui College students, Coal Mine Personnel Positioning System based on the RFID (201310379083), National Training Programs of Innovation and Entrepreneurship for Undergraduates (201210379006), The implementation of embedded alarms management system based on A900 (201310379023).

References [1] . Zhenghua Xin, Hongmei Lu, Liangyi Hu, Jianxin Li, Implementation of SPI and driver for CC2430 and C8051F120, in Proceedings of the 2nd International Conference on Consumer Electronics, Communications and Networks, CECNet, 2012, pp. 2638-2641.

[2] . Zhenghua Xin, Hong Li, Liangyi Hu, The research on CC2530 nodes communicating with each other based on wireless, Telkomnika, Vol. 11, No. 1, 2013, pp. 430-435.

[3] . Zhenghua Xin, Qixiang Song, Liangyi Hu, Xianwei Li, Shaoqing Xu, The intelligent home gated security and defense system design with intelligent materials based on GSM module TC35, Advanced Materials Research, Vol. 644,2013, pp. 12-15.

[4] . Xi-Wu Lv, Kai-Hua Liu, Yan Zhao, Design and implementation of wireless monitor system based on Zigbee, Computer Engineering, Vol. 36 No. 5, March 2010, pp. 243-247.

[5] . Guang-Rui Liang, Yu Fang, Qin-Dong Luo, The design of distributed temperature detection system based on DS18B20, Journal of Guangxi University (Natural Science Edition), Vol. 33, June 2008, pp. 138-140.

[6] . S. Makhlouf, M. Laghrouche, Development of an automatic wireless system applied for soil temperature measurement, Sensors & Transducers, Vol. 142, Issue 7, July 2012, pp. 69-75.

[7] . Yemin Guo, An insole device based on piezoelectric sensor to assess plantar pressure during daily human activity, Sensors & Transducers, Vol. 147, Issue 12, December 2012, pp. 53-60.

[8] . Mourad Lahdir, Mohand Tahanout, Mourad Laghrouche, Soltane Ameur, Optimization of energy consumption of rain gauge network using MSG infrared image, Sensors & Transducers, Vol. 130, Issue 7, July 2011, pp. 38-47.

[9] . Yuh-Chung Lin, Chin-Shiuh Shieh, Kun-Mu Tu, Jeng-Shyang Pan, Implementation of indoor positioning using signal strength from infrastructures, in Proceedings of the 4th Asian Conference on Intelligent Information and Database Systems, March 2012, pp. 206-215.

[10] . Jun Liu, Ruonan Rao, A coordinator loss-tolerant Zigbee mesh network with region detection using RFID for the real-time indoor positioning system, in Proceedings of the 3rd International Conference on Multimedia Information Networking and Security, November 2011, pp. 472^176.

[11] . Jingcheng Zhang, Allan Hyunh, Qinzhong Ye, Shaofang Gong, A communication reliability enhancement framework for wireless sensor network using the ZigBee protocol, Sensors & Transducers, Vol. 135, Issue 12, December 2011, pp. 42-56.

1 Zhenghua XIN,1 Guolong CHEN,1 Xianwei LI,2 Liangyi HU, 3 Jun YUAN,1 Haifeng GU,1 Pei CAO 1 School of Information and Engineering, Suzhou University, Anhui Province, 234000, China 2 School of Economics and Management, Suzhou University, Anhui Province, 234000, China 3 BRIUP company, Shanghai, China 1 Tel.: 18955711392 E-mail: [email protected] Received: 19 August 2013 /Accepted: 25 October 2013 /Published: 30 November 2013 (c) 2013 International Frequency Sensor Association

[ Back To TMCnet.com's Homepage ]