Contact IAR Systems
Home Products Support Resources Downloads About us Contact My Pages
Developer's Toolbox Webinars IAR Solution Selector Viewpoints Video Presentations Further reading LEGO MINDSTORMS NXT
 
Developer's Toolbox
Webinars
Recordings
IAR Solution Selector
How to use it
Viewpoints
Video Presentations
Further reading
LEGO MINDSTORMS NXT
Disclaimer
How to buy
Resources   >   Viewpoints   >  
Anders Lundgren




by Anders Lundgren, IAR Systems

 

Making ZigBee buzz using the right development tools

Although the ZigBee® wireless protocol has already been around for a few years, it is only just beginning to make a real impact on the market. So it is timely to review what the ZigBee technology is and what it can do for us, and importantly how ZigBee devices can be programmed to operate effectively and efficiently with the right choice of hardware and development tools.

What is ZigBee?

The ZigBee technology, based on the IEEE 802.15.4 standard, has a potentially huge market in the area of wireless control of industrial and home automation. Like Bluetooth, ZigBee is a Personal Area Networking (PAN) protocol for short-range applications, but unlike Bluetooth it has focused on very low power consumption to enable equipment to run unattended, without requiring a battery change for up to a year or more. People often wonder where the name ‘ZigBee’ comes from—in fact it is named after the silent means of communication used by honey bees, whose characteristic zigzag dancing tells fellow bees the precise location of a new food source.

Like WiFi and Bluetooth, ZigBee operates in the 2.4GHz ISM band, and uses spread spectrum modulation. Additional frequency allocations are at 868MHz in Europe and 915MHz in the Americas, the traditional frequency bands for short-range wireless applications. Table 1 summarises the main characteristics of the systems in each band.
Options for node "CheckSum"
Table 1: Comparison of ZigBee band allocations
Table 2 shows a comparison of the ZigBee specification with that of WiFi 802.11b and Bluetooth.
Options for node "CheckSum"
Table 2: Comparison of wireless technology specifications
Figure 1 shows the positioning of ZigBee as a short range, low data rate protocol, in comparison with other well-known wireless technologies. The relative simplicity of the specification, combined with the long battery life, makes it ideal for use in a variety of Wireless Sensor Network (WSN) and control applications in the home or in a light industrial environment.
Options for node "CheckSum"
Figure 1: Wireless protocol positioning
Figure 2 indicates the type of applications for which profiles are being developed. Typical home automation devices that can be controlled or monitored by ZigBee include on/off switches on mains electrical outlets, remote control of audio and video equipment, drawing curtains or blinds remotely, turning lights on or off and dimming them, occupancy sensors, temperature sensors and remote control of heating and air conditioning systems.
Options for node "CheckSum"
Figure 2: Typical ZigBee applications in a domestic or light industrial environment

Power saving

The critical determinant of battery life for a ZigBee system is the beacon interval. This is the time interval between successive bursts of communication between the sensor and the controller—analogous to the ‘handshake’ in cellular systems. The longer the beacon interval, the less power is consumed, as shown in Figure 3.
Options for node "CheckSum"
Figure 3: ZigBee battery lifetime under different beacon intervals, compared with that of Bluetooth
The length of the beacon interval that can be tolerated depends on the individual application—for a passive monitoring system such as a temperature sensor 60 seconds may be perfectly acceptable, but for adjusting lighting levels for instance the latency this would introduce would be intolerable and less than one second would be required.

One massive—and rapidly growing—application is that of smart energy metering. It has been estimated that over the next two years as many as one-third of all utility meters will be equipped with wireless sensing capability, which will both simplify billing and allow consumers to monitor and take steps to minimise their own energy usage.

Promoting ZigBee

The ZigBee protocol itself is being promoted globally by the ZigBee Alliance, a non-profit organisation with more than 280 members, including MCU vendors such as Freescale, Motorola, STMicroelectronics and TI, as well as prominent ZigBee OEMs such as Ember, Chipcon and Airbee. The ZigBee Alliance describes itself as a diverse ecosystem of companies providing everything from radio semiconductor chips, to finished products, encompassing also service, support, tools, and testing.

Another new initiative, called the IPSO Alliance, was formed in October 2008 to promote the Internet Protocol as the network technology of choice for connecting Smart Objects around the world. This will entail all kinds of everyday objects that can be controlled by a computer each being assigned their own IP address, and becoming capable of being monitored and interrogated remotely using a variety of interoperable technologies including ZigBee. The aim of the IPSO Alliance is to promote and educate users on the benefits of using IP to network physical objects of all kinds, and to drive the adoption of the IP protocol for connecting Smart Objects.

Microcontroller and tool choice

IAR Systems is actively working with a number of ZigBee Alliance members to help them optimize code size for their products.

Using the right development tools to generate the most compact code is particularly important for ZigBee projects, because not only do the microcontrollers that are being used have relatively small memory sizes, but also it takes longer to execute larger code and thus more power is consumed if the code size is large.

Many providers of ZigBee solutions are using 8-bit architectures—mostly 8051, AVR or MSP430—but the most popular are ARM7 or ARM Cortex-M3 32-bit cores. Because IAR Embedded Workbench addresses more than 30 target architectures and is independent from any vendor, it is suitable for use with any microcontroller that might be selected for ZigBee. IAR Embedded Workbench has a reputation for producing very compact code, and this is borne out by the fact that it has become the undisputed tool of choice—one might even say the de facto standard—among ZigBee developers.

IAR Systems is actively working with device vendors to make it easier for developers to get started with ZigBee designs. For example, earlier this year it collaborated with the Wireless Connectivity Group of Freescale Semiconductor to include IAR Embedded Workbench and IAR J-Link JTAG probe in the latest generation of Freescale’s BeeKit™ Wireless Connectivity Toolkit. These development kits are based on the ARM-powered MC1322x, Freescale’s IEEE 802.15.4 Platform-in-Package™ (PiP) IC. The BeeKit provides direct support for IAR Embedded Workbench, and the J-Link probe allows simple debugging through the IAR Embedded Workbench integrated development environment (IDE).

BeeKit is a stand alone software application that provides a graphical user interface (GUI) in which the user can create, modify, save and update wireless network solutions based on Freescale's protocol stacks. It includes a comprehensive code base of wireless networking libraries, application templates, and sample applications, and is designed to be easily scalable to support new code bases and functionality. The workspace files generated by BeeKit can be imported into IAR Embedded Workbench for continued development and debugging.

Conclusion

The ZigBee standard is now rapidly being adopted for home and industrial automation applications, and it is essential that developers have access to the right tools and support if they are to take full advantage of this rapidly growing market. In choosing a tool they should consider which one will give them the compactness of code to carry out all the functions required, yet still fit onto the memory of the device they have selected. And also whether the code will execute fast enough to adequately conserve power. The majority of ZigBee developers are finding that IAR Embedded Workbench is the tool that best fits all these criteria.
 
 
Note: ZigBee® is a registered trademark owned by the ZigBee Alliance.