A ZigBee home networking example

By Jon Adams

A quick review
With the first ZigBee wireless technology-enabled product introductions occurring at the beginning of 2005, it is a good time to review how ZigBee networking performs its magic.

As you probably know, ZigBee networks are natively mesh-based, which means that ZigBee supports point-to-point and multiple hop connections to insure that a message can get from source to destination.

This is similar to the Internet or the telephone network, where there are hundreds of switching/routing centers spread throughout the world. Each center has multiple interconnections to other switching/routing centers, so that if a fiber route is out of service, the data can still go through almost without interruption.

Network device types
There are three types of logical network devices defined in a ZigBee network:

  • The simplest device is an End device. The End device has no routing ability (in other words, it cannot manage someone else’s traffic).
  • The next level up the network is called the Router, which is fully mesh-capable and mains-powered (or powered from some other permanent source). Routers can establish multiple peer-to-peer links with other routing nodes, and accept connections from End devices. The Routers may also serve as a gateway to the Internet or to other networks.
  • The highest functionality device is the mains-powered Coordinator, which has the authority to establish networks and perform whatever network management might be required. The Coordinator also has routing capability, and may serve as a gateway to the Internet or to other networks.

There is only one Coordinator per ZigBee network, while there might be dozens of Routers, and potentially thousands of End devices. Most importantly, all devices are transceivers (they transmit and receive) since the ZigBee protocol expects most messages to receive an acknowledgement in order to verify successful reception.

End device functionality
End devices are often battery-powered. Typical End devices function as thermostats, humidistats, light switches, smoke detectors, and various sensors. These devices are often built as peel and stick products, where installation is intended to be simple, and product placement is either esthetic, functional, or per some governmental requirement. These End devices do not form a mesh by themselves; instead, they are usually asleep in order to conserve their batteries.

Router and Coordinator device functionality
Since the Router and Coordinator devices are mains-powered, they are always listening for network traffic. Packets generated by End devices may pass through multiple Routers to travel from the source to a destination, which is generally a load-controlling function (HVAC motor, lighting load control, damper actuator, siren, etc.). However, the destination may also be a data-collecting device like a computer or security console, or even a gateway to the Internet or other non-ZigBee network. All of these devices have a source of permanent power, so the ZigBee radio connected to these devices ends up being a Router or Coordinator.

Routers and Coordinators leave their receivers on except when transmitting, so they build up a table of neighbor nodes, which include routing nodes they can directly hear.

ZigBee home example
The practical example shown in Figure 1 is a home with a ZigBee network that controls the lights, security system, fire system, and the heating and air conditioning.

The diagram shows a number of devices, where a red link is a Router-to-Router link, and a blue link is an End node to Router link.


Figure 1. Home Network

Here, lighting fixture B (which might also be the Coordinator) has identified and established routes via Routers embedded in lighting fixtures A and F, mains-powered (with battery backup) smoke detector C, and table lamp D.

All the Routers are mains-powered devices (lamps, heat pump, lighting fixtures, smoke alarms) and the End devices are battery-powered (switches, thermostats, motion detectors). Sensors are bound to actuators through sometimes either the choice of the user, or because of specific binding specified by the manufacturer.

Home network topology
Light switch b is bound to and controls hanging lighting fixture B, and communicates with it directly (single hop). Some of the control is multi-hop: for instance, peel-and-stick thermostat/HVAC controller c communicates with the HVAC heat pump K located outside the home through a complex route, potentially due to RF obstructions or interference that might preclude a direct path. So when the home occupant wants to cool the house a bit, that command is sent from c to K through intermediaries B and A, both lamp fixtures behaving as network Routers. Note also that there is an alternate path, via B-G-J-H, which has more hops and is probably less efficient.

The network determines the cost of a route using various metrics and assigns the best route as the primary, and other less favorable routes as secondary. Why the secondary routes? Remember the ZigBee slogan: Wireless control that simply works. The message that the thermostat/controller sends out will generally take far less than 100ms to get to the HVAC heat pump, and the heat pump is expected to acknowledge that message in the same time. If the thermostat does not get the response, it will try again. If there is a network problem (for example, the link between B and A is disrupted due to interference), node B can go to the alternate route, where it sends the message via the longer path.

Another important aspect is that the network is a multi-use system, where lighting, HVAC, and security all can take advantage of the others’ existing infrastructure. This is not mandatory, and can be defined by the manufacturer of individual devices, but allows a far more powerful and robust network to form quickly.

ZigBee advantages
ZigBee networks are able to form autonomous mesh-networked connections where routing devices establish multiple links with other routing devices. In addition, they continuously determine routing costs to allow the network to move traffic in the most efficient manner. This flexibility adds robustness and reliability to a ZigBee device, affording the user to best take advantage of wireless control that simply works.

. . . . .

Jon Adams is chair of the ZigBee Alliance's Qualification Group, and is the director of Radio Technology and Strategy for the Wireless and Mobile Systems Group of Freescale Semiconductor, a wholly-owned subsidiary of Motorola. Jon speaks and presents regularly on ZigBee, UWB, and the future of embedded wireless for machine-to-machine communications. Contact Jon at jta@freescale.com.

The ZigBee Alliance is an association of companies working together to enable reliable, cost-effective, low-power, wirelessly networked monitoring and control products based on an open global standard. Contact the alliance directly for membership and event details.

ZigBee Alliance
Tel.: 925-275-6607
Fax: 925-275-6691
Web site: www.zigbee.org