on 2024-06-10 07:13 AM
This knowledge article provides an example of a wearable application based on the new ST IMU LSM6DSV32X.
There are ready-to-use examples for LSM6SV32X inside the repository on GitHub github.com/STMicroelectronics/STMems_Overall_Offer.
In fact, the STMEMS_Overall_Offer repository is made up of different repositories related to MEMS sensors, among which:
STMems_Standard_C_drivers, which contains examples of integration of different sensors including the LSMDSV32X written in the C programming language.
Here you can find the source code of the drivers of our devices and examples about how to use different features available in the sensor itself.Open the repository of the machine learning core STMems_Machine_Learning_Core to see what is available inside:
Since our example is for wearable application, we are going to use a board called the SensorTile.box PRO. SensorTile.box PRO is a programmable wireless box kit for developing an IoT application equipped with a wide variety of MEMS sensor and wireless connectivity.
We are going to use a specific 3D-printed case for SensorTile.box PRO to be able to mount a board on our wrist like a smartwatch. To do this, we decided to use a dedicated case, whose 3D drawing Model can be found as STEVAL-MKBOXPRO 3D Drawing Model 1.0 in the CAD resources section.
In general, a DIL24 adapter of an external MEMS sensor can be connected to the DIL24 socket of the SensorTile.box PRO. So, we have connected a DIL24 adapter of the LSMDSV32X sensor, STEVAL-MKI240KA, on the top of the SensorTile.box PRO to develop our wearable application, as shown in Figure 2.
The SensorTile.box PRO can be easily connected via Bluetooth to your smartphone through an app called the STBLESensor app. From the STBLESensor app we can control the SensorTile.box PRO and develop our application. To start creating our application, we need to do the following in the STBLESensor app:
Go to [Flow] -> [Expert View] -> [New App] and then select IMU with the MLC in the Expansion DIL24 section.
Now, we can load the LSMDSV32X configuration to our sensor through a configuration file (lsm6dsv32x_activity_recognition_for_wrist.ucf).
Then we can enable the data stream from the board to the phone through Bluetooth.
Finally, we can save the application created and download it to the SensorTile.box PRO. Figure 4 sums up all these steps.
Once the board is programmed, we can test the application by checking the outputs of the decision tree configured in the machine learning core of the LSMDSV32X sensor.
You can see that the output is:
As you remember, we have selected the activity recognition for wrist from the GitHub application examples related to the machine learning core features for LSMDSV32X.
There are of course other examples available for both MLC and FSM that you can use, or you can also build your own configuration for the sensor.
We have created a wearable application based on the new IMU LSM6DSV32X.
Explore all the ready-to-use examples on the GitHub repository for ST MEMS sensors!
Details are available at the following links: