06-17-2019 10:13 AM
Dear all,
I am using a BMX055 and I would like to know how can I convert the fast compensated accelerometer values into g's?
The fast compensation values of the accelerometer are signed 8-bits integers.
"int8_t compx = readByte(BMX055_ACC_ADDRESS, BMX055_ACC_OFC_OFFSET_X);
int8_t compy = readByte(BMX055_ACC_ADDRESS, BMX055_ACC_OFC_OFFSET_Y);
int8_t compz = readByte(BMX055_ACC_ADDRESS, BMX055_ACC_OFC_OFFSET_Z);"
So, how do I convert 8 bit raw ADC values into g's?
Thanks in advance once again!
06-18-2019 01:45 PM - edited 06-18-2019 01:45 PM
According to BMX055's datasheet, the register description of ACC Register 0x38 OFC_OFFSET_X (respectively 0x39 and 0x3A for Y and Z axes) mentions:
the offset value is represented with two’s complement notation, with a mapping of +127→+0.992g, 0→0g, and -128→-1g.
Therefore you would need to divide your signed 8-bits integers by 128 in order to convert accelerometer offsets from LSB to g (regardless of the selected g-range).