Connected devices are often networked using any of several mesh topologies which emphasize network robustness, area coverage, and low power. Designers typically have had to pick one of these competing and incompatible protocols and then go about implementing the software stack on the chosen hardware platform. Both tasks are challenging, and now both may be unnecessary.
Thanks to advances in integration, developers have the option to choose an existing low-cost, small footprint, mesh network controller that supports multiple competing standards including Thread, Zigbee, and Bluetooth low energy (BLE). This provides several degrees of flexibility:
- It allows developers to proceed with the design and select a protocol later in the design cycle.
- It allows developers to test and choose the best protocol for the application, empirically, using a single device and development platform.
- A single platform can be used for multiple applications and geographic regions.
- It allows devices to be deployed with one protocol and then later changed to another with a firmware upgrade.
This article will describe some of the basics of wireless mesh networking before introducing the Mighty Gecko wireless system-on-chip (SoC) family and related development tools from Silicon Labs. It will then show how a designer can use this as a platform to quickly create a working mesh network based on various competing network protocols.
What is a wireless mesh network?
Wireless mesh networks differ from familiar star topology networks like Wi-Fi, or point-to-point protocols, per the original Bluetooth specification. In a mesh network, data packets can “hop” from one connected device to another until they reach their destination (Figure 1). Also, each individual device needs only to be in range of one other device on the network in order to communicate with all other devices on the same network. For example, a device in the basement can communicate with a device in the attic, even though neither may have enough RF energy to reach each other directly. A good mesh protocol will optimize the route according to the application’s requirements.
Figure 1: A star network (top) has a central router or access point through which all nodes must communicate, while in a mesh network (bottom) all nodes cooperate to distribute data in a network. (Image source: Silicon Labs)
Because all the devices in a mesh network cooperate by forwarding messages to their destination, the network can tolerate missing, faulty, or powered down nodes. Assuming each node is within range of more than one other node, this hopping and routing capability makes mesh networks highly robust and fault tolerant. The concept is similar to the TCP/IP protocol suite that underlies the internet itself: data packets eventually find their destination, even if not always via a direct route.
There are several competing mesh networking protocols and they’re all mutually incompatible, although they rely on similar underlying principles. Zigbee, Thread, and BLE are three such examples. They all operate in the same 2.4 gigahertz (GHz) band but use different mesh protocols so they don’t interoperate.
Each wireless mesh protocol has its pros and cons, and developers are left to decide which standard works best for them. In some cases, developers may prefer to create their own proprietary wireless mesh network rather than adopt one of the standards. This might be for reasons of security, or product differentiation, or to implement some unique feature set.
Introduction to Mighty Gecko
To maximize flexibility and decrease design and development time it’s a good idea to choose a wireless network controller that supports multiple standards. This gives developers flexibility in four ways. First, it postpones the decision over the choice of network standard until much later in the design cycle when there may be better customer feedback or market information. Second, it allows developers to test different network standards in the lab and choose the best one based on empirical evidence. Third, it allows a single platform to be deployed in multiple products using different network standards. This might be particularly useful when serving different geographical markets around the world. Fourth, it allows the device or platform to be altered, enhanced, or upgraded in the field, perhaps even by changing the network it supports.
To provide designers this flexibility, Silicon Labs developed the Mighty Gecko family of mesh networking wireless SoC devices (Figure 2). The family (internally called EFR32MG) includes several related members, all of them based on the same 40 megahertz (MHz) Arm® Cortex®-M4 32-bit processor core.
Figure 2: Based on an Arm Cortex-M4, the Mighty Gecko SoC family has nearly everything needed for a wireless mesh network controller. (Image source: Silicon Labs)
Choices include the size of the on-chip flash memory (256, 512, or 1024 kilobytes (Kbytes)), the size of the internal SRAM (32, 64, 128, or 256 Kbytes), the package type, and the temperature range. All Mighty Gecko SoCs are specified for industrial temperature range (-40°C to +85°C), with some qualified for extended/automotive temperatures (-40°C to +125°C).
As an SoC, the Mighty Gecko has nearly everything needed for a wireless network controller. The radio section in the upper-left of the block diagram shows two separate RF sections: one for the 2.4 GHz band with up to 19 dBm of transmit power used for Thread, Zigbee, and BLE, and a separate sub-GHz radio with up to 20 dBm of power for implementing proprietary networks.
The chip also has extensive on-chip power management, an operating voltage range of 1.8 to 3.8 volts, an integrated DC/DC converter, and the ability to “wake on radio”, which allows the entire chip to sleep in low-power standby mode until it receives a radio packet. In addition, built-in signal strength detection, preamble pattern detection, frame detection, and timeout allow the chip to wake only on those radio transmissions that are relevant to it, not necessarily for all radio traffic.
Rather than design a Mighty Gecko-based board from scratch, it’s much easier to start with a ready-made evaluation and development kit. The SLWSTK6000B mesh starter kit has all the hardware and software required to set up and test a small mesh network.
The kit includes three identical sets of boards, each consisting of a main board and a choice of plug-in radio boards (Figure 3). A single set might be useful for early evaluation or software development, but at least two would be needed to test the network, and three or more to test the mesh capabilities. So, it makes sense that the SLWSTK6000B kit comes with three sets of everything.
Figure 3: One SLWSTK6000B starter kit includes three identical sets of main boards and plug-in radio boards to create a small mesh network. (Image source: Silicon Labs)
What might appear to be a large IC in the middle of the main board is actually an LCD display (Figure 4). The 128 × 128 pixel monochrome display requires very little power and stores pixel data internally, so it doesn’t have to be refreshed. The Mighty Gecko microcontroller chip is located on the smaller plug-in radio board.
Figure 4: A main board/radio board pair from the SLWSTK6000B mesh starter kit. The large device in the center is a bitmapped LCD display. (Image source: Silicon Labs)
The plug-in radio boards are removable and replaceable on each main board, and the kit comes with two different types for each main board (a total of six radio boards). The boards in the kit all support Zigbee and Thread in the 2.4 GHz band, but other boards with other RF characteristics and frequencies are also available, including ones that support sub-GHz frequencies for proprietary networks.
It’s a good idea to assemble the hardware and power it up before installing and running the software IDE, but it’s not mandatory. Simply choose a radio board and gently press it onto the matching headers on the main board. Power can be supplied in a few different ways (i.e. battery, AC adapter, or USB), but a USB cable is the simplest and provides some additional advantages. The USB connection is on the left edge of the main board, opposite the radio board.
Once the board is powered up, a blue LED near the USB connector will light up and the square LCD in the center will illuminate. After a short pause, a green “heartbeat” LED will also illuminate.
For the next steps, it’s best to keep the hardware connected to the development system via the USB cable. It’s also a good idea to move the small three-position power switch (near the lower-left corner of the main board) to the far right “AEM” position.
Simplicity Studio is Silicon Labs’ all-in-one integrated development environment (IDE) for Mighty Gecko, as well as many of the company’s other microcontrollers. To download the free software, visit the company’s Simplicity Studio download page. Install and run Simplicity Studio before proceeding.
Launch Simplicity Studio and follow the prompts to carry out some additional configuration steps specific to the development kit hardware and the desired software. The process is straightforward but requires a few decisions, and possibly an extra step for hardware registration.
If the main board is still connected to the development PC as recommended above, Simplicity Studio will detect the hardware’s USB interface during its installation and will automatically download and configure some hardware-specific features.
The next step is to download the hardware-specific software for this development kit. Simplicity Studio offers two options: “Install by Device” or “Install by Product Group” (Figure 5). Either will ultimately produce the same result, but it’s easier to select the former option, so click the large green “Install by Device” button.
Figure 5: Simplicity Studio offers two routes for loading project-specific software support; install by device or install by product group. (Image source: Digi-Key Electronics)
Simplicity Studio should automatically detect the development board, but if not, it’s easy to manually locate the required software package. Simply type “SLWSTK6000B” in the search box, as shown in Figure 6. Double-click the software support package it suggests, then click Next.
Figure 6: Typing in SLWSTK6000B in the search box quickly locates the required software. (Image source: Digi-Key Electronics)
Next, Simplicity Studio will highlight additional software support available for this hardware configuration. Some of this software is restricted to users who have registered with Silicon Labs and/or registered the hardware. Some options might therefore be grayed out and temporarily unavailable, as shown in Figure 7.
Figure 7: Access to some software is conditional upon hardware proof of purchase. (Image source: Digi-Key Electronics)
The software stacks for Thread, Zigbee, and some other protocols are contingent upon proof of purchase of the mesh-enabled hardware, such as the SLWSTK6000B development kit, so it’s important to complete the following registration steps before proceeding.
Start by locating the 10-digit hexadecimal code on the outside of the Mighty Gecko starter kit box. (For help finding the 10-digit key, refer to “Access to Silicon Labs Wireless Mesh Stacks” in the Silicon Labs Zigbee & Thread Knowledge Base.) Then click the “Register Kit” link on either the Thread or EmberZNet (Zigbee) options, as shown above. This will complete the hardware registration and unlock the mesh network protocol stacks. Click Next to proceed.
Finally, Simplicity Studio will present a lengthy manifest of all the software options it recommends to install, including one or more C compilers, optional real-time operating systems, profiling tools, and many other options (Figure 8). 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 8: The final software manifest for Simplicity Studio shows all the software options it recommends to install, including one or more C compilers, optional real-time operating systems, and profiling tools. (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 mesh network applications using either Thread, Zigbee, Bluetooth, or a custom proprietary protocol. Simplicity Studio includes a few simple preconfigured demo programs, as well as example code that can be modified, all to get developers started on the right foot.
Creating wirelessly connected devices that use a mesh network has become straightforward thanks to a preconfigured kit of compatible hardware and pretested software. The hardware’s flexibility allows for fast empirical evaluation of different network protocols, such as Zigbee, Thread, and BLE, while also allowing for future changes from one protocol to another. This change can take place either during the design and development stage, or after the final product has been deployed.