Emphasizing ease of use and interoperability, Z-Wave® is one of the leading wireless network technologies for consumer and “smart home” applications. However, achieving Z-Wave’s characteristic ease of use is a challenge for designers and every Z-Wave-based device must be officially certified for compliance before going to market.
These challenges add cost and development time in an application where it is critical to minimize both for a successful design. Unless there is strong radio frequency (RF) hardware and firmware expertise in-house, designers are wise to choose pre-certified components and preexisting solutions. RF design is not an area for learning and experimentation for a design that’s likely on a tight schedule and budget; the nuances of RF propagation and its on-board and environmental coupling effects are too intricate and complex.
This article describes some of the basics of wireless mesh networking, and Z-Wave in particular. By way of example, it then introduces the 700 Series Z-Wave-compatible microcontroller chip family and related development tools from Silicon Labs to show how to quickly create a working and certifiable Z-Wave network suitable for new consumer devices.
What is Z-Wave?
Z-Wave is one of many competing standards for home wireless mesh networking (Figure 1). Others include Zigbee, Thread, and Insteon. Although not originally designed with mesh capability, Wi-Fi and Bluetooth have been updated with mesh networking to now also compete in this space, albeit at different power levels and data rates.
Each wireless network has its pros and cons, but Z-Wave was designed specifically for low-cost, low-power consumer devices and is constantly evolving to meet new demands.
Figure 1: Z-Wave is a wireless mesh networking technology for the home that is constantly evolving to meet new application demands. (Image source: Digi-Key, from Silicon Labs material)
In a mesh network, data packets can “hop” from one device on the network to another to ultimately get to a target device. Thus, two devices don’t necessarily have to be within radio range of each other. As long as a device is within range of at least one other device on the network, that device can forward the data to the next device within range, and so on until the data reaches its destination. There may be several different routes between any two devices on the network, so the mesh protocol will determine the shortest and most efficient route. The more connected devices per network, the greater the level of redundancy and the more robust the network.
This network hopping is simple in concept but difficult to implement in practice. Each Z-Wave device, or node, must be able to communicate with any other node, regardless of its manufacturer, features, age, range, or firmware revision level. As a member of a mesh network, nodes must be able to act as initiators, targets, or intermediaries between other nodes that are out of range of each other. Each node must also be able to exchange application-level data and commands with any other node. Consumers might add—or remove—nodes at any time, and the network must still remain robust, operating seamlessly and without interruption. In a nod for ease of use, nodes must be able to join (and leave) the network and operate with no complicated user setup, no DIP switches, no service set identifier (SSID) or password, and potentially with no keyboard, mouse, or user interface of any kind.
On the technical side, Z-Wave is a low-speed, low-power wireless network. Its data rate is limited to 100 kilobits per second (kbps), though common speeds are closer to 40 kbps. Typical operating range is on the order of 30 meters (m) to 40 m, depending on the network’s RF components, design layout and antenna placement, as well as environmental factors such as walls and ambient interference. Because it’s a mesh network and not a point-to-point network like Wi-Fi or Bluetooth, Z-Wave data packets often hop from one node to another, extending the effective range to a few hundred meters from end to end, providing ample coverage for home applications.
Operating in the sub 1 gigahertz (GHz) portion of the industrial, scientific, and medical (ISM) band (908.42 megahertz (MHz) in North America and 868.42 MHz in Europe), Z-Wave is not subject to interference from Wi-Fi or Bluetooth. While Zigbee also can operate in that same portion of the ISM band, it’s typically implemented in the more popular 2.4 GHz band which has wider global acceptance. This also means that Z-Wave devices typically don’t interfere with these other wireless networks.
Introduction to Zen Gecko
Silicon Labs produces a wide range of low-cost, low-power microcontrollers in its Gecko family. The product tree is further subdivided into several application-specific areas, including the “Zen Gecko” branch for Z-Wave development.
The company offers two different Z-Wave devices in its Zen Gecko family. One is a “smart modem” chip and the other is a complete standalone module-on-chip. The modem chip (part number EFR32ZG14P231F256GM32-BR) is designed to be used in conjunction with a host processor, while the module (ZGM130S037HGN1R) can be used by itself with almost no external components.
Both devices are based on a 39 MHz Arm® Cortex®-M4 microcontroller core, though the two are implemented differently. Arm’s Cortex architecture is a modern, RISC-based microcontroller design that is widely supported with software and hardware development tools from hundreds of vendors.
In the case of the ’ZG14 modem chip, the internal Cortex-M4 comes preprogrammed with the Z-Wave protocol stack. The processor is not available to the user, and it’s essentially invisible to developers. This gives the modem chip the ability to process complex Z-Wave protocols, but it also requires an external processor of some sort for application code. This makes the ’ZG14 a good choice for relatively complex products that have the space and performance requirements to support a separate microprocessor or microcontroller. It also makes Z-Wave compatibility easy to add to an existing product by adding the ’ZG14 smart modem and connecting a few signals and RF components.
The ’130S module, on the other hand, is fully self-contained and can be used standalone as the only microcontroller in the product. It exposes its internal Cortex-M4 to the developer, who is free to use it for application code. The ’130S module is physically larger than the ’ZG14 smart modem, but also includes far more functionality, including analog-to-digital (ADC) and digital-to-analog (DAC) converters, analog comparators, a capacitive sense interface (for touchscreens), counters, timers, watchdogs, and UARTs, among others. The module requires little more than power, ground, and antenna connections to realize a fully functioning Z-Wave controller.
Together, these two devices comprise the 700 Series, Silicon Labs’ newest Z-Wave components that comply with the latest Z-Wave specifications. Specifically, they support updated security features (Security-2, or S2) and SmartStart, a simplified user setup option. Both devices support all three Z-Wave data rates (9.6, 40, and 100 kbps) as well as all global frequency bands. Like all Z-Wave devices, they are backward compatible with all previous Z-Wave devices and controllers.
Users with previous experience using Silicon Labs’ 8051-based Z-Wave devices (the “500 Series”) may want to port some or all of their existing code to the newer Arm-based devices. To help with this, Silicon Labs provides software libraries and “building blocks” to ease the transition. Older 8051 code may not simply recompile to newer Arm code, but the code libraries should help considerably.
Inside the EFR32ZG14 Z-Wave chip
The EFR32ZG14 is a smart modem system-on-chip (SoC) that is simple in concept (Figure 2). It includes a two-wire serial interface to/from an outside host processor, an internal Arm Cortex-M4 MCU core to process the Z-Wave protocol stack, and a radio section that provides almost all the components required for a physical radio.
Figure 2: Block diagram of the EFR32ZG14 Zen Gecko modem SoC. The chip acts as a smart modem for the Z-Wave mesh network. Its only external interfaces are a UART to/from the host processor and a radio transceiver. (Image source: Silicon Labs)
In operation, the ’ZG14 communicates with a host processor over a simple UART interface at up to 115,200 baud. Only two signal wires are required, transmit and receive. The host processor sends commands and data over this UART interface and the ’ZG14 responds. A third signal for resetting the ’ZG14, RESETn, can be driven by any convenient I/O pin on the host processor.
There are only three required digital lines to/from the host processor, four digital signals between the ’ZG14 and a simple IPD (integrated passive device), a crystal, and handful of simple analog components (Figure 3).
Optionally, designers may choose to connect an active-low SUSPEND signal, which places the ’ZG14 in a low-power state and halts all radio communication. Depending on the intended application, the ’ZG14 may actually spend most of its time in this suspended state to conserve energy.
There is also an optional three-wire connection to the chip’s internal flash memory, allowing developers to reprogram the ’ZG14’s firmware on the fly. Such firmware is provided in binary form by Silicon Labs. As mentioned earlier, the firmware on the ’ZG14 is not intended for user code.
Figure 3: In a typical EFR32ZG14 Zen Gecko implementation, the smart modem chip requires ~20 external components and only a simple three-wire serial interface to the host processor. (Image source: Silicon Labs)
The use of a surface acoustic wave (SAW) filter shown in Figure 3 is optional and may depend on the geographic location where the end product will be deployed: some regions of the world require a SAW filter, while others do not. Designers might also choose to include a SAW filter bank and configure it on the fly through the two SAW0 and SAW1 output pins on the ’ZG14. This would allow the end product to adapt itself to any region, thus simplifying design, manufacturing, and stocking.
Inside the ZGM130S Z-Wave module
The ’130S module is considerably more complex and capable than the ’ZG14 modem SoC. Silicon Labs calls it a system-in-package (SiP). As the nomenclature suggests, the ‘130S is essentially multiple chips in one, making it a standalone microcontroller and Z-Wave controller (Figure 4).
Figure 4: Block diagram of the ZGM130S SiP module. The SiP is a standalone microcontroller and Z-Wave controller, with an Arm Cortex-M4 and plentiful analog and digital I/O available to the developer. (Image source: Silicon Labs)
The module’s central Arm Cortex-M4 processor core runs at 39 MHz and includes 512 Kbytes of flash memory and 64 Kbytes of SRAM. Most of this memory is available to the user, as the Z-Wave protocol stacks are already incorporated in the module’s radio transceiver block in the upper-left of the block diagram. This block is effectively equivalent to the ’ZG14 smart modem chip.
The ’130S includes its own internal DC/DC regulator and internal crystal so it needs no external clocking components. The module also includes several analog and digital peripherals, including ADCs and DACs, a temperature sensor, two analog comparators, three op amps, a capacitive sense interface, a DMA controller, 32 general purpose I/O pins, and more. The LGA64 package for the ’130S is pin limited, so depending on the software configuration, not all I/O pins may be available at all times.
Although the ’130S is housed in a 64-lead package, its external connections are trivially simple. As Figures 5 and 6 show, the device requires only simple bypass capacitors for power/ground, and a single connection for the antenna. The remaining pins are available for user I/O.
Figure 5: The ZGM130S SiP module requires only a pair of bypass capacitors. (Image source: Silicon Labs)
Figure 6: The ZGM130S SiP module includes virtually all radio components and has only a single-wire interface to an antenna. (Image source: Silicon Labs)
Beginning with the starter kit
Likely the easiest way to begin Z-Wave development with the Zen Gecko family is with the Z-Wave 700 starter kit. The kit includes two of everything for a minimal two-node network: two main boards, two radio boards, two expansion boards with switches and LEDs, two flexible antennas, and two USB cables. It also comes with two USB dongles for use with a PC: one is loaded with a Z-Wave radio sniffer application (Zniffer), and the other with Z-Wave controller functionality. The hardware and included software support all Z-Wave options and protocols in all global geographic regions.
One set of boards, with the radio board plugged in on top and the expansion board on the right is shown in Figure 7. The main board doesn’t include the ZGM130S SiP; that component is mounted on the radio board. Instead, the main board prominently features a bitmapped LCD that’s useful for debugging or GUI development.
Figure 7: One SLWSTK6050A Z-Wave 700 starter kit includes two identical sets of main boards, radio boards, and expansion boards to create a small Z-Wave network. (Image source: Silicon Labs)
Simplicity Studio is Silicon Labs’ all-in-one integrated development environment (IDE) for the company’s many microcontrollers, including Zen Gecko. It supports Windows, MacOS, and Linux.
The installation and configuration process will be easier if one of the main boards from the development kit (it doesn’t matter which one) is connected to the development system while Simplicity Studio installs. The IDE will detect the hardware and automatically load the necessary software support for it.
If the hardware is not available, it’s possible to perform this configuration manually, as described here:
Once Simplicity Studio is running, click the green arrow near the upper-right corner (Figure 8).
Figure 8: The main screen of the Simplicity Studio IDE. The download link is highlighted. (Image source: Digi-Key Electronics)
Simplicity Studio will present two options: “Install by Device” or “Install by Product Group” (Figure 9). Either will ultimately produce the same result, but it’s easier to select the former option, so click the large green button, “Install by Device.”
Figure 9: Simplicity Studio offers two routes for loading project specific software support. (Image source: Digi-Key Electronics)
If the development board is installed, Simplicity Studio should automatically detect the hardware, but if not, it’s easy to manually locate the required software package. Simply type “6050A” (a shorter version of the development kit’s full name) in the search box, as shown in Figure 10. Double-click the software support package it suggests, then click Next.
Figure 10: Typing “6050A” in the search box quickly locates the required software for the development board. (Image source: Digi-Key Electronics)
Next, Simplicity Studio will highlight additional software support available for this hardware configuration. In some cases, certain software modules will be restricted to users who have completed supplemental license agreements and/or registered the hardware. As a result, some options may be grayed out and temporarily unavailable, as shown in Figure 11.
Figure 11: Access to some software is conditional upon hardware proof-of-purchase or additional software licensing. (Image source: Digi-Key Electronics)
Finally, Simplicity Studio will present a lengthy manifest of all the software it intends to install, including one or more C compilers, optional real-time operating systems, profiling tools, and many other options (Figure 12). Certain options can be manually enabled or disabled if desired, but it’s generally best to accept the suggested software loadout. When ready, click Next.
Figure 12: Final software manifest for Simplicity Studio. Certain options can be manually enabled or disabled if desired, but it’s generally best to accept the suggested software loadout. (Image source: Digi-Key Electronics)
As a final step, Simplicity Studio will display its master software license agreement, which covers all the software components it’s about to install. Read and accept the license, then click Next one final time.
Software installation will take several minutes. When it’s complete, close and restart Simplicity Studio. Everything is ready to begin creating Z-Wave mesh network applications, including a few simple preconfigured demo programs, as well as example code that can be modified, all to get developers started on the right foot.
Z-Wave is intended to be easy for consumers to use, but that usability masks a lot of underlying development and certification work by designers. However, creating a new Z-Wave mesh network device is straightforward when a designer opts to use a preconfigured kit of compatible hardware and pretested software. The Z-Wave 700 Series modem SoC, SiP module, and associated development kit provide the hardware and software needed to quickly build a two-node network that assures compatibility with this complex yet highly efficient protocol.