Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BMX055 data conversion

    BMX055 data conversion

    MiguelSanches
    Member

    Dear all,

    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,

    Miguel Sanches

    2 REPLIES 2

    Vincent
    Community Moderator
    Community Moderator

    Please refer to the following answers:

    1. 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.
    2. You can convert the accelration from raw value to g value first, then convert it to any other value you wants
    3. 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.
    4. 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.

    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!

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist