2021-02-01 01:15 AM
I have developed a firmware in sensortile.box and I'm using accelerometer data(lsm6dsox imu sensor) for that specific application. The problem I encountered is that, scaling of the accelerometer automatically changed, because after the long time the accelerometer values will go out of the scaling boundary. Can anyone suggest a way to trouble shoot this issue. or is there any flags or register that show the errors encountered in the accelerometer in running time.
thank you.
2021-02-02 07:50 AM
Hi @Community member ,
some questions for you to try to narrow down the issue.
Do you mean that the Full Scale of the accelerometer suddenly change from e.g. 2g to 4g? And are you streaming the data via BLE or via USB (maybe using custom firmware), or storing them on the SD card? And how many minutes of acquisition did you set?
-Eleon
2021-02-02 09:25 PM
Hi Eleon BORLINI,
thank you so much for your fastest reply sir. This is the problem I encountered.
-I have developed a firmware in sersortile.box which can take the streaming data of the accelerometer as input at 52Hz ODR and feed the AI model which is integrated with our firmware. So, here I didn't use BLE or USB or even didn't store it in memory.
-after some days of working, the scaling of the accelerometer change from 4g to 2g (checked using debugger)
-I turnoff the device and again turn on, then it start to work with prober scaling.(4g)
-so, I want to know the exact reason for this behavior of the accelerometer and is there any way to find the error occurred to accelerometer in the running time using any flag or register.
-or suggest any way to reset the accelerometer in running time, so instead of turn on and turn off the device i can reset the accelerometer.
2021-02-03 08:38 AM
Hi @Community member ,
This is a really strange occurrence, are you sure that there is not a function that writes something in register 10h?
That should be the only way for the sensor to change the full scale value.
Anyway, to make sure the problem does not interfere with your application you can check if the full scale is correct by reading that register and checking the bits FS0_XL and FS1_XL.
Then, if the value is not 10 (that corresponds to 4g), write the right value in the register. (there is no need to reset the sensor, just writing again the correct value is fine)
in the end the timing of the check is up to you and the error that your system can withstand (even with a check after every value read, there should not be problem of timing, it is very faster than the 52Hz ODR)
(also writing the value every time, instead of doing the check, is a valid alternative)
hope this helps,
Niccolò