Skip to main content
Visitor II
December 21, 2020
Solved

LSM6DSO pedometer setting

  • December 21, 2020
  • 4 replies
  • 3803 views

Now I am using LSM6DSO sensor pedometer function. I found it is too sensitive and want to change it. I found four pedometer settings. They are ****_CMD_REG, ****_DEB_STEPS_C, ****_SC_DELTAT_L, ****_SC_DELTAT_H. I can just understand the function of the second one. Can you explain the other three meaning? I have changed them and will cause the pedometer stop.

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    Hi Pedro,

    >> as far I understood it's impossible to port this project to other micro controller, am I right?

    It is not easy to do it with the executable version of the library only, since it has been designed to run on STM32.

    Since a lower-level use of these libraries is subjected to a License Agreement signature, you can ask to the OLS support or contact a local representatives and they will evaluate case by case.

    >> If it is, i'll be impossible to tune sensibility parameters of the embedded pedometer digital feature?

    Well, the two pedometer libraries, MotionPM and MotionPW, are effectively limited in setting the parameters. So my suggestion would be trying the way I suggested above.

    As side note, you might try to setup a custom "high-level" algorithm with the Algobuilder tool, maybe filtering the accelerometer/gyroscope data before entering in the pedometer' functions or calculating the FFT, setting thresholds etc...

    Let me know if these steps can help you to make some progress.

    -Eleon

    4 replies

    ST Employee
    December 21, 2020

    Hi @JXiao.1​ ,

    • The ****_CMD_REG is the Pedometer configuration register and is described below [description in datasheet, p. 134].0693W000006GSRVQA4.png
    • The ****_SC_DELTAT_L and the ****_SC_DELTAT_H are two parts of a unique parameter, 16-bit unsigned value with a resolution of 6.4 ms. It can be used in conjunction with the STEP_COUNT_DELTA_IA bit of EMB_FUNC_SRC registers: enabling this bit, instead of generating an interrupt signal every time a step is recognized, it is possible to generate it if at least one step is detected within a certain time period, defined by setting a value different from 00h in those registers. Note that, in addition, it is necessary to set the TIMESTAMP_EN bit of the CTRL10_C register to 1 (to enable the timer). you might act on this register to modify the pedometer sensitivity [description in AN5192, p. 57].

    Let me please know if these indications can help you.

    -Eleon

    JXiao.1Author
    Visitor II
    December 21, 2020

    I also found when the data rate setting is high such as 417Hz, the sensor will become more sensitive. Is this my illusion? Or the sample data rate will affect the sensitivity of the sensor.

    ST Employee
    December 21, 2020

    It is plausible, since the higher the ODR, the broader the bandwidth of the analyzed signal, and the more probable a threshold overcome due to a high-frequency component is. For the step counter application, 104Hz should be enough, but also 26Hz might work.

    -Eleon

    Visitor II
    December 23, 2020

    Hello, i'm working with the same sensor and i'm using pedometer functionality as well, and having the same trouble. the step counter is very sensible and outputs 2/3 times more steps than it should.

    i've tried to change some configuration as JXiao did, but had no luck. Isn't there any hidden configuration such as filters, bandwidth configurations that can be access through the UNICO-GUI?

    best regards

    ST Employee
    January 4, 2021

    Hi @JXiao.1​ , @PLuze.1​ ,

    do you get the same results either placing the device on the wrist or on the waist?

    You might also refer to the example in the X-CUBE-MEMS1 package, where there are some (platform dependent) examples for the LSM6DSO pedometer (folder \Projects\STM32L476RG-Nucleo\Examples\IKS01A3\LSM6DSO_Pedometer). This package also implements pedometer applications that uses an ST dedicated library instead of the embedded pedometer digital feature (\Projects\STM32L476RG-Nucleo\Applications\IKS01A3\Pedometer). You could also try this way in case the issue is still there.

    -Eleon

    Visitor II
    January 13, 2021

    Hey @Eleon BORLINI​ , thank you for your reply.

    I've tried in the wrist, on the waist and on the shoe.

    I took a look in the examples on the X-CUBE-MEMS1 package, but as it is platform dependent and we're not using a STM32 microcontroller, as far I understood it's impossible to port this project to other micro controller, am I right?

    If it is, i'll be impossible to tune sensibility parameters of the embedded pedometer digital feature?

    Regards,

    Pedro Luzeiro

    ST Employee
    January 15, 2021

    Hi Pedro,

    >> as far I understood it's impossible to port this project to other micro controller, am I right?

    It is not easy to do it with the executable version of the library only, since it has been designed to run on STM32.

    Since a lower-level use of these libraries is subjected to a License Agreement signature, you can ask to the OLS support or contact a local representatives and they will evaluate case by case.

    >> If it is, i'll be impossible to tune sensibility parameters of the embedded pedometer digital feature?

    Well, the two pedometer libraries, MotionPM and MotionPW, are effectively limited in setting the parameters. So my suggestion would be trying the way I suggested above.

    As side note, you might try to setup a custom "high-level" algorithm with the Algobuilder tool, maybe filtering the accelerometer/gyroscope data before entering in the pedometer' functions or calculating the FFT, setting thresholds etc...

    Let me know if these steps can help you to make some progress.

    -Eleon