Have you ever wondered about the status of the package you have delivered? Has any impact caused significant damage to the contents of the package?
Sensors can assist in monitoring these conditions, but it is essential to have low power consumption to increase battery life. This is where edge AI comes into play. At the sensor level, it can help save power while tracking the state of your package and detecting any possible events.
In this use case, we will show you how to implement a smart asset tracking solution using ST MEMS sensors.
Approach
We combined two advanced features available in the ST MEMS sensors: the machine learning core (MLC) and the finite state machine (FSM):
- We used Unico-GUI to generate and configure a decision tree model with three nodes to detect the different classes.
- The MLC processes the accelerometer data to detect the state of the package (e.g. stationary, in motion, shaken).
- The FSM processes raw and filtered accelerometer data to detect impacts and falls.
- In this example, the threshold for impact detection is set to 0.5 g, and the angle for upright is set to 26°.
- The interrupts generated on the INT1/INT2 pins of the sensor allow to wake up the microcontroller only when the desired events have been detected.
Sensor
3-axis ultralow-power smart accelerometer with AI, antialiasing filter, and advanced digital features (reference: LIS2DUX12).
Data
The accelerometer data have been acquired with ±16 g full-scale and 25 Hz output data rate in low-power mode.
Sensor orientation is set as for the ENU convention (with Z-axis pointing up).
Results
Power consumption (sensor + algorithm): 14.7 uA
The output of the MLC can be read from the MLC1_SRC (34h) register:
- 00h = Stationary – Upright
- 04h = Stationary – Not upright
- 08h = In motion
- 0Ch = Shaken
The FSM detects the following states:
- Impact, detected by FSM #1
- Free-fall, detected by FSM #2
The configuration generates an interrupt (pulsed and active high) on the INT1 pin every time the register MLC1_SRC (34h) is updated with a new value (when the state detected by the MLC changes). The duration of the interrupt pulse is 40 ms in this configuration.
The configuration generates an interrupt (pulsed and active high) on the INT2 pin when either a free-fall or an impact event is detected by the FSM. The free-fall interrupt remains active as long as the package is airborne. The FSM_STATUS (13h) register allows determining which FSM has generated the interrupt in order to distinguish between impact and free-fall events.
The post Smart asset tracking appeared first on STMicroelectronics - STM32 AI.