How to get acceleration from MinIMU-9 v2?

Hi all,

I am trying to get the absolute acceleration (forget how to call it, just consider it as a particle, no angular acceleration involved) from the MinIMU-9 v2. I connect the device to Arduino UNO board, and run the sample code perfectly. But I only want the acceleration. As the sample code reflects, it should be in the ‘PRINT_ANALOGS’ part, but the output seems not so accurate…see the attachment.

Does anyone know how to get the acceleration? or which number from these nine numbers stand for acceleration?
Thank you everybody.


If you are using the MinIMU-9 + Arduino AHRS example code then the values you are seeing should be as follows:

gyro x, gyro y, gyro z, accelerometer x, accelerometer y, accelerometer z, magnetometer x, magnetometer y, magnetometer z

Please note that the sensor outputs three values for acceleration that form a vector. Is there some reason you think the values you are getting are inaccurate?

  • Grant

Thanks grant. I previously ignored the middle three numbers, cause they are hard to keep eyes on. But could you please tell me about the unit of the acceleration? I am not stating it is inaccurate, just doubt. Thank you.

The units should be in 1mg/LSB for the default sensitivity, but they will vary depending on what you set the sensitivity to. For more information, please see page 9 of the LSM303DLHC datasheet under the Resources tab on the product page.

  • Grant

Thank you so much grant. I will test the acceleration further. Cause I do not have any device related to acceleration, it might take some time. Thanks for your help.

Hello Grant, sorry to bother you again. My parents came and I need to tour them around, until recently I got down to test this device. I found the acceleration shows in the output will vary largely with the tilting, but not the linear acceleration. If it is reasonable, would you mind tell me about how this program works, or how to use these numbers to get the result I want? I just need the acceleration in linear movement. Thx.

BTW, is the unit 1 mg/lbs, not mg/lsb? Might be typing error?

It sounds like you are seeing gravity when you tilt the sensor. Gravity is a constant acceleration, so if you do not want that in your reading, you would have to come up with some way to filter it out. If you shake the sensor around, you should see that acceleration superimposed with gravitational acceleration.

Also, lsb stands for least significant bit.

  • Grant