Implement Flexible Smart Lighting Quickly and Easily with Zigbee Light Link

Digi-Keyの北米担当編集者 の提供

Smart lighting is a rapidly growing application that brings efficient LEDs with customizable features together with low-power wireless technology. However, due its expansion, developers are under constant pressure to minimize the cost per connection while also accelerating development time. With thousands or hundreds of thousands of light connections in play, a mature, reliable, low-power wireless connection is required.

There are a number of wireless technologies that might be suitable, but Zigbee offers a number of interesting characteristics, including:

  • A proven mesh networking foundation
  • The Zigbee Light Link (ZLL) application profile that is optimized for smart lighting
  • Design tool support making the technology relatively easy to implement
  • Widespread semiconductor vendor and lighting manufacturer support

This article briefly describes Zigbee wireless technology and its use for lighting applications. The article then looks at the development tools and reference designs that make it easier for a non-expert RF engineer to not only set up a wireless lighting network, but also maximize the potential of LED lighting.  

LEDs + RF = smart lights

LEDs offer many benefits over traditional lighting. Key among these are compact size, efficacy, and longevity. LEDs also bring flexibility to illumination. For example, solid-state lighting can be dimmed to a precise light output, instantly switched on or off, and if the light is produced by a white LED complemented by red, green and blue devices, adjusted to give a wide range of hue, saturation and color temperatures.

Adding RF connectivity to wirelessly control solid-state lighting allows designers to come up with flexible smart lighting applications. Wireless connectivity enables users to remotely operate lights, and make subtle changes to illumination such as varying light intensity from one small area of a room to another using a smartphone, remote control, or voice commands.

Many wireless technologies also support mesh networking, which not only extends the effective range of the wireless link, but also enables features such as the control of specific lights or small groups of lights across a dwelling or commercial premise. The bidirectional wireless link also gives the lighting fixture the ability to support other functionality such as proximity sensing and power metering.

The advantages of Zigbee

Several low-power RF technologies such as Bluetooth low energy, Thread, Z-Wave, and low-power Wi-Fi meet the requirements for smart lighting applications. Key among these requirements are license-free operation in the industrial, scientific and medical (ISM) spectrum allocations, low power consumption, interference avoidance and mitigation mechanisms, adequate bandwidth, interoperability, multivendor support, and widespread adoption. (For more information on low-power wireless technologies for this application see Digi-Key article, “Comparing Low-Power Wireless Technologies”.)

Zigbee shares these requirements while adding a few features of its own, including one that is specific to lighting applications. Notably, the technology was designed from the ground up for home and industrial automation applications. That makes its mesh networking capabilities particularly easy to set up and scale. Secondly, the technology is based on an IEEE 802.15.4 defined physical (PHY) and media access control (MAC) layer which offers the prospect of interoperability with other home automation protocols based on the same PHY and MAC, such as Thread (Figure 1). Thirdly, Zigbee has been adopted by some major lighting manufacturers such as OSRAM and Philips.

Image of Zigbee stack based on IEEE 802.15.4 PHY and MAC

Figure 1: The Zigbee stack is based on IEEE 802.15.4 PHY and MAC offering the prospect of interoperability with other RF protocols based on the same layers. (Image source: Zigbee Alliance)

Zigbee Light Link

Zigbee increased its suitability for lighting applications with the introduction of ZLL in 2013. ZLL is a Zigbee profile that sits within the application layer of an IEEE 802.15.4 PHY/MAC/Zigbee PRO stack (Figure 2).

Image of Zigbee Light Link is a Zigbee profile

Figure 2: Zigbee Light Link is a Zigbee profile within an IEEE 802.15.4/Zigbee stack’s application layer. (Image source: NXP Semiconductors)

ZLL was designed to be particularly user-friendly and targets the consumer market directly, as well as professional installations. The technology’s key advantages include a relatively straightforward commissioning and configuration interface, and a framework for interoperability between different manufacturers’ products.

A ZLL system comprises nodes, such as switches, sensors, remote controls, and smartphones that send control commands. The system also has nodes, such as monochrome and color lamps that receive and execute those commands.

The ZLL profile uses certain clusters, which are groups of commands and attributes that define what a device can do from the Zigbee Cluster Library (ZCL), and also defines a cluster of its own (“ZLL Commissioning”) (Table 1).

Category Cluster Cluster ID
ZCL Basic 0x0000
Identify 0x0003
Groups 0x0004
Scenes 0x0005
On/Off 0x0006
Level Control 0x0008
Color Control 0x0300
ZLL ZLL Commissioning 0x1000

Table 1: ZLL takes advantage of clusters from the ZCL and defines a commissioning cluster of its own. (Table source: NXP Semiconductors)

ZLL Commissioning enables creation of a ZLL network from scratch, or the addition of a new node to an existing ZLL network. A node from which commissioning can be facilitated is referred to as an ‘initiator’, which could be a device such as a remote control or lamp. One or several lights can be configured and adjusted from the controlling node.

Cluster software devices can be used by ZLL lighting devices and are included in the physical ZLL nodes that receive and execute commands (Table 2).

ZLL Device Device ID
On/Off Light 0x0000
On/Off Plug-in Unit 0x0010
Dimmable Light 0x0100
Dimmable Plug-in Unit 0x0110
Color Light 0x0200
Extended Color Light 0x0210
Color Temperature Light 0x0220

Table 2: Cluster software devices can be used by ZLL to increase the capabilities of Zigbee lighting networks. (Table source: NXP Semiconductors)

The functions of the ZLL software device are described below:

  • The On/Off Light device is typically used in nodes that contain a lamp which can only be switched on and off.
  • The On/Off Plug-in Unit device is typically used in nodes that contain a controllable mains plug or adaptor which includes an On/Off switch.
  • The Dimmable Light device is typically used in nodes that contain a lamp with adjustable brightness.
  • The Dimmable Plug-in Unit device is typically used in nodes that contain a controllable mains plug or adaptor which includes an adjustable output (to a lamp).
  • The Color Light device is typically used in nodes that contain a color lamp with adjustable color and brightness. This device supports a range of color parameters, including hue and saturation.
  • The Extended Color Light device is typically used in nodes that contain a color lamp with adjustable color and brightness. This device supports color temperature, in addition to the color parameters supported by the Color Light device.
  • The Color Temperature Light device is typically used in nodes that contain a color lamp with adjustable color (and brightness) which operates using color temperature.

The use of these software cluster devices enables engineers to build ZLL systems that offer functionality beyond just switching and dimming lights. For example, by using the profile, developers can build systems that enable the hue and color temperature adjustment, and the grouping capabilities described above. In addition, they can add proximity sensors to the system, set lights to operate at certain times, and enable remote control via an IP-compliant gateway when the users are away from the building.

Getting started with ZLL

Developing with ZLL has been made easier thanks to the development tools supplied by Zigbee chip vendors. Silicon Labs, for example, offers the RD-0085-0401 Connected Lighting Kit. The kit is based on the company’s EFR32MG1P732F256GM32 wireless microcontroller and comes preprogrammed with the Zigbee Z3ColorControlLight sample application. The kit comprises a lighting reference design module and a demonstration board (Figure 3).

Image of Silicon Labs’ Connected Lighting Kit

Figure 3: Silicon Labs’ Connected Lighting Kit comprises a lighting reference design module and a demonstration board (circuit diagram shown at bottom). (Image source: Silicon Labs)

The Zigbee application source code is available within the company’s EmberZNet PRO stack, but developers must first purchase and register a Silicon Labs SLWSTK6000B wireless starter kit.

Zigbee lighting is not natively interoperable with IP devices or smartphones, so gateways are typically required to bridge to an IP-based Ethernet or Wi-Fi-based wireless local area network (WLAN), and from the gateway to the cloud.

At the consumer product end of the market, lighting manufacturer OSRAM, for example, recommends consumers use its “Pro Gateway” to link its LIGHTIFY (Zigbee) lighting components for commissioning and configuration via PC or mobile device. The gateway also enables remote control from a smartphone when the user is away from home. (Figure 4).

Diagram of gateway between Zigbee and IP-based networks

Figure 4: Zigbee lighting systems require a gateway to bridge between Zigbee and IP-based networks, such as wired or WLANs and the Internet, to access the cloud. (Image source: OSRAM)

When developing with the Connected Lighting Kit and wireless starter kit, adding Silicon Labs’ RD-0002-0201 Zigbee USB Virtual Gateway to the development network is recommended. The virtual gateway includes a web server that presents a user interface to a desktop or mobile web browser, allowing developers to test out remote control of a system from a mobile device such as a smartphone.

All Zigbee networks must have one device that plays the role of coordinator and allows commissioning of new devices on the network. For development purposes it’s good practice to use the gateway as the coordinator. An additional advantage of a gateway is that it can be used to reprogram the Connected Lighting Kit with an .ota (“over-the-air”) file.

It’s also good practice to include other Zigbee devices in the development network, such as switches and additional lights, in order to test and verify their interoperability with the lighting reference design (Figure 5).

Image of Silicon Labs’ smart lighting development setup

Figure 5: Silicon Labs’ smart lighting development setup allows developers to quickly embark on Zigbee lighting system design projects. (Image source: Silicon Labs)

Building the application software for a simple system is straightforward using Silicon Labs’ Simplicity Studio IoT development software, teamed with an integrated development environment (IDE) based on Eclipse 4.5 such as IAR's Embedded Workbench.

To build the application software the developer adheres to the following process:

  1. Install the EmberZNet PRO stack
  2. Create a new Application Framework Configuration in Simplicity Studio AppBuilder and select the system-on-chip (SoC) stack release
  3. Create a project using Z3ColorControlLight sample application that comes with the Connected Light Kit
  4. In AppBuilder, under the “hal configuration tab”, verify the architecture and header files for the wireless microcontroller
  5. Save the project file into the directory
  6. Compile with Embedded Workbench or compatible IDE and program the wireless microcontroller

Once programmed, the Connected Lighting Kit can be easily configured via the host PC to turn LEDs on and off, set the brightness, set the hue, and set the color temperature.

It’s also possible to use the lighting reference design as the hardware basis for a commercial lighting project. One advantage of this approach is that the reference design has undergone preliminary Zigbee 3.0 compliance testing, as well as U.S. Federal Communications Commission (FCC) part 15 (emissions) compliance and antenna radiation pattern testing. The final design will still need to undertake full Zigbee and FCC certification, but the preliminary testing will help accelerate the test schedule.  

ZLL application programming interface (API)

NXP Semiconductor also offers development tools to support its Zigbee wireless transceivers. The company’s Zigbee portfolio is based on the JN5169 wireless microcontroller. The chip is specifically designed for IEEE 802.15.4/Zigbee PRO applications based on the ZLL firmware profile, as well as the Home Automation and Smart Energy profiles. To ease the hardware design, NXP offers a reference design including a pc board, wireless microcontroller, peripheral components, and antenna.

For development purposes, the company offers the JN5169XK020UL expansion kit. This development tool forms a Zigbee node based on the JN5169 wireless microcontroller. The node provides lighting and sensor functionality and can form part of a Zigbee wireless network. The expansion kit is added to the network via Zigbee commissioning.    

For firmware development, commission and test, engineers require an appropriate API for the microprocessor supervising the ZLL profile. NXP offers such a ZLL API for use with the company’s Zigbee PRO stack.

A ZLL application is developed as a Zigbee PRO application using the NXP Zigbee PRO APIs in conjunction with the Jennic Operating System (JennicOS) plus ZLL and ZCL resources.

NXP supplies the firmware for developing a ZLL application free of charge via a software development kit (SDK). This SDK is provided as two installers. One is shared with Home Automation and contains the Zigbee PRO stack and the ZLL profile software, including a number of C APIs. The other is BeyondStudio, an installer that contains the toolchain used for creating the application. This installer includes BeyondStudio for the NXP IDE, an integrated JN51xx compiler and a JN516x flash programmer.

The main phases of development for a ZLL application are the same as for any Zigbee PRO application and include:

  1. Configuring the Zigbee network parameters for the nodes using an appropriate configuration editor
  2. Configuring the JenOS resources to be used by the application with an appropriate configuration editor
  3. Developing the application code for the nodes using the Zigbee PRO APIs, JenOS APIs, ZLL API and ZCL
  4. Building the application binaries for the nodes using an appropriate compiler and linker
  5. Loading the application binaries into flash memory on the nodes using an appropriate Flash programmer

Conclusion

Smart lighting applications are expanding rapidly. While several wireless technologies are available to build the networks, Zigbee was designed for home and industrial automation from the outset, and that legacy makes it particularly suited to smart lighting applications. The ZLL lighting firmware profile simplifies and optimizes wireless connectivity for smart lighting.

As shown, chip vendors now offer development tools that make it a relatively simple matter to build application firmware based on ZLL for lighting applications. Such tools allow even the non-expert to take advantage of the environmental, longevity and flexibility benefits of LED lighting.

免責条項:このウェブサイト上で、さまざまな著者および/またはフォーラム参加者によって表明された意見、信念や視点は、Digi-Key Electronicsの意見、信念および視点またはDigi-Key Electronicsの公式な方針を必ずしも反映するものではありません。

出版者について

Digi-Keyの北米担当編集者