cancel
Showing results for 
Search instead for 
Did you mean: 

How can we use 3-D accel data to calculate the acceleration value?

abali.1
Associate II

We get three 16-bit value from the register of ISM330DLC, how to use the three values to calculate the acceleration? Please help.

1 ACCEPTED SOLUTION

Accepted Solutions
TSand.1
Associate III

Hi, you can check the datasheet for the conversion formula and the sensitivities, but I found a C sample code on GitHub that if maintained by ST, and where you can find the conversion formula. The "lsb" are the raw data to be inserted in:

float_t ism330dlc_from_fs2g_to_mg(int16_t lsb)

{

return ((float_t)lsb * 0.061f);

}

https://github.com/STMicroelectronics/ism330dlc/blob/80601233c2ec4b9e675d154bba0654329405ebc0/ism330dlc_reg.c

https://www.st.com/resource/en/datasheet/ism330dlc.pdf

View solution in original post

4 REPLIES 4
TSand.1
Associate III

Hi, you can check the datasheet for the conversion formula and the sensitivities, but I found a C sample code on GitHub that if maintained by ST, and where you can find the conversion formula. The "lsb" are the raw data to be inserted in:

float_t ism330dlc_from_fs2g_to_mg(int16_t lsb)

{

return ((float_t)lsb * 0.061f);

}

https://github.com/STMicroelectronics/ism330dlc/blob/80601233c2ec4b9e675d154bba0654329405ebc0/ism330dlc_reg.c

https://www.st.com/resource/en/datasheet/ism330dlc.pdf

abali.1
Associate II

Thanks for the reply @TSand.1​ . Do we need to use vector magnitude calculation formula to find the overall acceleration magnitude?

yes, you need the 3 spatial axis components to get the total acceleration magnitude in space

abali.1
Associate II

Thanks @TSand.1​