Skip to main content
Visitor II
May 7, 2017
Solved

how to understand raw data of outputed from accelerometer

  • May 7, 2017
  • 1 reply
  • 890 views
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
    This topic has been closed for replies.
    Best answer by Tesla DeLorean
    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

    1 reply

    Graduate II
    May 7, 2017
    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

    Visitor II
    May 7, 2017
    Posted on May 07, 2017 at 20:20

    thank you