Getting Started with Connected Lighting

Set up your own Zigbee 3.0 network

By Clemens Valens (Elektor Labs)

Introduction: The Promise and Reality of Connected Homes

For many years, the promise of a future where all home objects communicate has been reiterated. Yet, consumers are still waiting. Who hasn't seen demonstrations of smart lightbulbs controlled wirelessly, reconfigurable at will? But how many homes are actually equipped with this technology?

While kits for connected lights and power outlets are commercially available, a multitude of networking and communication standards (Bluetooth, Wi-Fi, custom ISM-band, Zigbee) create incompatibility. This fragmentation means devices from one manufacturer generally cannot communicate with those from another, leaving home automation as a persistent "thing of the future" for most.

Cost is another barrier. With an average of 40 sockets in a US home and a price of approximately $25 per connected lamp/switch pair, outfitting a home could cost around $1,000 – a significant budget just to replace existing wired systems.

However, hope is emerging. In early 2017, Swedish furniture giant Ikea introduced its Trådfri line of connected lamps and dimmers, reportedly based on the new Zigbee 3.0 standard. This development is expected to significantly boost home automation adoption.

From ZigBee to zigbee

ZigBee, conceived in 1998 and standardized in 2003, is a low-power, low-data-rate wireless networking technology designed for Personal Area Networks (PANs) and small-scale projects like home automation and data collection. While the term "ZigBee" was prominent a decade ago, it faded from public view. In reality, the technology evolved, dropping its capital 'Z' and 'B', and discreetly found its way into many products. It's likely that many wirelessly connected lightbulbs or dimmer kits purchased today use zigbee technology, including popular systems like Philips Hue.

Figure 1: Ikea's Trådfri connected lamps and a remote control. According to zigbee network sniffers, these lamps are zigbee 3.0 compatible, though officially they use ZigBee Light Link (ZLL) and ZigBee Home Automation (ZHA).

Figure 2: The Philips Hue personal wireless lighting system, which utilizes the ZLL protocol.

Zigbee 3.0 and Future-Proofing

An inconvenience of earlier zigbee versions was the proliferation of sub-protocols addressing specific needs. Zigbee 3.0 aims to remedy this by offering backward compatibility with Zigbee PRO, ZigBee Light Link (ZLL) 1.0, and Home Automation (ZHA) 1.2. It also supports over-the-air (OTA) firmware upgrades and simplifies device addition (node commissioning), including Touchlink commissioning via Near-Field Communication (NFC).

Beyond zigbee, other standards like Bluetooth and Wi-Fi (with their low-energy derivatives) are also vying for a place in home automation. Smartphones and tablets, ubiquitous and equipped with these technologies, serve as convenient remote controls. The rapid evolution of technology means any universal system must be future-proof, capable of supporting multiple wireless protocols and being field-programmable to accommodate new standards.

A truly future-proof platform for home automation should support several wireless protocols and be field-programmable. Such a multiprotocol platform could do more than just control lights; it could capture sensor data, function as a beacon, and become part of the Internet of Things (IoT), running multiple protocols simultaneously at minimal cost and energy consumption.

Making Connected Lighting Tangible: The Silicon Labs Kit

To experiment with connected lighting, evaluation or demonstration kits from silicon vendors are ideal. This article uses a setup from Silicon Labs, featuring a Raspberry Pi-based zigbee gateway and a sophisticated zigbee node with an LED.

Image: A tablet displaying a "Smart Home" interface. The screen shows the current home status: temperature at 22.6°C, weather as "CLOUDY" with 17°C. Below this are icons for "Home", "Music", "Network", "Security", and "Camera". A circular slider shows a light setting at 45%. Below the main display, days of the week (Monday, Tuesday, Wednesday) are shown.

Figure 3: The Silicon Labs zigbee gateway (ref. RD-0001-0201), built on a Raspberry Pi. It includes the RPi, an enclosure, SD card, Wi-Fi dongle, and MeshConnect stick.

Figure 4: The connected lighting node reference design RD-0085-0401 from Silicon Labs. This board combines a user-programmable EFR32-Mighty-Gecko-based radio module with a sophisticated LED.

Setting Up Your Zigbee 3.0 Network

Getting started requires a gateway and at least one node. The Silicon Labs gateway is built around the ultra-low-power EFR32 Mighty Gecko System-on-Chip (SoC). The kit (RD-0001-0201) includes a Raspberry Pi 2 Model B, a MeshConnect USB stick from CEL, an enclosure, SD card, Wi-Fi dongle, and power adapter. The MeshConnect stick (RD-0002-0201) can also be purchased separately.

The connected lighting node, a reference design (RD-0085-0401), is also available. For example, a capacitive sense dimmable-light switch (RD-0039-0201) can be added to extend the setup.

Prepare the SD Card for the Raspberry Pi

  1. Using a computer, download the official Raspbian Lite operating system from this URL. It is crucial to use the 2016-05-27 version due to specific driver requirements.
  2. Insert the SD card into your computer.
  3. Use Etcher (recommended by the Raspberry Pi Foundation) to install the downloaded image onto the SD card.
  4. Safely eject the SD card from your computer.

Prepare the Raspberry Pi

  1. Insert the prepared SD card into the Raspberry Pi (RPi).
  2. Connect the RPi's Ethernet port to a network router using an Ethernet cable.
  3. Connect the CEL MeshConnect stick to a USB port on the RPi.
  4. Insert the Wi-Fi dongle into another USB port on the RPi.
  5. Optional: Connect a keyboard and monitor to the RPi. This is not strictly necessary for the following steps.
  6. Power on the RPi.

Finalize Software Installation

  1. Find the RPi's IP address on your network (e.g., by checking your router's connected devices list).
  2. Open an SSH session to the RPi's IP address using a tool like PuTTY. If you connected a keyboard and monitor, you can perform these steps directly in the RPi's Command Line Interface (CLI).
  3. Log in using the username pi and the password raspberry.
  4. Enter the command sudo raspi-config and press Enter.
  5. In the raspi-config utility:
    • Select option 1, "Expand Filesystem", and wait for it to complete.
    • Reboot the RPi when prompted.

    Figure 5: The Raspberry Pi requires configuration using the raspi-config utility, which can also be used to change the default password.

  6. Reconnect your SSH client (e.g., PuTTY) and execute the following commands one by one, pressing Enter after each. Be careful with typos.
    • sudo chmod 666 /etc/apt/sources.list
    • sudo echo deb http://devtools.silabs.com/solutions/apt jessie main >> /etc/apt/sources.list
    • sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 90CE4F77
    • sudo apt-get update
    • sudo apt-get install silabs-zigbee-gateway
    • sudo apt-get install silabs-networking
    • sudo reboot

Almost There

At this point, the Raspberry Pi should function as a Wi-Fi access point (AP) and be visible to your computer.

  1. Connect to the Wi-Fi network named "Silicon Labs xxxx" (where "xxxx" is a 4-digit hexadecimal number).
  2. Open a web browser and navigate to the IP address 192.168.42.1.

Figure 6: The web interface for the Silicon Labs Zigbee Gateway. All status lights are green, indicating readiness. The '➕ ZigBee3.0 Device' button is used to add new nodes.

Run the Gateway: Adding Nodes

If you see "ZigBee 3.0 Network: Up" in green, proceed to the "Run the Gateway" section.

Connect via SSH to 192.168.42.1 using your SSH client (e.g., PuTTY) and log in as before (username pi, password raspberry). Ensure the MeshConnect stick is connected and identify its serial port (e.g., /dev/ttyUSB0).

Execute the following commands to update the gateway firmware:

  • sudo service siliconlabsgateway stop
  • cd /opt/siliconlabs/zigbeegateway/
  • sudo python tools/ncp-updater/ncp.py scan
  • sudo python tools/ncp-updater/ncp.py flash -p /dev/ttyUSB0 -f firmware/ncp-uart/em3588/*.ebl
  • sudo reboot

Now, build your connected lighting network by adding nodes:

  1. Connect a computer, smartphone, or tablet to the gateway's Wi-Fi network as described previously (steps 17 and 18).
  2. Connect the EFR32MG zigbee node RD-0085-0401 to a USB power source.
  3. Set the 'Select' switch on the node to the right position ➡️ to activate the network status LED.
  4. Set the VDD Off/On switch to the right position ➡️.
  5. Set the LVL Lo/H switch to the right position ➡️.
  6. In the browser interface, click or tap the '➕ ZigBee3.0 Device' button. Listening for new devices lasts for 120 seconds but can be extended.
  7. On the zigbee node RD-0085-0401, press the S1 button 10 times rapidly to enter "join mode". The board should appear in the interface as 'Dimmable Color Light - 0xXXXX - 1 - (Joined)', where XXXX is a 4-digit hexadecimal number.

Figure 7: The connected lighting node RD-0085-0401 has been successfully added to the zigbee 3.0 network.

Figure 8: The complete web interface for controlling the connected light. It shows brightness, color temperature, hue, and saturation controls. The "No Images Found" message at the bottom indicates that firmware images for Over-The-Air (OTA) programming need to be placed in a specific directory.

And Now?

You now have a functional zigbee network ready for experimentation. You can explore further by customizing the gateway, designing your own nodes, or integrating other devices. The future of connected lighting is now partly in your hands.

Shutting Down the Gateway

It is improper to switch off a Raspberry Pi by simply pulling its power. Like any modern computer running a complex operating system, it must be shut down properly to avoid file corruption. The RPi does not have a power button, but it can be shut down from a terminal (directly or via SSH) using the command:

sudo poweroff

Wait until the green LED stops blinking (the red LED will remain on), then unplug the power supply.

More Information

For comprehensive details on the gateway, its options, capabilities, and possibilities, refer to the Silicon Labs document:

  • [1] UG129: Zigbee Gateway Reference Design User's Guide (RD-0001-0201, RD-0002-0201).

For full details on the Zigbee node, consult the document:

  • [2] UG252: ZigBee Lighting Reference Design Demo Board Kit User's Guide (RD-0085-0401, RD-0035-0601). Schematics and other design files are also available for download.

FROM MOUSER

PDF preview unavailable. Download the PDF instead.

v1 Adobe PDF Library 15.0 Adobe InDesign CC 2017 (Windows)

Related Documents

Preview UG129: Zigbee Gateway Reference Design User's Guide
This user's guide for the Silicon Labs UG129 Zigbee Gateway Reference Design (RD-0001-0201, RD-0002-0201) provides comprehensive instructions for setting up and configuring the Wi-Fi/Ethernet and USB Virtual Gateways. It details the software architecture, functionality, and troubleshooting for integrating Zigbee devices into IoT solutions.
Preview Silicon Labs UG171: ZigBee Smart Outlet Reference Design Kit User Guide
User guide for Silicon Labs' UG171 ZigBee Smart Outlet Reference Design Kit (RD-0051-0201), detailing setup, operation, hardware, firmware, and testing for home automation applications.
Preview Flipping the Switch on Smart Connected Lighting: A Silicon Labs Whitepaper
Explore the rapidly maturing smart lighting market with Silicon Labs. This whitepaper covers the evolution of lighting, advantages of connected LEDs, market trends, design requirements for multiprotocol connectivity, and key application areas like smart homes, buildings, and cities.
Preview UG124: ZigBee Contact Sensor Reference Design Kit User's Guide
User's guide for the Silicon Labs UG124 ZigBee Contact Sensor Reference Design Kit (RD-0030-0201), detailing its features, setup, hardware, firmware, and testing for home automation applications.
Preview Silicon Labs Bluetooth LE SDK 5.0.0.0 GA Release Notes
Detailed release notes for Silicon Labs Bluetooth LE SDK version 5.0.0.0 GA, covering new features, improvements, fixed issues, known issues, and multiprotocol capabilities for the Gecko SDK Suite 4.2.
Preview EFR32MG1 Mighty Gecko SoC データシート | Silicon Labs
Silicon Labs EFR32MG1 Mighty Gecko SoC データシート。統合シリアル・フラッシュ、ARM Cortex-M4 コア、およびマルチプロトコル無線機能を備えた高性能、低消費電力デバイスの詳細情報。
Preview EFR32 Series 2 Layout Design Guide for Optimal RF Performance
This guide from Silicon Labs provides essential PCB layout design principles for EFR32 Series 2 wireless MCUs, focusing on achieving optimal RF performance. It covers matching network design, component placement, ground plane strategies, and best practices for high-frequency circuit board design.
Preview UG103.2: Zigbee Fundamentals - A Comprehensive Guide to Zigbee Technology
This document provides a comprehensive overview of Zigbee fundamentals, covering its architecture, networking, routing concepts, mesh topologies, node types, the Zigbee Cluster Library (ZCL), Zigbee 3.0, and compliance. It is designed for project managers, application designers, and developers working with embedded wireless networking solutions from Silicon Labs.