2020-12-21 01:48 AM
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.
Solved! Go to Solution.
2021-01-15 12:24 AM
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
2020-12-21 02:48 AM
Hi @JXiao.1 ,
Let me please know if these indications can help you.
-Eleon
2020-12-21 03:03 AM
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.
2020-12-21 03:18 AM
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
2020-12-22 07:54 AM
I have tried this method and use function lsm6dso_****_steps_period_set. It seems to have some effects. The following code shows mw how to use it. I set the delay time is 0x32. That is 50 * 6.4 = 320ms. I think this means the sensor will send an interrupt every 320ms. Then I set the delay time is 0xA0 about 1000ms. I found the step counter will still count every step. Is the function I use wrongly?
I have set the timestamp to 1 using lsm6dso_timestamp_set(&imu_dev_ctx, 1).
//Set the sensitivity of the sensor
uint8_t delay_time = 0x032U;
lsm6dso_****_steps_period_set(&imu_dev_ctx, &delay_time);
//Time period register for step detection on delta time
int32_t lsm6dso_****_steps_period_set(stmdev_ctx_t *ctx, uint8_t *buff)
{
int32_t ret;
uint8_t index;
index = 0x00U;
ret = lsm6dso_ln_pg_write_byte(ctx, LSM6DSO_****_SC_DELTAT_L, &buff[index]);
if (ret == 0) {
index++;
ret = lsm6dso_ln_pg_write_byte(ctx, LSM6DSO_****_SC_DELTAT_H,
&buff[index]);
}
return ret;
}
2020-12-23 06:04 AM
Hi @JXiao.1 ,
you may need to also enable the TIMESTAMP_EN bit of the CTRL10_C register to 1, to make the change effective.
-Eleon
2020-12-23 06:28 AM
I have set the timestamp to 1 using lsm6dso_timestamp_set(&imu_dev_ctx, 1) in the sensor initial part. I think it is already set
2020-12-23 07:48 AM
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
2020-12-24 01:41 AM
Hi, i was looking to your code and i'm not sure if the buff that you send to the _steps_period_set function, should be a buffer[2] = {lower limit, upper limit}.
2020-12-29 04:11 AM
Hi,
You are right. In that function it should give a pointer of array. But the performance is not very good. I will do more long-distance tests.