Replies: 1 comment
-
Note that for low-power continious analysis, one should use the FIFO support in the IMU. This enables the host microcontroller to sleep as the IMU collects data, then just transfer + process it occationally. For activity recognition one uses a relatively low samplerates of 25-100 Hz, and FIFO buffer in BMI270 has 2 kB capacity so it can hold several seconds worth of data. This kind of sensor-readout is now supported in Zephyr, using the new "read and decode" API (https://docs.zephyrproject.org/latest/hardware/peripherals/sensor/read_and_decode.html#streaming). Unfortunately, many of the drivers do not yet support this mode (one can grep for SENSOR_DECODER_API_DT_DEFINE). Polling will of course be fine for a proof-of-concept. But any professional battery-powered device would need a FIFO approach, so I think it would be a good showcase/example for Zephyr overall. |
Beta Was this translation helpful? Give feedback.
-
Hi, I found ZSWatch via one of the Youtube talks - very cool work. Zephyr is a great foundation, the device is very packed with features and the watch looks really slick.
I am curious if there are others who are interested in smartwatch applications that using the accelerometer/gyro/IMU to analyze motion, recognize activities? Examples could be sleep tracking, overall everyday activities' classification (sitting, walking, running, etc), exercise tracking (can be specific exercises like jacks/lunges/pushups/etc). Since machine learning is dependent on datasets, what exactly we will be able to do is of course a bit dependent on what datasets we are able to find and/or gather.
In the research/engineering literature the overall area is often called Human Activity Recognition (HAR).
I am developing an open-source machine learning library for microcontrollers (https://github.com/emlearn/emlearn), and this is one of the potential application areas. I have worked a little bit on some example code, at https://github.com/emlearn/emlearn-micropython/tree/master/examples/har_trees
The feature extraction code there is in Python, but it could be ported to C rather easily. The machine learning models are already available in the C library.
Beta Was this translation helpful? Give feedback.
All reactions