Maker.io main logo

How to Create a Wearable Using ST Sensor Tile & Atmosphere IoT Studio

21

2019-12-31 | By Maker.io Staff

License: See Original Project Wearables

SensorTiles and Wearables

The SensorTile is a powerful micro-sized microcontroller development system that includes an accelerometer, pressure sensor, and inertial sensors. Because of these features, the SensorTile is highly ideal for wearable projects such as smart watches and sports monitoring devices. This project will demonstrate how the SensorTile can quickly be used as a wearable environmental monitor that reports back the surrounding environment of the wearer such as the temperature, pressure, and rotation.

BOM

Scheme-It

 

 

The Hardware: The SensorTile Kit

The SensorTile Kit includes all the hardware needed for this project. This demonstrates how the SensorTile really is ideal for small, portable projects. While the SensorTile can be connected to the larger expansion board, in this project, we are required to solder it to the SensorTile cradle. Once the SensorTile is directly soldered to the cradle, it is nearly impossible to remove it without having to use special desoldering tools, but this does not mean that the expansion board can’t still be used in another project (as the expansion board has a socket connector for the SensorTile cradle board header.)

The cradle is used for a number of reasons, with the most important being that the cradle provides all the needed hardware to get the SensorTile to function correctly. The cradle also has a 3-pin battery connector for connecting to the provided lithium-ion battery that will provide our project with portable power.

Working with the Software

The device software for our project is simple and makes use of the interval element, the three different sensor elements, and the Bluetooth element. Once every second, the interval element probes each sensor for its latest data and then these values are sent over Bluetooth. For the sake of demonstration, the magnetic and rotation sensory data is sent as a string, and therefore when this is displayed on the app, it will show an array that contains all three axes. However, the Bluetooth element that takes the acceleration reading has been changed from a string type to a 3D vector type (more on this later). The cradle that holds the SensorTile also includes additional hardware such as a humidity sensor, but this will not be used in this project.

software_1

Device App

The device app again is simple and uses the interval element, the linked Bluetooth elements, and the label element. Once a second, the interval element probes all the Bluetooth elements for their latest data, and then this data is displayed onto its appropriate label. The labels are not made to just display the value but also include a small descriptor. For example, the MagneticReading Bluetooth element displays "Magnetic Field: " + readData instead of just the readData.

device_2

Unlike the other elements, the acceleration Bluetooth element has its data type changed from a string to a 3D vector. This project shows how individual axis can be accessed from a singular variable, and this is done with .x, .y, and .z accessors. Therefore, instead of using one label to show all axes simultaneously, three labels each access the Bluetooth element readData and pick out the specific axis that they are dealing with. For example, the x axis is obtained using the variable readData.x.

readdata_3

Your Own Wearable IoT

With the software complete the final stage for this project is mounting the hardware into a project box that is ideal for wearables. Fortunately for us, the ST SensorTile kit comes with a small project box designed to house the SensorTile cradle that exposes the debugging cable as well as the SensorTile itself. At the same time, there is enough room to house the battery as well as exposing the USB micro B and on/off switch.

The project box also has two slots so that the whole project can be worn like a watch! Once worn, the on/off switch can be turned on, and the SensorTile will connect to the Atmosphere IoT Studio app on a smartphone.

From wearables to robots and doorbells and much more, the Atmosphere IoT Studio offers many different options for dynamic, fun projects. We’ll keep expanding what the Atmosphere IoT Studio can do in the coming year, and we’d love to hear about some of your project ideas in the comment section below!

Mfr Part # STEVAL-STLCS02V1
SENSORTILE CONNECTABLE NODE
STMicroelectronics
$298.25
View More Details
Mfr Part # NUCLEO-F030R8
NUCLEO-64 STM32F030R8 EVAL BRD
STMicroelectronics
Mfr Part # 1950
JUMPER WIRE F TO F 6" 28AWG
Adafruit Industries LLC
Add all DigiKey Parts to Cart
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.