Design issues in cc2530 znp multi hop sensor networks


Published on

Grad Project : Design Issues in Wireless Sensor Networks using CC2530 Zigbee Network Processor under Dr. Asis Nasipuri []

Published in: Technology, Business
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Design issues in cc2530 znp multi hop sensor networks

  1. 1. Design Issues in Wireless Sensor Networks using CC2530 Zigbee Network Processor Sreekesh Padmanabhan Electrical Engineering Department University Of North Carolina at Charlotte - NC, USA Abstract—Deployment of medium to large size wireless sensor networks with optimum power consumption has always been a topic of high research interest. This project investigates the design issues for the development of wireless sensor networks with CC2530 ZNP devices, with a network Coordinator, end devices, and routers as network nodes. With the onboard sensors and multiple low power modes, the CC2530 ZNP can be configured for maximum efficiency, shutting off the processor clocks and peripherals and waking up as per the energy efficiency requirements. In this project, a multi hop wireless network is deployed using Z-stack and experiments are performed to evaluate the power consumption in the end device and comparison of the low power modes performed. Index Terms—CC2530 ZNP, Zigbee, Low power. I. INTRODUCTION Wireless sensor networks (WSN) have been used in various home automation systems, industrial and medical applications and embedded smart energy utilities. AWSN typically consists of multiple end devices that are deployed over a geographical location to collect various data through external or inbuilt sensors, and relayed over the network routers to the network gateway coordinator, which then process the data for analysis. The research and development works for such networks were originally initiated for military applications but gradually became a part of the consumer and industrial application. Multiple wireless sensor devices from different vendors are available in the market: includes Crossbow’s Mica family of Motes, Ember Corporation’s Zigbee EM35x SoC, Smart Dusts aimed at developing sensor nodes of micro, to name a few. Texas Instrument’s CC2530 Zigbee based solutions are one of the prominent devices in the market. Available in different designs and features, CC2530 Zigbee network Processor Mini kits are one of the modules that are highly portable, light weight and easy to deploy devices, equipped with on board sensors consuming very low power. Once programmed, the devices can be deployed anywhere without requiring any additional equipment, except for a computer to interface with the coordinator. The objective of the project is to deploy a small scale wireless sensor network, using a CC2530 ZNP based end device, a router and a coordinator node and study its power consumption in various low power modes. The End device would measure certain analog parameter values like light intensity and temperature using the Analog and digital converter, using SPI communication to pass the measured values to the CC2530 transmitter, which would transmit the packets to the coordinator device hooked to a computer using the USB stick. In the event that the distance between the end device and coordinator becomes large enough that the signals do not reach the intended destination, an intermediate router node can be deployed, which would receive the packets transmitted by the end device and route them to the coordinator. Additional routers can be placed to further extend the range of transmission. The received data is displayed by the coordinator on to the hyper terminal. This report is organized as follows. Section 2 touches upon the related works in this domain. Section 3 of the document provides the Hardware description details, describing the CC2530 ZNP Mini system components and the CC2430 ZNP Mini devices. It also introduces the Zigbee network protocol and its variant, the Zstack and how the system components are placed over the Network stack. Section 4 briefs the Integrated Development Software Platforms involved: IAR & Code Composer studio. Section 5 involves the MSP Embedded architecture and components: Watch Dog Timer, Timers, Clocks, General Input/Output Pins, Serial Communication, Analog to Digital Converters and the low power modes. Section 6 provides insight into the Network Configurations and protocols, including the Network parameters, Zigbee network creation, joining a Zigbee network and Routing protocol involved. Section 7 encapsulates the current consumption analysis in CC2530 ZNP Mini devices in its subsections. The measurement setup is graphically described along with the current calculation fundamentals. Besides these, the design considerations for low power operations are dealt. The project involved transmission and polling experimental analysis of end devices, recording the oscilloscope plots, tabulating the measured values and calculating the current consumption. Behavioral analysis of events in end device and router were conducted. Eventually, a comparative study of low power modes was done. II. RELATED WORK Wireless sensor networks in low power modes is a highly researched topic, with good research publications available. Article [1] describes the utilization of minimum energy in various scenarios, related technologies involved like signaling, networking and the software optimizations. It gives an overview of the node architectures, voltage scaling and the hardware involved. The parameters of energy efficient networks like the signal processing, computational algorithms in parallel processing and energy efficiency of layers are briefed. Finally, the operating systems and software are considered. 1
  2. 2. Article [2] proposes the enhanced hierarchical routing protocol (ERHP) for Zigbee mesh networks, which aims at finding the shortest path for communication between Zigbee based devices, reducing overheads and delays. The article mentions about Zigbee networks combining hierarchical addressing scheme protocols with ad-hoc on demand distance vector protocol. Enhanced hierarchical routing protocol uses the short cut to destination using the link to neighbor nodes based on Zigbee hierarchical addressing scheme along with the next hop relay node having the shortest hierarchical path to destination. The proposal also mentions about routing path recovery in case of link failure. hence each of the boards can be programmed to be either coordinator, router, or end-device. Zigbee is a communication protocol specification, using low power radios based on IEEE 802.15.4 standards, used to transmit data over long distance through intermediate routers in mesh networks. Zigbee standards have frequency of operation in 2.4GHz or 915 Mhz or 868Mhz range. III. CC2530 ZIGBEE NETWORK PROCESSOR MINI Zstack is Texas Instruments Zigbee compliant protocol stack for IEEE 802.15.4 products and platforms. Z-Stack is compliant with the ZigBee 2007 (ZigBee and ZigBee PRO) specification, supporting ZigBee 2007 on CC2530 SoC, MSP430+CC2520 and Stellaris LM3S9B96+CC2520.[4]. The CC2530 ZNP Mini Development Kit is designed for ZigBee Networks, providing ZigBee interface to any application using a simple serial interface. The ZNP mini kit has three target boards, two of which can be mobile using two AAA batteries - used as end devices and routers. The target board sensor includes sensors that can be combined with led lights and push buttons for various applications. Figure 1 depicts the ZNP Mini kit. The application processor can be connected to the CC2530 SoC based ZNP to obtain ZigBee connectivity. The Application Processor describes the Processor/MCU that is running the application code, which uses CC2530-ZNP API over the UART/SPI/USB interface to communicate with the ZNP providing ZigBee connectivity with its IEEE 802.15.4 radio. Figure 2 illustrate the Application over Zigbee stack. Fig. 1. End device, Router and Coordinator [3] The Zigbee Network Processor development kit is simple enough yet designed to give an introduction to ZigBee wireless networks. The hardware consists of: • MSP430F2274 microcontroller controlling ZigBee device. • CC2530 ZigBee device preloaded with ZigBee firmware. Fig. 2. Application over Zigbee Stack [5] IV. SOFTWARE PLATFORM The device types in the network includes the following: • ZigBee coordinator (ZC): The coordinator is the root of any Zigbee network tree. Only one ZigBee coordinator exists in each network. It stores all network information. • ZigBee End Device (ZED): End devices are loaded with functionality to talk to coordinator or a router parent node. • ZigBee Router (ZR): A Router can run application function, as well as can act as an intermediate router, relaying data from other devices. IAR Embedded Workbench is a high-performance C/C++ compiler and debugger tool suite for applications based on 8-, 16-, and 32-bit microcontrollers, including MSP430s. Most of open source code for MSP430 is coded in IAR, but it has a limitation that the free version allows only a code limit of 4kB, which is enough for small scale developments but will not suffice for any application developments like Multi Hop networks. Thus, Code Composer was used to develop Multi Hop network application. The one and only coordinator in the Zigbee network is responsible to set up the network, configuring the ZigBee network parameters. The end-devices periodically poll their key data to coordinator. The target boards can also be programmed as routers through software. Routers typically route messages from other devices, thus extending ZigBee networks. All the target boards has identical hardware and Code Composer Studio (CCStudio) is an integrated development environment (IDE) for Texas Instruments (TI) embedded processor families to develop and debug embedded applications. Since the available examples for CC2530 ZNP Mini was all compiled for IAR Embedded Workbench, all the code had to be translated to Code Composer. It involved code analysis and rectifying errors while maintain the code logic, and in the process understanding Z-stack protocol stack. 2
  3. 3. V. MSP EMBEDDED SYSTEM COMPONENTS A. MSP Architecture The MSP430 is powered by a 16-bit RISC CPU, multiple clocks and peripherals, interconnected using a von-Neumann common memory address bus (MAB) and memory data bus (MDB). The key features of the architecture include: •Architecture based on Ultralow-power modes. •High-performance analog ideal for precision measurement •16-bit RISC CPU supporting applications of low code size. •In-system programmable Flash permits flexible code changes, field upgrades and data logging restarts counting from zero. CCIFG and TAIFG interrupt flags are set by the timer events: CCIFG interrupt flag is set when timer counts to the TACCR0 value. TAIFG interrupt flag is set when the timer counts from TACCR0 to zero. The timer in UP mode is illustrated in Figure 4. 0FFFh TACCR0 Fig. 4. Timer A in UP mode. D. Clock Modules The MSP architecture includes three clock sources: • LFXT1CLK: Low-frequency/high-frequency oscillator. • DCOCLK: Digitally controlled oscillator (DCO). • VLOCLK: Internal very low power, low frequency oscillator with 12-kHz typical frequency. Fig. 3. MSP Architecture [6]. B. Watch Dog Timer Programming MSPs usually involves first configuring the system Watch Dog Timer, which is a 16-bit timer that can be used as a watchdog or as an interval timer. The primary function of the WDT+ module is to perform a controlled system restart after a software problem occurs. If the selected time interval expires, a system reset is generated. The code line WDTCTL = WDTPW+WDTHOLD; will stop the Watchdog timer. The clocks sources three clock signals: • ACLK: Auxiliary clock, sourced from LFXT1CLK or VLOCLK, and signals individual peripheral. • MCLK: Master clock, is powered by LFXT1CLK, VLOCLK, XT2CLK and are used by the CPU. • SMCLK: Sub-main clock is sourced from LFXT1CLK, VLOCLK or DCOCLK, used by peripherals. E. General Pin Input Output The MSP430 used have 4 different ports, each with 8 pins and 8 bit registers that control them and provide information about their current status. Table II briefs the port register bit status. TABLE II. GENERAL PIN INPUT OUTPUT REGISTERS Register Bit value at 0 Bit value at 1 PxIN TABLE I. TIMER OPERATION MODES Mode Operation Stop Timer stops Up Repeatedly counts from zero to TACCR0 & back to zero The output is low The output is high port pin is switched to input direction Pullup/pulldown resistor disabled port pin is switched to output direction Pullup/pulldown resistor enabled Resistor in PULL-DOWN Resistor in PULL-UP PXIES PxIFGx flag set low-tohigh transition PxIFGx flag set high-to-low transition PXIE interrupt is disabled Interrupt is enabled PXIFG No interrupt is pending Interrupt is pending PxDIR PxREN Repeats count from zero to TACCR0 Up/Down PxOUT Repeats count from zero to TACCR0 Continuous The input is high PxOUT C. Timers The MSP430 has 2 timers: Timer A and Timer B. Timer_A is a 16-bit timer/counter with multiple capture/compare registers. The timer has four modes of operation as given in Table I. The input is low In the UP mode, the timer repeatedly counts up to the value of compare register TACCR0, which defines the period. Once the timer value reaches TACCR0, the timer is reset and F. Analog to Digital Converter The MSP430 is equipped with a 10-bit analog-to-digital converter ADC10 module. The module includes a 10-bit SAR core, data transfer controller (DTC), sample select control and a reference generator. The DTC allows ADC10 samples to be converted and stored anywhere in memory without CPU 3
  4. 4. intervention. Two registers control the ADC10: ADC10CTL0 and ADC10CTL1and enabled with the ADC10ON bit. The ADC10 registers are altered only when ENC = 0 and hence ENC must be set to 1 before any conversion can take place. ADC10CLK sources include SMCLK, MCLK, ACLK, and 5MHz internal oscillator ADC10OSC. G. Operating power modes The MSP430 family is designed for ultralow-power applications and uses different operating. Figure 5 illustrates the low power modes and its corresponding current consumption. • Network Depth The number of nodes from the coordinator to the device defines the depth of a device in a network. Maximum number of hops from the coordinator to the most distant device in the network defines the maximum network depth, which determines the overall diameter for the network. • Number of Children The Co-ordinator fixes the maximum number of child devices per Router. Each Router in the network can have a fixed number of child devices attached to it. These may be either Routers or End Devices. • Number of Child Routers In addition to the number of children per Router, a limit is put on how many of these children may be Routers themselves. A. ZigBee Network Creation The coordinator initializes and maintains ZigBee network. Network initialization involves the following: Fig. 5. MSP in low power modes [6] The MSP is configured in various low power modes by setting the System Clock Generator 1, System Clock Generator 2, Oscillator Bit and CPU Clock bit in the status register (SR). Since the status register is stored into the stack before entering an interrupt service routine, on return from interrupt service routine, the operational mode before entering the ISR is resumed – if the relevant bits in SR are not changed within the ISR. On the contrary, the status bits can be altered within the ISR, which causes the operation mode to change once the ISR is serviced. Table III indicates the status of status register clock bits in various low power modes, switching off CPU clocks or other oscillators as per the mode chosen TABLE III. LOW POWER MODES STATUS REGISTER BITS Mode CPU and clock status Active CPU & all enabled clocks active LPM0 CPUOFF is set, thus shutting down processor LPM1 LPM2 LPM3 LPM4 SCG0 & CPUOFF are set, thus shutting down processor & system clock generator 0 SCG1 & CPUOFF are set, thus shutting down processor & system clock generator 1 SCG1,SCG0,CPUOFF are set, thus shutting down processor & & system clock generators SCG1,SCG0,OSCOFF,CPUOFF are set, thus shutting down processor down processor & & system clock generators VI. NETWORK CONFIGURATION The coordinator initializes the network to configure its parameters and determines its shape and topology. 1. Radio Channel Setup: Radio channel on which the communication should take place is searched, with priority to the channel with least activity. The default radio channel is channel 11 operating at 2405 Ghz and can range upto channel 26at 2480 Ghz. 2. PAN ID Assignment: The network is assigned a Personal Area Network identifier or PAN ID by the coordinator. The PAN ID should be unique and thus should not conflict with any other PAN IDs. At this stage, the coordinator also assigns a network (short) address to itself, with default address of 0x0000. 3. Network Startup: Once the Co-ordinator has been configured, it responds to queries from other devices that wish to join the network. B. Joining a ZigBee Network Following the network creation, the routers and end devices can join the network. Both Routers and the coordinator allows other end devices and routers to join the network. The join process is as follows: 1. Network search: A network search is initiated by the node that intends to join a network by searching the available channels. There may be numerous networks operating in the same channel and thus, these networks are distinguished by the PAN IDs. 2. Parent selection: The node opts to join a router or a coordinator with best signal amongst the numerous nodes available within the network. 3. Join Request: The new node must get the permission from the node it intends to join with and hence ends a message to the Router or coordinator requesting network join permission. 4. Accept or Reject: The join request reaches the router or coordinator with which the node intends to link and the router or coordinator will decide about whether the node has to be permitted or rejected. If the permission is granted, the node can be a part of the network and will be allocated an address. 4
  5. 5. C. Routing Zigbee networks use Ad hoc On-Demand Distance Vector (AODV) Routing protocol. This routing protocol establishes a route to destination on demand. In AODV, the network is silent until when a connection is required. When demanded, the node initiates a route discovery to another node and broadcasts a request for connection. Routing tables of neighbor nodes are organized for establishment of routes. AODV establishes route table entries at router nodes dynamically, with nodes maintaining sequence numbers for routes. Nodes forward message and keeps a track of the node that they heard from, thus maintaining a track of the route. Once the connectivity is done, the destination node sends a message back to the requesting node through the temporary route. The route that has the least number of hops through the routers is opted for communication. [7] VII. POWER CONSUMPTION ANALYSIS This section presents the experiments conducted to measure the current consumption in end devices along with the analysis of the observations. Out of the two end pointes deployed in the application, the sink device is mapped to the logical device type Coordinator and the source to the logical device type: End Device or Router. The sink receives temperature and voltage samples sent periodically from the sources. The end device goes to sleep to save power between the transmissions which is how battery power consumption is optimized. All of the measurements are done on the CC2530ZNP Mini Kit, with only one Sink and one Source in the ZigBee network. A. Current Measurement Setup Current consumption measurement is done to plot the current profile on an oscilloscope by measuring the voltage drop across a 10 Ohm resistor. The setup is as illustrated in figure 6. Fig. 6. Current Measurement Setup. To calculate the average current consumption, an end Device and a coordinator is utilized. As indicated in the setup, a 10 ohm resistor is connected in series with the battery, and the oscilloscope probes measure the voltages across this resistor. An Agilent technologies 6052A Mixed Signal Oscilloscope (MSO) is used for this purpose to plot different events. The oscilloscope provides a graphical representation of the voltage drop across the resistor. Since the voltage and current are linearly related, the oscilloscope graphical representation indicates the current consumed by the devices. B. Current calculation fundamentals Since the resistor is in series with target board, the voltage at the target board is calculated by subtracting the voltage across the resistor from the supply voltage. Thus, Thus, the value of the resistor R should not be too large so that the operation of the board is not affected. The R factor will reduce the effective voltage over the target board itself. As long as both I and R are small enough, the voltage drop effects are negligible. A resistor of R = 10Ω is used for the analysis. C. Design considerations for low power operation The ZNP Mini kit comprises of the MSP430F2274 and CC2530. MSP430F2274 wake up time is of short duration, with both the operating current and sleep current being low. This low power operating modes of MSP430 makes it possible to develop applications with just a fraction of the current other MCU's would consume. But care must be taken to configure MSP430 so that the current consumption is as low an average as possible. The CC2530 ZNP Mini Kit Target Board does not have any 32 kHz crystals connected to the MSP430, thus they lack ultra-low power sleep timer traditional clock sources. The only solution in many systems uses the internal high speed RC oscillator of MCU as clock source but then, current consumption even in “sleep” modes can be several hundred uA, which is costly given that the system is idle. Ideally, it should be less than 10 uA. The MSP430F2274 utilizes a low power, low frequency oscillator called the VLO (refer MSP Clocks previously). It can operate in the low power mode 3, consuming only a couple of hundred nA. The sleep timer uses VLO as the clock source. The system thus performs periodic tasks and has a sleep current of just a few hundred nA, even without a crystal. The halInit function configures the MSP430 to set up the DCO to any frequency up to 16 MHz. The current consumption though increases with frequency of operation by logic. There should be tradeoff between speed and current consumption. The slower the clock, the longer time the transactions take and the longer the MSP430 has to stay awake. However, the higher the clock rate, the more energy you burn when the system is active. For the application running on the eZ430-RF2530 ZNP Mini Kit, having a high clock rate is advantageous, since there are a lot of data being transferred over the SPI bus between the CC2530 and the MSP430. For both the devices, it is beneficial that these transactions (or really remote procedure calls) are effectuated as quickly as possible, such that each device can go to sleep mode immediately when its part of the transaction is finished. Thus, the application has been set up to operate at 8 MHz in active mode with the on board voltage being above 2.2V. Care must be taken to ensure that all peripherals and GPIOs on the MSP430 are configured correctly to reduce the current consumption. Though most of the peripherals are turned off automatically when the MSP430 enters a low power mode, but peripherals must be turned off manually and individually. In the application, the internal reference voltage for the ADC had to be turned off using the following code: ADC10CTL0 &= ~ENC;ADC10CTL0 &= ~(REFON + 5
  6. 6. ADC10ON); The General Pin Input/Output is a factor of extensive current leakage and thus should be ensured to configure appropriately. D. Experimental Results This section presents the analysis of observations obtained from the experimental tests. Specifically, the current drawn by the end device under different events are analyzed. The analysis includes: • Study of events during transmission of measured data at interval of 4 seconds, the current consumption during an event and calculating the average current consumption. • Analysis of Packet transmission & request additional data during transmission. • Analysis of data polling at interval of 1Seconds & the average Current Consumption • Behavioral description of End Devices & Router • Low power mode comparative study The different events observed are tabulated and current consumption during the duration of an event, noted. Figure 8 depicts the peak events during transmission which are depicted in dotted box in figure 7, whose frequency is set using the timer initiation in the function initTimer(); This schedules the CC2530 to be woken up at interval of 4 seconds using timer interrupts, during which the end device transmits and further goes into low power mode. Transmission OTA CC2530 Wake Up LPM3 MSP430 & CC2530 in sleep Fig. 8. Transmission Events Table 4 records the events and the corresponding duration and current measured during a transmission of sensor values from end device to coordinator, as captured in Figure 8. TABLE IV. EVENTS DURING TRANSMISSION CYCLE 1)Transmission Cycle : Figure 7 is the plot obtained for packet transmissions at an interval of 4 seconds, with data polling from end device to coordinator at an interval of 1Second. Event Description Duration [ms] Current [mA] 15.28 9.34 HAL on 174 6.0 3 CSMA-CA (RX), Tx packet, receive MAC ACK 13.4 14.2 Sum Polling at 1Seconds CC2530 Wake Up 2 Transmission at 4Seconds 1 202 Average 7.5 Once the currents are analyzed, the overall average current consumption is calculated using general formula: 1 transmission cycle Fig. 7. Transmission and Polling cycle The application measures the light intensity followed by temperature values using the onboard ADCs. The measurement duration lasts couple of milliseconds. The ADC measurements are done while the MSP430 cores are shut off, thus reducing power consumption to a minimum. The first peak indicates the CC2530 waking up, starting its local oscillators, crystals and timers. The following peak occurs when the packet is prepared and sent over the air. At the end, the CC2530 prepares for going back down to deep sleep to conserve battery power when not in transmission mode. This way, power efficiency is achieved by turning off the MCU, Transceivers and peripherals when not in use. Events like CSMA-CA which senses the carrier for any activity before transmission might take a short time or a long time, depending on the traffic of the selected channel at that instant. = average Where = average current consumption time, = sleep mode Current consumption Total time, consumption, = Average current consumption over period ; Knowing the above parameters, can be calculated based on the period of active sequences. Thus, calculate the total life time of the system, knowing that, LifeTime = Battery Capacity / Average Current. For normal AAA batteries available in stores, the capacity is typically 1200 mAh. The analysis was done using two 1.5V AAA Duracell Alkaline Batteries. The timer for the application is initialized to transmit the data every 4 seconds (4000 mSec). The sleep current was measured to be ~6uA using ampere meter. Calculating average measured current for only transmission events in a cycle: (202/4000)*7.5mA + (1-202/4000)*0.006mA = .384mA 6
  7. 7. 2) Packet Transmission Event The plot corresponding to packet transmission of measured ADC values have been captured as indicated in Figure 9. Before transmitting a packet, the end device senses the channel to make sure that it is clear for packet transmission. Once the channel is clear, the packets are send and the device switches to receive mode to receive acknowledgment for the packet transmitted. [8] 2 1 4 3 5 6 7 3) Request Additional Data An end device will be able to receive data from another node by periodically sending data requests to the associated device. This packet can be send by the associated device when end device ask for it when there are packets destined for the end device. Figure 10 depicts the events in the peak following the packet transmission, which requests for additional data from the coordinator. 8 9 12 3 4 7 5 8 9 10 11 6 Fig. 10. Example of a figure caption. Fig. 9. Transmission of Packet Over the air. Table V records the events in the figure 8. Each event number corresponds to the edge in figure 9. The event values are tabulated in table VI. TABLE VI. EVENTS DURING DATA REQUEST TABLE V. EVENTS DURING TRANSMISSION CYCLE Event 1 2 3 4 5 6 7 8 9 Description MSP430 passes the data and command over the SPI to CC2530. Once done, MSP430 will immediately go to sleep, and wait for acknowledgement from CC2530 to signal that it has processed the command CC2530 starts the 32 MHz crystal and sets it up as the core clock. The command from the MSP430 is processed and the CC2530 starts synchronizing an internal timer in order to be able to transmit the packet CC2530 sets up the radio and churns the packet through the ZigBee stack, preparing it for transmission Carrier sense Multiple Access Collision avoidance is initiated by CC2530. The radio is initially in RX mode to check whether the channel is clear for transmission. The duration of this step will vary if the channel is noisy. If not clear, the CC2530 will wait for a random time and initiate listening again. Once the channel is clear for transmission, the mode is switched from RX to TX. In the transmission mode, the packet is sent over the air. The mode is switched back from TX to RX mode to receive acknowledgements. CC2530 receives the MAC ACK from the associated device in the network CC2530 enters an IDLE state, waiting to request the APS ACK from the recipient. Description CC2530 is sleeping, but has only entered LPM3, as it needs to wake up one last time. Sensor Network Monitor Sample Application has configured CC2530 such that this duration is 100 ms CC2530 wakes up from LPM3. The node will transmit a new data request just to make sure that there are no more pending data destined for the node before it enters deep sleep. The MSP430 is not involved in this transaction CC2530 starts the 32 MHz clock. Duration 100 Current 0.008 0.5 5.5 0.5 7.6 1.45 8.0 5 Internal processing and preparing for transmit. CSMA-CA 1 24.7 6 Duration 0.4 Event Switch from RX to TX. 0.2 8.5 The data request packet is sent over the air. Switch from TX to RX. 0.8 31.6 0.2 17.5 Receive MAC ACK. This acknowledgment does not guarantee the successful reception of the data at the recipient end but only indicates the acknowledgement on MAC layer. Post processing and prepare for deep sleep. Deep sleep 1 20.5 1.6 8.5 4000 0.008 Current 7 1 3.8 8.5 2 1.5 8.5 3 4 1 28.5 7 8 0.3 14 9 2 33.8 0.3 20 1.3 28.5 100 8.5 10 11 7
  8. 8. 4) Data polling The CC2530 can be configured to automatically poll for data (sending data requests) without involving the host MCU. The MCU will only be notified when data is received. The device parameter ZCD_NV_POLL_RATE manages this polling: A CC2530-ZNP device that is configured as an enddevice will wake up periodically with this duration to check for data with its parent device. This value is specified in milliseconds and can range from 1 to 65000. The active sequence of the data request is represented with the following current profile on the oscilloscope. Figure 11 captures the events during data polling. coordinator realignment message but since the coordinator is out it will not receive this. After this, the end devices will attempt to join/rejoin a network by sending period beacon requests. Figure 12 is the plot obtained when the end device sends beacons to connect to a network. Fig. 12. End Device sending beacons Figure 13 is the plot obtained for end device once it joins a network coordinator. Fig. 11. Data Polling Cycle. Table VII records the events in the above data poll cycle. TABLE VII. EVENTS DURING TRANSMISSION CYCLE Event Duration Current 1 Wake Up Description 1.7 6.5 2 CSMA-CA (RX), transmit packet, receive MAC ACK 4.1 22.5 3 Prepare for Sleep 1.5 6.5 Sum 7.3 Fig. 13. End Device joining a network. Average 6) Router Behavior 14.5 In this case, the sleep current was measured to be 8 uA. The increase in the sleep current is caused by a timer on the CC2530 that has to be up and running to handle the timing of the periodic data requests. For a polling period of 1 second(1000 ms), calculating the average current consumption using : The router searches for a network on its list of available channels, and then joins that network as indicated in figure 14. The average current values are indicated in the figures. The Average current during data polling at an interval of 1Sec is found to be: [(7.3/1000) *14.5mA] + [(1-7.3/1000)*0.008mA] = 0.1138mA 5) End Device Behavior Once the coordinator is disabled, end device will start sending MAC DATA POLLs using the default configuration, which when not responded to will, make End device think it has lost connection with the parent and it will send an orphan notification. For orphan notification, it expects to receive Fig. 14. Router in search Mode The router devices are generally not put in sleep mode, though it is not impossible to do so – it would require intelligent network to handle such routers. Figure 15 8
  9. 9. shows the average current once the router joins a coordinator in the range of 25mA. Fig. 15. Router joining network 7) Router~End Device Behavior to low power mode as measured in the oscilloscope. This is important, given that the idle state doesn’t engage in any constructive activity during the sleep time, which is the dominant fraction of the total event cycle. The low power mode is achieved using the code: __bis_SR_register(LPM3_bits + GIE) This shuts down System Clock Generator 1, System Clock Generator 2and the CPU Clock, as defined by the macro #define LPM3_bits (SCG1+SCG0+CPUOFF) The various low power modes of operation were studied and the sleep currents in those modes measured. Table VIII evaluates the average current in the corresponding low power modes of operation. The calculations involved the transmission peaks and the data polls at an interval of 1mSec. TABLE VIII. SLEEP CURRENT IN LPM MODES Fig. 17. Low power current variation region in sleep modes Though the comparative plots are identical, there has been a steady drop in current consumption after the packet transmission (on zoomed analysis) when the device switched 60000 Seconds 900000 Seconds LPM3 5.9 0.490159 0.136937 0.113389 6.4 0.49063 0.137432 0.113885 14.3 0.498073 0.145247 0.121726 LPM0 Sleep Current Variation 4000 Seconds 14.3 0.498073 0.145247 0.121726 Active Mode E. Low Power Mode Comparison One of the key aspects of CC2530 ZNP lit is its low power mode. As described previously, the ZNP goes into low power mode 3 once the transmission is done. Figure 18 shows the area where the current consumption value varies according to the modes opted. Current[uA] LPM1 Fig. 16. End Device joining a network. Low Power Mode LPM2 The router once joined by end device relays the packets over to the coordinator. Figure 17 displays an end device joining a router node. 60.3 0.541415 0.190757 0.16738 The average current consumption were evaluated considering the transmission current depicted in figure 8 and the polling current illustrated in figure 11. The values were calculated using excel math, varying duration and sleep current values. Thus, without Low power mode, the sleep current consumption is nearly 10 times more, as observed VIII. CONCLUSION The performance behavior of CC2430 devices was evaluated. As seen from the results, the current consumption of the ZNP mini devices is low in idle states and decreases when the transmission interval increases. Thus, increasing the interval between transmissions, especially the data polling from end device which does not carry any measurement data, would significantly reduce the power consumption and thus increase the battery life. The analysis can be extended to larger networks with multiple routers. The low power consumption was intelligently achieved by switching of the clocks and peripherals when not in used and turning on when required. The overall reduction in the current consumption with and without low power modes were compared, which significantly enhances the device efficiency. The routers, which are constantly active consumes continuous current since they are not put into low power modes. Achieving low power modes intelligently even in routers is a challenging task, since the router may be asleep when the end device requires it to relay the packets. One probable way is to synchronize the end device and router such that they both wake up in a particular pattern – though it would fail once the pattern breaks. Intelligent algorithms handle such scenarios which can 9
  10. 10. sharply increase energy savings thus the usage of these devices in wide scale applications. REFERENCES [1] Rex Min, Manish Bhardwaj, Seong-Hwan Cho, Eugene Shih, Amit Sinha, Alice Wang, Anantha Chandrakasan, "LowPower Wireless Sensor Networks," VLSI Design, International Conference on, p. 205, The 14th International Conference on VLSI Design (VLSID '01), 2001. [2]Jae Yeol Ha, Hong Seong Park , Sunghyun Choi, Wook Hyun Kwon, “EHRP: Enhanced Hierarchical Routing Protocol for Zigbee Mesh Networks,” IEEE communications letters, December 2007. [3]Texas Instruments, “CC2530ZNP Mini Kit Quick Start Guide” SWRU268A, 2010. [4]Texas Instruments, “Z-Stack – Zigbee Protocol Stack,” [Online], 2012. [5]Texas Instruments, “Zigbee-PRO Network Processor, Accelerate your Zigbee development,” SWRA312, 2010. [6]Texas Instruments, “MSP430x2xx Family Users Guide,” [Online], 2012, pp.26-41. [7]Charles E. Perkins, Elizabeth M. Royer, “Ad-hoc Ondemand Distance Vector Routing,” 2nd IEEE workshop on Mobile Computing systems and applications, 1997. [8]Suyash Jain and Morten Braathen, “ Measuring Power Consumption on Using CC2530 ZNP Mini Kit,” Texas Instruments Application Note AN108, 2011. [9]Texas Instruments Low Power RF Forum [Online] 10