Recently I have acquired a bmx055 and I having some doubts regarding the data conversion and offset compensation.
According to the datasheet of the bmx055 (https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BMX055-DS000.pdf😞
1 - The fast compensation for the accelerometer must be done in the 2g range (page 31). However, if I decide to switch the range afterwards for 16g, for example, will the offset compensation still be valid?
2 - The accelerometer data is a 12 bit word for each axis, but what are the units for the raw data? I would like to convert from g's to m/s^2 and I can only found the sensitivity in LSB/g in the datasheet
3 - I was trying to implement the fast compensation offset for the gyroscope (page 85 of the datasheet) but I am having some troubles
3.1. According to the datasheet I have to enable the GYR 0x32 <0:2> bits for each axis. But can I enable all at the same time? Or do I need to one at each time like it is recommended for the accelerometer data?
3.2. Then I need to set the wordlength and enable the start bit GYR 0x32 <3>to start the compensation right?
3.3. Once the compensation as ended the GYR 0x32 <3> bit is reset to 0, but where are the fast compensation values saved? in the GYR 0x36 register? or in the 0x37, 0x38, 0x39 (for each x, y and z axis)? If in the GYR 0x36 register should I trim and cast each axis value so that it becames a 16bit word?
4. In page 85, it is also recomended that the gyro range for fast compensation is 125º/s for higher accuracy, instead of 2000º/s. However, if I do it with the 125º/s range selected, can I later on switch to 2000º/s and still mantain the calculated offset compensation?
Thank you in advance,
With best regards,
Solved! Go to Solution.
Please refer to the following answers:
- Both accelration and gyro sensor are recomended to do fast compenstate in lower range, then the stored value will be adopt automatically when you chagne to big range.
- You can convert the accelration from raw value to g value first, then convert it to any other value you wants
- You can enable both x/y/z for gyro fast compenstation at same time and after finished value will be stored in offset register. but this value will become 0 after power on reset.
- You need to trigger fast compensate of gyro by setting wordlength and enable the start bit
But BMX055 have very good gyro performance, so we don't recommend you to do the fast compensation because the intial offset is already qutie small.
Re: BMX055 data conversion
I just have one further question:
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!