At CES 2017, ST announced that several smartphones were compatible with the WeRun feature found in the WeChat messaging app, thanks to two components : the 6-axis inertial module LSM6DSL or LSM6DSM, and the eCompass LSM303AH. These MEMS (Micro Electro-Mechanical Systems) are very popular with manufacturers of mobile devices, because of their precise sensors. They can also offload some computations from the main MCU, and they consume very little energy (only 0.4 µA in low-power mode). What makes them special is that both can also act as a pedometer, which means a device can track its user’s run or walk steps with little impact on performance or battery life. To better understand how ST is able to offer such a powerful capability in the tiniest of packages, let’s understand how the pedometer works.
Both LSM6DSL/M, and the LSM303AH use an accelerometer that senses movement by measuring the changes in electrical potential. When a user takes a step, a free element made of silicon, and attached to an anchor, moves in the direction sensed. As it is displaced, it gets closer to or further from the base structure, which impacts their capacitance. This is enough to measure speed change, but also absolute wrist tilt, and relative tilt. The data is output in digital form on a standard SPI or I2C serial bus to the host MCU.
Customizing the Pedometer
ST’s components are special because they not only sense movement, but include special hardware units to process the data gathered by the accelerometer. For instance, pedometer functions have their own specific IP block. Hence, as the MEMS detect movement, the unit processes the information using a proprietary algorithm to determine whether it corresponds to a step or not, without ever needing to use the resources of the host MCU. ST even allows engineers to tweak certain aspects of the algorithm by changing the “debounce steps” and the “minimum threshold.”
The debounce steps is the minimum number of consecutive steps that must be detected before the counter starts increasing. Without this feature, it would be impossible to distinguish between genuine and false steps. For example, if a person has to stop at a crosswalk while on a run, it would be pointless to count the movements made while waiting for the signal to change. The debounce steps can ensure that the counter only increments when the user resumes its pace. Engineers can also customize the minimum threshold, meaning the minimum force that can qualify as a step. Hence, developers can create different profiles with specific settings adjusting for various activities, to more accurately measure steps and produce meaningful results.
System Optimizations
With each detected step, the pedometer unit sends an interrupt to the step counter. An interrupt is a signal transmitted to a specific component, usually a host, indicating that an event requires its attention. In this system, the pedometer sends an interrupt using its INT1 pin (LSM6DSL and LSM6DSM) to a particular pin on the host. As a result, the rest of the host can be in sleep mode, or perform other tasks, while only a small part of the architecture detects the presence of an interrupt, processes it, and decides if waking the rest of the MCU is necessary. This system also ensures the synchronization of the data acquisition process to avoid any loss of information.
For instance, it is possible to send an interrupt only after exceeding the debounce steps to ensure that the system doesn’t waste energy on trivial movements. As more and more users sleep with their fitness band on, it would be pointless to waste battery life trying to measure the small and sporadic gestures that occur while asleep. By correctly setting the system’s debounce steps and minimum threshold, engineers ensure no interrupts wake the system up, even if the user moves during sleep.
Modular Efficiency
Including both the 6-axis inertial module, and the compass, in one mobile device, is very common. Therefore, why did ST choose to include an accelerometer and a specific pedometer unit in both ? The reason is that they are modular, meaning it is possible to use them both for greater accuracy, or disable one accelerometer to save energy, while still benefitting from a powerful step counter. This design also allows for greater flexibility. For instance, if one of the components is already off, the system can still count steps by relying on the pedometer IP of the component that’s awake, no matter which one it is.
Hence, ST continues to lead the MEMS market in mobile applications because it can provide greater flexibility, accuracy and efficiency, thanks to solutions that just work together. To know more about the LSM6DSL/LSM6DSM and the LSM303AH, please visit ST’s website.