Pololu AltIMU-10 v4 Raw Data Conversion

Hi,

I am currently using Pololu AltIMU-10 v4. However, I am confused by the datasheet provided.

For example, for accelerometer, we usually take the raw data and divide it by 65,535 (16 bit data) and then multiply by the linear acceleration measurement range. However, there is another way of conversion is done by directly multiplying with linear acceleration sensitivity.

For measurement range of +/- 2, 4, 6 and 8, the result obtained through the calculation above and linear sensitivity multiplication are the same.

4 / 65535 = 0.061 mg/LSB
8 / 65535 = 0.122 mg/LSB
12 / 65535 = 0.183 mg/LSB
16 / 65535 = 0.244 mg/LSB

They are the same for the four measurement range above. However, for +/- 16 g, the result is different from linear acceleration sensitivity as shown in datasheet (0.732 mg/LSB).

32 / 65535 = 0.488 mg/LSB

In this case, which method should I use? Should I multiply it by sensitivity directly or follow the calculation above? In fact, I had found that this calculation method is done by a lot of people but I cannot find it in the st datasheet.

The same issue occur with the magnetometer on the same chip (LSM303D) and the gyroscope chip on the same board (L3GD20H).

I hope that someone can clarify this issue with me.

Thank you.

Regards,
qzai09

For all of those sensors, you should multiply your raw readings by the sensitivity values from the datasheets based on the FS value that sensor is set to.

-Jon

Hi Jonathan,

Sorry for late reply. Thank you very much for your clarification.

On the other hand, how do we show the negative value from the raw data? For example, deceleration. Previously, I had been using a if-else loop in my c program to check if the raw value is greater than 32767 and deduct by 65536 if the value do exceed 32767. Is it still viable with this sensitivity value method?

Regards,
qzai09

The raw readings available from those sensors are expressed in 16-bit as 2’s complement. So, what you are doing should be fine. However, there should be a more efficient way to do it: instead of reading the number as an unsigned value, you should be able to read it as a signed value, and it will automatically represent negative values correctly.

You might consider looking at the way our Arduino LSM303 library reads those raw values.

-Jon