Which wireless works for the Internet of Things?
For many types of applications, the component selection process is relatively simple but for programmable semiconductors, such as microcontrollers, the development team must consider a much broader scope of criteria: availability of development tools, providers of end-of-line programming equipment and the quality of compiled code all need to be factored in.
With the rapid growth of Internet of Things (IoT) applications often comes the need to integrate one or more wireless protocols into a product. Of course, there are various modules on the market that can make the “problem” of wireless vanish, but such solutions, with the their integrated know-how and fixed firmware functionality, may lack the flexibility needed, not reach the price point desired or take up too much circuit board space. If a programmable chip solution with wireless capability is desired, or a wireless only module to extend a microcontroller’s capability, the development team will need to consider what software stacks are available along with any restrictions on development tool choices that software stack may bring.
Silicon options for IEEE 802.15.4 wireless solutions
Atmel’s newest IEEE 802.15.4 solutions come in the form of the SAMR21
family of devices, a single-chip solution integrating an ARM Cortex M0+ processor operating at up to 48 MHz with a low-power, 2.4 GHz transceiver. The transceiver offers a transmit power of up to +4 dBm and a receiver sensitivity of -101 dBm. Available with sixteen I/O pins in the QFN32 package, or twenty-eight I/O pins in the QFN48 package and featuring up to 256 KBytes of Flash and 32 kBytes of SRAM, these products seem ideally suited for designs needing high levels of integration.
If RF design is not your forte, then the pre-certified MRF24J40Mx wireless modules from Microchip should also be quite tantalizing. Operating in the 2.4 GHz frequency range they include an optional PCB antenna, optional PA/LNA for applications requiring better range, and an easy to configure SPI interface. With the PA/LNA option, the transmit power lies at +20 dBm and receiver sensitivity reaches -102 dBm. As the module only features the RF transceiver, the design team is free to choose its own MCU to control the module via its SPI interface.
Hardware development tools
To make the development team’s life easier, Atmel has released the ATSAMR21
-XPRO development board (Figure 1) replicating their successful “Xplained” format. Recent development boards have followed this same style that helpfully make the MCU pins available on easy to use connectors along the board’s edges. Additionally, the boards feature a powerful on-board embedded debugger known as the EDBG. The EDBG includes an ARM standard Serial Wire Debug (SWD) interface for debugging and programming the target MCU and a Virtual COM port, allowing easy transfer of serial (USART type) data between the MCU and a PC host - great for outputting debug messages from application code. Its Micro-USB connector also functions as one of the possible power sources. On the wireless side, both a chip antenna as well as an SMA connector are made available, making both system development and RF performance testing simple. Power consumption, critical in battery-powered designs, can be measured easily via an on-board header.
Figure 1: The SAMR21-XPRO features easy access to the microcontroller pins along the board edges, an on-board debugger and both a chip antenna and SMA connector.
Freescale takes a different approach with its 1322X Developer Starter Kit (DSK)
. Out of the box, the kit functions as a weather station application based upon two different reference boards; a Sensor Reference Board with temperature, pressure and acceleration sensors; and a Network Coordinator Board featuring a graphic LCD display. Both boards also feature a joystick, buttons and LEDs for monitoring and control, as well as a USB interface for connecting to a PC. Power supplies are included in the kit but the battery connectors show that Freescale recognized the need for environmental testing by walking around the laboratory while developing. A J-Link JTAG debugger is also included in this kit.
The MRF24J40MA PICtail/PICtail Plus
is a simple extension card fitted with Microchip’s proprietary PICtail and PICtail Plus connectors that are also found on their microcontroller development boards. This simplifies use with their PIC18 Explorer Board
for less demanding applications where 8-bit performance is more than adequate, or their Explorer 16 Development Board
when 16/32-bit power is required. Note that an in-circuit debug tool, such as the MPLAB ICD 3
or MPLAB REAL ICE
will also need to be purchased for full development.
Software development tools
Atmel maintains its own IDE, Atmel Studio 6, which is free to download and use. However, with the full installation at over 850 MB in size, leave plenty of time to download and install. Once installed, the user has almost everything required for wireless software development including a GNU GCC toolchain; Atmel Software Framework (ASF), a collection of APIs simplifying the programming and use of on-chip peripherals; and a huge range of example projects including over one-hundred targeted at the ATSAMR21
-XPRO. The built-in Extension Manager also offers further modules, such as the Wireless Composer and Wireless Performance Analyzer, which simplify configuration and wireless link performance testing.
If using the MRF24J40x Modules with a Microchip microcontroller (Figure 2), the MPLAB X IDE, available as a download of less than 400 MB, will also be required. This IDE can be run under Linux, MAC OS and Windows. Compilation tool chains must be downloaded separately and the free versions of the MPLAB XC compilers have limited optimization support. An upgrade to a paid-for license enables full optimization capability. The Wireless Development Studio, available as a separate download, provides network sniffing for MiWi™ networks using the ZENA Wireless Adapter
tool, also from Microchip.
Figure 2: The MRF24J40A is a certified module with PCB antenna allowing developers to select an appropriate microcontroller to match their needs.
Wireless software stacks
IEEE 802.15.4 is inextricably linked with ZigBee® and, when interoperability with such networks is desired, Atmel offers the Bit Cloud SDK, a ZigBee® PRO certified stack. If wireless interoperability is not required, Atmel offers its own proprietary networking stack named “Lightweight Mesh”. Supporting over 65,000 nodes in a mesh and with an 8 kB Flash/4 kB SRAM typical memory footprint, this should be more than capable for most system needs (AVR2130 ref. 1). For the more adventurous who wish to program at the IEEE 802.15.4 MAC level, there is also software available for specification compliant communication without the overhead of a stack (AVR2025 ref. 2).
Like the other solutions reviewed, Freescale also offers its own qualified ZigBee® stacks named “BeeStack”. Like the others, Freescale offers a proprietary mesh network offering, called SynkroRF, and features controller and controlled nodes. For the simplest of systems, where point-to-point or a star network will suffice, there is also the SMAC wireless networking protocol. All of the protocol stacks are complimentary and are available in the BeeKit software download. Upon downloading and installing, the necessary software files can be generated for inclusion in an IAR project along with the necessary documentation.
Microchip’s ZigBee® PRO stack costs around $1000 USD but they also offer their proprietary MiWi™ stack free. The simplest version, MiWi™ P2P, is a lightweight stack focused on point-to-point or simple star network topologies. MiWi™ PRO is a full mesh networking stack supporting a total of 8000 nodes, sixty-four coordinator nodes and a hop distance of sixty-five. A coordinator device requires less than 25 KB Flash, an end node device around 13 KB. The application note AN1629 provides an in-depth study of wireless performance and link budget calculation, clarifying many overarching concerns a team may have on total system performance.
For certain there is plenty of choice when connecting a product wirelessly to IEEE 802.15.4 networks in the IoT. All suppliers have a wide range of protocol stacks and most can be tried out for minimal outlay with the kits reviewed and some downloaded software. The Atmel and Freescale solutions excel when board space and high integration are key factors. But when space is not the greatest concern, a certified wireless Microchip transceiver module with the flexibility to choose an appropriate microcontroller might be the more appealing option.
- AVR2130 Application Note: Lightweight Mesh Developer Guide
- AVR2025 Application note: IEEE 802.15.4 MAC Software Package - User Guide
- Beekit wireless connectivity toolkit
- AN1629 Application Note: Simple Link Budget Estimation and Performance Measurements of Microchip 2.4 GHz Radio Modules