DesignSpark Electrical Logolinkedin
  • Brought to you by
  • RS Components
  • Allied Electronics

June 12, 2017 09:52

Follow

Thunderboard BLE Simplicity

 

Thunderboard BLE simplified and streamed to the web
Based on the EFR32 from Silicon Labs the Thunderboard range of development kits and modules are designed to provide a quick route to cloud based IoT solutions. Out of the box the kits are aimed primarily at Bluetooth 4.2 (BLE) however for the Sense board this is not the only RF protocol supported. The Thunderboard range is preconfigured to provide streaming sensor data out of the box, but this is just a small subset of what these modules are capable of.

Two boards with many common features
React (122-3409)

  • Si1133 UV Index and Ambient Light Sensor
  • Si7021 Digital relative humidity and temperature sensor
  • Si7201 Hall-effect Magnetic Sensor
  • Invensense MPU-6500 Six-Axis (Gyro + Accele`rometer) Motion
  • Tracking device2 Buttons2 LEDs

The react kit is in essence an expansion board for the Blue Gecko BGM111 module. This means the kits come with a pre-certified radio module, so integration into a new design comes with less work. Depending on your application the Thunderboard React kit maybe a better fit. Alternatively if a second kit is required the react may be a lower cost alternative to the main Bluetooth smart module starter kit, (894-7134)

Being based on a commercial module, progressing to a custom application is made simple and code changes will be minimal. In addition the design changes are also much lower risk due to the RF section being a module. The kit comes with three items: the React board, A CR2032 battery and a MEDER M13 magnet.

Sense (125-3043)

  • Relative Humidity and Temperature Sensor Si7021
  • UV and Ambient Light Sensor Si1133
  • Pressure Sensor BMP280
  • Indoor Air Quality and Gas Sensor CCS811
  • 6-axis Inertial Sensor ICM-20648
  • MEMS Microphone SPV1840
  • High brightness LEDs

While the boards are roughly similar, the Sense has more sensors and features, with the only absence of the hall effect sensor. At the time of writing Silabs claimed the hall effect sensor was coming soon, however it is not fitted on the version we have so would need to be added into the empty footprint.

Within the kit is the board itself and a CR2032 battery. The Thunderboard sense kit is based on a muti-protocol version of the EFR32, allowing for other IoT protocols.

This means that within a single development kit we have: Bluetooth 4.2 , Zigbee and Thread.

A point to note however is that the Thunderboard is not already approved, so a custom layout will need certification for progressing from prototype to finished product. Documentation on these features was a little thin and some investigation would be required before choosing this kit as a Zigbee module.

What the GATT? 

If you’re not familiar with BLE and it’s terminology it’s very easy to get lost. In simple terms BLE is designed around a client/server architecture and all data communicated is within a framework. This framework is a Generic ATTribute protocol. In essence a database of expected use cases and data structures designed specifically for these use cases.

A GATT will contain a number of ATT’s (ATTribute profiles). There are specific GATT structures defined in the specification. So if we use the pre-defined GATT then our sensor will just work with other devices and applications that are compliant to the specification. E.g. The Thunderboard sense has the environmental sensing service which means any other android applications designed to read this profile can read and more importantly interpret this data. This is important for an application to be comparable with other devices/services.


A classic example of this would be a heart rate sensor. Gone are the days of bespoke software, if it a heart rate sensor doesn't work with the applications like Strava then it’s not going to sell. Using a standard profile makes this easy.

There is much more information about BLE on the Bluetooth website.


Simplicity studio

Silabs provide an IDE called Simplicity Studio. The installer for both windows and Linux, worked well and within a few minutes the IDE was installed.


One point to note on Ubuntu 16.4 it was necessary to set “export SWT_GTK3=0” for the application to work correctly.


Upon connecting the Thunderboard Sense the IDE automatically detects and downloads relevant applications and examples. This is also worth doing as there was a later application version than was installed in my Thunderboard Sense.


Opening the Thunderboard Sense example the IDE pulls in all of the relevant header files and code required to compile the pre-installed application (latest version). This may take a while as there is a lot of data included. The IDE opens to show the Bluetooth SDK and configured GATT profiles. 


Back to the Thunderboard Sense demo we have quite a few GATT, ATT’s configured. Sadly most of these are custom so will not be compatible with other applications. If operation with another a standard ATT was desired then it could always be added. Modifying the code to add this may not be a trivial task but should be possible. It’s likely the GATT handling code would likely need to be modified which is an advanced task.


Adding some more debug to the USB serial port is a trivial task and could be useful to allow access to the sensor data already used. However, how to add additional functionality wasn’t obvious at the time of writing this article.

Android and iOS integration

Both modules come with a single android/ios application to provide output from the many sensors available on the kit.
The source is on GitHub

Providing a sample android application for BLE. This is not the simplest BLE application, especially if you are new to BLE or android and still learning. A better starting point would be the BLE Le Gatt Android example. Sticking to a standard GATT profile is also easier (and more compatible) than a custom profile like the one used by most of the Thunderboard demos.

On the other hand if you require a more fully featured example this is an excellent starting point, The application has GATT profiles pre-configured for all of the demo applications, so the Bluetooth Low Energy aspect of the design can be ignored to allow a much quicker development of a new IoT application.


The Thunderboard application (pictured above) provides a simple graphical output for all of the sensors on the relevant module. It also allows streaming to the cloud with storage of data for 30 days. However at the time of writing this article the streaming service was not working correctly, this should be resolved at some point in the future.

Led lighting

 

 

 

 

 

 

 

 


Using the automation IO features it took only a few minutes to install the Thunderboard application and turn on the green and blueled. But what happens if I don't want to use the Thunderboard application and use something else, I hear you ask. Never fear there is an extensive library of Bluetooth 4.x applications available on both the android and IOS market places that would allow you to control peripherals without proprietary software.

Some examples would be BLE Scanner (commercial software) or CySmart & NRF connect, both made by semiconductor companies to help sell their own BLE silicon. However, due to the standard nature of Bluetooth, both applications are compatible with the thunder boards. This means we can read/modify attributes directly using more generic third party software! A further step still would be using the GATT Automation IO and writing a new application is possible to provide a bespoke application.

Lots of features in two boards.
Karl Woodward

Karl is a design engineer with over a decade of experience in high speed digital design and technical project leadership in the commercial electronics sector.

June 12, 2017 09:52

Follow