cancel
Showing results for 
Search instead for 
Did you mean: 

how to understand raw data of outputed from accelerometer

Jalal Sadigli
Associate III
Posted on May 07, 2017 at 19:43

this is the 

LIS3DSH

  accelerometer on stm32f4discovery board

0.12 mg/digit sensitivity it has how to calculate exact output with respect to unit of g

is there any tutorial or documentation that  explain stuff.

##lis3dsh #mems #accelerometer
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on May 07, 2017 at 20:03

It's just basic maths, you take the 16-bit signed integer, cast it into something like a float or double, and scale it.

ie float x = (float)OUT_X  * 0.12e-3; // x is now a value in units G

The OUT_X holds a value +32767 to -32768, or +/-3.93G, ie think 32768.0 * 0.12e-3

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2
Posted on May 07, 2017 at 20:03

It's just basic maths, you take the 16-bit signed integer, cast it into something like a float or double, and scale it.

ie float x = (float)OUT_X  * 0.12e-3; // x is now a value in units G

The OUT_X holds a value +32767 to -32768, or +/-3.93G, ie think 32768.0 * 0.12e-3

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 07, 2017 at 20:20

thank you