You are on page 1of 4

2010 International Conference on Measuring Technology and Mechatronics Automation

ZigBee wirelessly network module design based on CC2480

Qu Tiezhu, Chen Xiaorong ,Zhang Lei , Xia Chunlei, Dai Shuguang


University of Shanghai for Science and Technology, Shanghai, 200090, China
qutiezhu@126.com

Abstract—ZigBee utilizes IEEE 802.15.4 compliant radios is an optional 32.768kHz crystal, with two loading
operating in the 2.4GHz unlicensed ISM bands, it is an open capacitors(C1 and C2), used for the 32.768kHz crystal
and global standard for wirelessly networked control and oscillator. The 32.768 kHz crystal oscillator is used in
monitoring solutions that are reliable, cost-effective, low-power, applications where we need both very low sleep current
the applications of ZigBee include home and building consumption and accurate wake up times. An external 32MHz
automation, industrial controls and monitoring, energy crystal, Y2, is with two loading capacitors (C5 and C6). The
management and asset tracking. Thus, it is great significance to on chip voltage regulators supply all 1.8V power supply pins
search on it .We have discussed a method how to design and internal power supplies, C3 and C4 are required for
wirelessly Hardware and system software based on MSP430F149
stability of the regulators.
and CC2480, the experimental results show that the modules are
reliable, low-power, self-forming, auto-routing and self-healing. VCC
C1 C2
Y1 C3
Keywords-ZigBee;IEEE802.15.4;CC2480;MSP430F149;wirele 220nF
15pF 1 2 15pF
-ss network
32.768
I. ZIGBEE TECHNOLOGY AND CC2480 MODULES
INTRODUCTION

48
47
46
45
44
43
42
41
40
39
38
37
ZigBee is an open and global standard for wirelessly
networked control and monitoring solutions that are reliable,
DVDD

32K_XOSC_Q1
32K_XOSC_Q2
DCOUPL
AVDD_DREG
AVDD_DGUARD

AVDD_IF2
NC

NC
NC

DVDD_ADC
AVDD_ADC
cost-effective, low-power. It utilizes IEEE 802.15.4 compliant
radios operating in the 2.4GHz unlicensed ISM band. ZigBee
has actualized network layer protocol and IEEE 802.15.4 only 1 36
NC AVDD_RF2
deals with MAC (media access control) layer and PHY, 2
NC AVDD_SW
35
Applications of ZigBee include home and building automation, 3 34
GPIO3 RF_N
4 33
industrial controls and monitoring, energy management and 5
GPIO2
GND
TXRX_SWITCH
32
asset tracking. SRDY 49 RF_P
6 31
MRDY AVDD_RF1
Z-Accel is a solution where TI’s ZigBee stack, Z-Stack, 7
DVDD
CC2480
AVDD_PRE
30
8 29
runs on a ZigBee Processor and the application runs on an 9
GPIO1 AVDD_VCO
28
external microcontroller. The CC2480 handles all the timing GPIO0 VCO_GUARD
10 27
RESET_N AVDD_CHP
critical and processing intensive ZigBee protocol tasks, and 11
CFG0 RBIAS2
26
12 25
leaves the resources of the application microcontroller free to CFG1 AVDD_IF1
AVDD_RREG
AVDD_SOC

handle the application. Z-Accel makes it easy to add ZigBee to


RREG_OUT
XOSC_Q2

XOSC_Q1

new or existing products at the same time as it provides great


RBIAS1

R1
SO/RX

SS/CT
SI/TX

flexibility in choice of microcontroller. CC2480 interfaces any


C/RT

43K
A0
A1

microcontroller through an SPI or UART interface. There is no


need to learn a new microcontroller or new tools. The chip is
13
14
15
16
17
18
19
20
21
22
23
24

designed as 7x7mm QLP48 package, widely supply voltage


range (2.0V~3.6V). Automatically enters low power mode
(<0.5μA) in idle periods when configured as end device, also 6 Y2
1 2 R2
8-bits input or output parallel interfaces, battery monitor, 56K C4
temperature sensor and 7-12 bits ADC with two channels [1]. C6 32M C5
22pF 22pF 220nF
II. THE TYPICAL APPLICATION OF CC2480
A. The external components of CC2480 Figure 1. Typical application of CC2480
It could be used very few external components to achieve
wireless transmission. A typical application hardware electro B. The RF input/output part discussing
circuit is showed in Figure 1 .R1 is precision resistor for The RF input/output is high impedance and differential.
current reference generator to system-on-chip part, R2 is used The optimum differential load for the RF port is 60 + j164 Ω4
to set an accurate bias current for 32MHz crystal oscillator.Y1 [2].Since we used a whip antenna in this project, so a

978-0-7695-3962-1/10 $26.00 © 2010 IEEE 1103


DOI 10.1109/ICMTMA.2010.324
microstrip balun [2] is set between CC2480 and whip antenna. oscillator (DCO) allows wake-up from low-power modes to
Schematic diagram is showed as follow. The purpose of the active mode in less than 6 microseconds. The MSP430F149 is
balun is to combine the two outputs of the differential RF pins microcontroller configurations with two built-in 16-bit timers,
into a single ended 50 ohm RF signal in TX-mode, and split a fast 12-bit A/D converter, one or two universal serial
the single ended 50 ohm antenna signal into a differential RF synchronous or asynchronous communication interfaces
signal in RX-mode. Impedance matching and DC supply to the (USART), and 48 I/O pins. It easily met the need of
output stage is also implemented in the balun. This balun low-power and the requirement of controlling [3].The
design consists of two components used for impedance wirelessly module used MSP430F149 and CC2480 is showed
matching (L1 and L3), one RF block (L2) and a DC block in Figure 3.
(C1). In addition to these four discrete components a ½
wavelength long transmission line is used to ensure correct B. Communication between MSP430F149 and CC2480
phase of the RF signal and a 70Ω 23° transmission line is The connection between MSP430F149 and CC2480 is
used for impedance matching. An internal T/R switch circuit is expressed in Figure 4. The SPI or UART physical interface is
used to switch between the LNA (RX) and the PA (TX). More used to communicate between the two processors. The other
details can be found in the website of TI. interfaces are described below [2, 3, 4].
• Power Management: This interface consists of two
signals (SRDY and MRDY) and is used to
RF_P communicate the power management status and to
wake up sleeping devices. This interface is only
ANT required if SPI transport is used. The host processor
C1 set MRDY via P4.6 pin before sending data to
CC2480, and SRDY is defined by CC2480 when it
TXRX will receive/sent data from/to host processor.
C5.6pF
L1 L2 • Reset: The host processor can reset CC2480 through
L6.8nH L22nH the RESET_N by clearing P4.7 pin. In addition, that
L3 pin connects the supply power through 100K pull-up
L1.8nH resistor.
RF_N
MSP430F149 CC2480
Figure 2. RF input/output part schematic
P4.0 CFG0
III. HARDWARE DESIGN OF WIRELESSLY MODULE BASED ON P4.1 CFG1
CC2480 P4.7 RESET_N
P2.6 SRDY
A. MSP430F149 microcontroller introduction P4.6 MRDY
P3.0 SS/CT
The Texas Instruments MSP430 family of ultra low-power P3.1 SI
microcontrollers consists of several devices featuring different P3.2 SO
sets of peripherals targeted for various applications. The P3.3 C/RT
architecture, combined with five low power modes is
optimized to achieve extended battery life in portable Figure 4. Connection between MSP430F149 and CC2480
measurement applications. The device features a powerful
16-bit RISC CPU, 16-bit registers, and constant generators that • Configuration: This interface consists of the CFG0 and
attribute to maximum code efficiency. The digitally controlled CFG1 pins on the CC2480. CFG1 pin is used to select
SPI or UART transport and CFG0 pin is used to select
Communicat- whether a 32 kHz crystal is installed on the circuit.
RF
ion Ports IV. SOFTWARE DESIGN OF WIRELESSLY MODULE BASE ON
CC2480
Data MSP430
In the ZigBee wirelessly application, The CC2480 handles
Collection F149
all the timing critical and processing intensive ZigBee protocol
CC2480 tasks, and leaves the resources of the application
Debugging microcontroller free to handle the application. In addition,
several other configuration parameters may be configured on
the CC2480 through the software interface. The following
subsections describe the CC2480 application command
Supply Power interface. They are subdivided into the following categories. [3,
4, 5].
Figure 3. Wireless module based on MSP430F149 and CC2480
• The SYS interface: It provides the application
processor with a low level interface to the CC2480

1104
hardware and software. The CC2480 functions that are #define MCU430_RDY (P4OUT |= BIT6)
accessible over this interface include the ADC ( void SPI_Init(void);
analog-to-digital converter ), NV memory, GPIO pins, void IO_Init(void);
software timers and the hardware random number bool CC2480_Init(void);
generator. void Delay_us(unsigned int usec)
void Delay_ms(unsigned int msec);
• The Configuration interface: It allows the application void main() {
processor to configure various parameters of the WDTCTL = WDTPW +WDTHOLD;
CC2480 device. IO_Init();
• The Simple API interface: It is a simplified ZigBee CC2480_Init();
interface that can be used to quickly create simple _EINT();//Enable global interrupt
ZigBee compliant networked applications. It allows while(1);//Main loop
for easy device configuration, network formation, {…}
binding and data transfer. }
void SPI_Init() {
• The AF and ZDO interfaces: They feature the UCTL0&=~SWRST;//Reset SWRST
complete ZigBee interface and can be used to create a UCTL0=CHAR+MM+SYNC; //Mode: Master SPI
full range of ZigBee compliant applications. The AF UTCTL0=SSEL1+CKPH; // ACLK,4 line SPI
(Application Framework) interface allows the UBR00=0x4E; // Baud rate
application processor to register its application with UBR10=0x00;
the CC2480 and send and receive data. The ZDO ( UMCTL0=0x00; //bit adjustment
ZigBee Device Objects ) interface provides various ME1=USPIE0; //Enable SPI0
ZigBee management functions like device and service P3SEL|=0x0F;//P3.0~P3.3 is used as SPI mode
discovery. P3DIR=0x0A;//P3.1,P3.3 output mode
It could normally develop CC2480 wireless module if the IE1|=URXIE0;//enable receive interrupt
first three consignations interfaces have correctly achieved. }
There are three procedures to start ZigBee module based on void IO_Init(){
CC2480: P2SEL &= ~BIT6; //P2.6 IO mode
P2DIR &= ~BIT6; //P2.6 input
• CC2480 power-up: Host processor and CC2480 power
P4SEL &= (~BIT0 & ~BIT1 & ~BIT6 & ~BIT7);
up, and host processor sets CC2480 RESET_N pin
P4DIR |= (BIT0 | BIT1 | BIT6 | BIT7);
low, holding CC2480 in reset status, and then sets the
}
optional CC2480 CFG0 and CFG1 pins ( if these pins
bool CC2480_Init(){
are controlled by the host processor ), initializes its
RESET_N_L; //Holding CC2480
UART or SPI interface.
CFG0_1; CFG1_1;
• CC2480 configuration: After the CC2480 power-up, SPI_Init(); //UART initializtion
the host processor should configure it according to its RESET_N_H; //Reset CC2480
application needs. The exact configuration sequence Delay_ms(10);
can vary depending on the cause of the reset and if(CC2480_RDY_L) return true;
which parameters need to be configured on the else return false;
CC2480. }
void Delay_us(unsigned int usec) {
• CC2480 ZigBee stack startup: After configuration of while(usec > 3) {
the CC2480 device, the host processor should register asm("NOP"); // 1 cycles for nop
its application and then start the operation of the asm("NOP"); // 1 cycles for nop
ZigBee stack. Once the ZigBee stack has successfully asm("NOP"); // 1 cycles for nop
started, the CC2480 is part of the ZigBee network. The asm("NOP"); // 1 cycles for nop
host processor may now issue commands to perform asm("NOP"); // 1 cycles for nop
discovery, binding and sending and receiving of asm("NOP"); // 1 cycles for nop
packets. asm("NOP"); // 1 cycles for nop
Based on above conclusions, CC2480 power-up procedure asm("NOP"); // 1 cycles for nop
code is programmed as follow [6]: usec -= 2; // 1 cycles
#define RESET_N_H (P4OUT &= ~BIT7) }
#define RESET_N_L (P4OUT |= BIT7) }
#define CFG0_0 (P4OUT &= ~BIT0) void Delay_ms(unsigned int msec){
#define CFG0_1 (P4OUT |= BIT0) while(msec-- > 0){
#define CFG1_0 (P4OUT &= ~BIT1) Delay_us(1000);
#define CFG1_1 (P4OUT |= BIT1) }
#define CC2480_RDY_H (P2IN & BIT6 == BIT6) }
#define CC2480_RDY_L (P2IN & BIT6 == 0x00)

1105
V. TEST RESULTS [4] Texas Instruments.Inc. (2008, April). CC2480 Interface Specification.
[Online].Available:http://focus.ti.com.cn/cn/lit/er/swra175a/swra175a.p
In sunny weather and open space conditions, the distance df.
how long could a pairs of modules normally work is between [5] Texas Instruments.Inc. (2008, June). CC2480 Developer’s Guide.
80 meters to 120 meters. The wirelessly network could be set [Online].Available:http://focus.ti.com.cn/cn/lit/an/swra176/swra176.pdf.
up within 3 seconds measured by the analysis tools. It [6] Wei Xiaolong. MSP430 MCU interface technology and system design.
consumes about 18~22mA if MCU is in working condition Beijing: BeiHang university publishment.2002.(in Chinese)
and CC2480 is in idle condition; about 2.5μA~3.4μA if MCU
is in LPM3 and CC2480 is in low-power state.
We designed 10 nodes to set up a ZigBee network as show
in Figure 5.
C1
R4 E1
R1

R2
E2
R3
E3
E4 E5

Figure 5. Test network topology

One coordinator (C1), four Routers (R1, R2, R3 and R4),


five end-nodes (E1, E2, E3, E4 and E5).The coordinator could
correctly receive data from end-nodes after starting the net. It
also could receive from E3, E4 and E5 when R2 is closed; If
R1 is closed, data could be accepted from R4; the network
could re-route data to C1 when E3 and E4 come near to E2.
The experimental results adequately show that the modules are
reliable, low-power, self-forming, auto-routing and
self-healing.
VI. CONCLUSION
ZigBee wireless communication terminals development
method is discussed on the foundation of hardware and
software design. In the application field, The CC2480 handles
all the timing critical and processing intensive ZigBee protocol
tasks, and leaves the resources of the application
microcontroller free to handle the application. CC2480
supports TI’s Simple API, and it has only 10 API calls to learn,
which drastically simplifies the development of ZigBee
applications. It is believed that the module based on CC2480
will be used in more and more field.
ACKNOWLEDGMENT
The work is supported by The Innovation Fund Project for
Graduate Student of Shanghai (JWCXSL0902).
REFERENCES
[1] Texas Instruments.Inc. (2008, April). CC2480 data sheet. [Online].
Available: http://focus.ti.com.cn/cn/lit/ds/symlink/cc2480a1.pdf.
[2] Texas Instruments.Inc. (2008, April). Implementation of Microstrip
Balun for CC2420 and CC243x and CC2480. [Online].
Available:http://focus.ti.com.cn/cn/lit/an/swra098d/swra098d.pdf.
[3] Texas Instruments.Inc. (2004, June). MSP430x13x, MSP430x14x,
MSP430x14x1 Mixed Signal Microcontroller. [Online]. Available:
http://focus.ti.com.cn/cn/lit/ds/symlink/msp430f149.pdf.

1106

You might also like