Sub-1 GHz Wireless IoT Sensor Network

I have been investigating “Sub-1 GHz Wireless” (also known as “the 900 MHz ISM band”) for a new product proof-of-concept. The use-case is a network of 5 to 50 sensor nodes that send data to a hub node, where it is stored temporarily on an SD card and then transmitted over WiFi to an internet server for archiving, analysis, and reporting. The wireless technology needs to have a range of 2 to 3 km (sensor-to-hub or sensor-to-sensor), and very low power for a sensor node to have 1+ year operation using a CR2016 or AA primary cell. The hub node does not have the same power limitation, and can be always-on.

I will present the sensor and hub node hardware and software in this post, and in a subsequent post the cloud service that stores, processes and reports on the sensor data.

Sensor-Node Hardware

I’ll admit I’m somewhat of a TI fanboy at the moment, working with TI’s new 32-bit ARM Cortex M4-F development system now for several months. Although I don’t have many other recent comparison points, the experience was trouble-free and has given me no reason to switch from low-cost development boards with integrated debugging, an excellent software development environment, and business-friendly BSD-licensed support software. Consequently I looked first at devices with LaunchPad / BoosterPack support.

I decided to use a Sub-1 GHz transceiver for the best compromise between range and power consumption. Although the choice may have been somewhat arbitrary and naive, not considering such factors such as modulation technique, allowed transmit power, and antenna design, it allowed development to continue and is still the right choice. Sometimes an exhaustive analysis also means never releasing product, which doesn’t help anyone.

Perhaps fortuitously, the only Sub-1 GHz transceiver BoosterPack is the 430Boost-CC110L, which uses the Anaren A110LR09x, a certified FCC/IC/ETSI-compliant module containing a TI CC110L together with a PCB antenna. The CC110L BoosterPack has been available since December 2011, and is currently available in-stock from Digi-Key for $25 (a quick supply chain test). I have also received assurances from Anaren that their customers demand long lifetimes and the A110LR09x will be available for many years to come. As additional risk mitigation, the CC110L is a cost and feature-reduced version of the TI CC1101, which is also available from Anaren in a certified module, should a higher performance device become necessary, or should any supply issues arise (although unfortunately the CC1101 is only FCC/IC certified at this time).

Sensor-Node Software

The 430Boost-CC110L is provided with BoosterStack LITE, an application for the MSP430G2553 MPU. BoosterStack LITE was reportedly derived from the TI SimpliciTI stack to create a light-weight, single-channel protocol to demonstrate creating a simple star network, presumably removing features to be compatible with the MSP430G2553. For new applications, Anaren recommends using the Anaren BaseLink driver library (instead of modifying BoosterStack). However, I don’t understand yet how BaseLink relates to SimpliciTI, and whether a SimpliciTI-based networking would sit on top of BaseLink, the other way round, or if BaseLink is effectively included in SimpliciTI. For a more fully-featured protocol, Anaren recommends simply using SimpliciTI.

I need to build at least a minimal stack for software technology option before deciding which to proceed with.

Anaren BoosterStack LITE

  • Provided by Anaren with the 430Boost-CC110L as a demo app using the TI MSP430G2553 MPU.
  • Allows creation of a 3-node network (two sensors and one hub node) compiling with mspgcc, or a 5-node network (four sensors and one hub node) if compiling with IAR. I’m anticipating using a TI MSP432 32-bit ARM processor for production, which should alleviate any practical node limitation.
  • Anaren also provide a PC-based GUI – Air Traffic Control (ATC), but unfortunately ATC is missing features like data logging, and source code is not available.
  • BoosterStack LITE was reportedly derived from the TI SimpliciTI stack to create a light-weight, single-channel protocol to demonstrate creating a simple star network, and presumably was cut-back in order to use a low-cost MSP432 MPU. The source appears to depend on binary library (mspgcc and IAR versions are provided), but it is not clear if the library source is available.
  • Anaren recommends new applications use the Anaren BaseLink driver library.
  • For browsing convenience, I have created a GitHub repo with the BoosterStackLite source (https://github.com/dalers/airboosterstack).

TI SimpliciTI

SimpliciTI™ is a low-power RF protocol aimed at simple, small RF networks. It is open-source software, intended as the basis for building a network with battery-operated devices using a TI low-power RF System-on-Chip (SoC) or an MSP430 ultra-low-power MCU and TI RF transceiver.

LarsRF

LarsRF is a simple RF library for a TI MSP430G2553 LaunchPad and CC110L RF Boosterpack, using the low-level TI SLA3325 library for interfacing to the CC1101. It is BSD licensed in intent, although restricted to TI MPUs and wireless transceiver devices.

Phase 1 MSP430 Node

In Phase 1, the 430Boost-CC110L out-of-box demo application is evaluated using the provided pre-programmed MSP430G2553 MPUs (and two MSP-EXP430G2 LaunchPads) in a two-node network (one sensor node and one hub node).

Although the pre-programmed MSP430G2553 MPUs provided with the 430Boost-CC110L Sub-1 GHz transceiver BoosterPacks support a five-node network, the network is effectively constrained to three nodes when the executable is compiled from source using mspgcc (which must be done to use any sensor other than the MSP430 on-chip temperature sensor). Since the use-case requires a network of five to fifty nodes, as well as SD local data storage and internet connectivity, in Phase 2 the MSP430 MPU will be upgraded to an MSP432. 

CC110L_proto1_IMG_0449
Figure 1 – MSP-EXP430G2553 LaunchPad with 430Boost-CC110L.
CC110L_proto1_IMG_0450
Figure 2 – Using a Pelican Case for Environmental Protection.
CC110L_proto1_IMG_0451
Figure 3 – Ready for the Rain!
Figure 4 - PC Air Traffic Controller GUI showing initial testing with a 2-node network (one hub node and one sensor node).
Figure 4 – PC GUI (Anaren Air Traffic Controller) showing a 2-node network.

Phase 2 MSP432 Node

In Phase 2, the MSP430 MPU will be upgraded to a 32-bit MSP432P401R (with 64 Kbytes RAM and 256 Kbytes non-volatile memory) to support more than three nodes, as well as local SD data storage and WiFi internet connectivity.

Figure 5 MSP432 LaunchPad with SD card BoosterPack and 430Boost-CC110L
Figure 5 MSP432 LaunchPad with SD card BoosterPack and 430Boost-CC110L.

Using GTKWave and DatPlot to View Time Series Data

Sensor-based IoT devices often measure attributes of their environment, such as temperature, battery voltage, signal strength, etc. This data can be presented as a time series, which is a sequence of values obtained at successive points in time. The time between values may be fixed, such as every 1 ms, or it may be irregular or event-driven, such as only times when the value exceeded some threshold.

Many times it can be instructive to view time series data graphically to more readily perceive “the big picture”. Time series data can be plotted using a spreadsheet program (e.g. Excel®) or general purpose numerical analysis application (e.g. R and MATLAB®-compatible GNU Octave). However, a domain-specific program can focus on the job at hand and be more effective.

I naively first thought there would be no shortage of open-source or free-for-use applications to select from, but web searching proved that was not the case. When my eyes started to blur, only GTKWave and DatPlot appeared potentially suitable.

GTKWave

GTKWave was originally developed for viewing Verilog digital-only circuit simulations, although it now can also display real-valued signals. GTKWave will read Verilog VCD/EVCD format files, as well as LXT, LXT2, VZT, FST, and GHW formats. It is provided under the GPL open-source license, and is cross-platform (BSD/Linux, 32-bit Windows®, and OS X®).

GTKWave supports dynamic zooming and panning, has a time marker to display values at a specific time, and can be used with datafiles too large to fit into memory without loss of usability. It is also possible to use GTKWave with streaming data instead of a static input file. However, GTKWave will not read simple delimited text data, such as a CSV-format file. Also, while the vertical axis scales automatically based on the value range of a signal, the scale is not labelled and cannot be set manually.

Based on the user manual and provided data files, GTKWave appears to be useable with a large number of signals and very large data sets. The following screenshot shows the magnetic field around a small toroidal magnet.

tlv493-arduino-02-gtkwave

DatPlot

DatPlot was developed by an aerospace engineer as a better solution for visualizing flight test. The DatPlot tagline is From raw data to report ready plots in under five minutes. Like GTKWave, DatPlot supports dynamic zooming and panning and the vertical plot axis scales automatically like GTKWave, but unlike GTKWave the vertical axis is labelled and an arbitrary number of time markers (called Event Lines) can be displayed. In addition, DatPlot supports annotations which can be used to improve clarity. DatPlot is not open-source, although it is still free to use.

I have not yet been able to explore the usability of DatPlot with a large number of signals (Data Curves) or with very large data sets. The following screenshot again shows the 3D magnetic field around a small toroidal magnet (although not the same dataset shown by GTKWave).

tlv493-arduino-03-datplot

Summary

While GTKWave showed promise based on support for very large data sets, and for being open-source, its lack of vertical scale ultimately made it unacceptable for my immediate use case. GTKWave’s lack of support for simple delimited text files was only a minor inconvenience, as it was not difficult to write data values to a VCD-format data file.

DatPlot does what it claims to do, and is a nice compromise between static graph creation and interactive analysis. I will continue using DatPlot, but a few additional features would really make it shine.

  • Paging quickly forwards and backwards in time (e.g. by holding down Page Up or Page Down keys, instead of only being able to drag left or right in a Graph Pane).
  • Display a specific time in a dataset (instead of dragging to the desired point).
  • Support for CLI operation (e.g. using command parameters or a parameter file to specify source data file, desired Graph Panes and Data Curves, and output image file name).

Epilogue

During my research into a time series data viewing, I came across ROS.org (Robot Operating System). ROS uses bag files to store serialized ROS message data, and provides rqt_bag and rqt_plot utilities to view the data, including plotting fields on a graph. Embedded systems in general (not just robots) often need to store system messages for debugging or forensic analysis, and using the existing ROS bag-file and utilities could save significant effort compared to developing a similar system from scratch.

BitScope DSO QuickRef

I started using my BitScope BS100U again lately to test the I2C and SPI interfaces in a new project, but it had been a while since I’d used it and I actually had to crack the user manual. Ouch!

Here’s a QuickRef guide I created for BitScope DSO v2.9 while working through the manual. Please let me know if you find it useful, or if you think anything is missing. I will post the Microsoft Visio 2010 source file if there is interest.

 

BitScope DSO 2.9 QuickRef (Dale Scott)

 

I might also make a QuickRef for BitScope Logic, although Logic is considerably simpler than DSO (the error I seem to make is forgetting to set the trigger level for the clock channel).

Cheers!

Is open-source right for you?

I was asked recently to quote installing a 5-user open-source ERP system. Unfortunately, as with anything technical and complicated, “it depends”. Open-source software provides an incredible opportunity, but both client and vendor business models are still not familiar to most people outside the open-source community, who largely perceive open-source software as simply a less expensive alternative to traditional proprietary software.

Try asking yourself these questions:

  • Are you familiar with open-source software, its goals and philosophies, and licenses, business models, and support channels?
  • Is there a strategic benefit for using open-source software in your enterprise? Does using open-source software enhance your competitive position? Will you be “doing things” that are impossible otherwise, and will it be core to your business model?
  • Have you yourself installed the demo version, figured out the basics of how to use it, and have demonstrated it to anyone else?
  • Do you understand the technology involved? E.g. ERP, PLM, the internet, IoT, cloud hosting, change management, etc.
  • Do you understand the software development process? Change management? Agile? DevOps? Bug tracking? Workflow and data pipelines?
  • Is your finance person tech-savvy?
  • Do you have internal IT group, or do you already have a relationship with an IT services provider, or hosting provider?
  • Will you be configuring the software yourself?

You should have many more “yes” answers than “no” answers if open-source is right for you. More “no” than “yes” either means you have more boot-strapping to do, or you should buy a commercial product or service (which may possibly use open-source software behind the curtain).

To simply install open-source software on a server at a hosting provider generally costs practically nothing, typically at worst a couple hours for someone qualified. Add to that operating hosting costs, internal or external. The real costs are learning how to configure and use the software for your unique business, how to live with, work-around or develop the missing features (that you and least one other person insist are essential <wink>), customizing reports, etc.

As with any software, it’s important to uncover areas of friction as soon as possible. Finding out late that meeting a hard requirement will be extremely disruptive does no one any good. Prototype your basic business workflows and get quick validation by pretending you are various users performing their typical work tasks. However, it’s the confusing tasks, the ones “that depend”, or the ones that “we don’t need to deal with that now” that will likely determine in the end whether there’s a good fit or not, and also the implementation effort that will be needed. You may not need solutions for what you find, but you do need to know where you stand.

Fundamentally no one else can do this for you, because no one else understands your business like you do. The alternative is to have a proxy, which can turn the project into a 6-month to 18-month effort, with multiple people, requirements gathering, competitive product research, shortlist, deep-dive prototyping critical workflows with each shortlisted product, etc., which often is then beyond the ability of an SME to support.