Bosch Sensortec Community

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

    BMI270 Accelerometer Counts Offset Variation

    BMI270 Accelerometer Counts Offset Variation

    iliabell
    New Poster

    Hello,

    Using some BMI270 reference code for STM32 applications I found on this forum I was able to successfully initalize and sample accelerometer and gyroscope.  My accelermoter raw counts for the x and y components were around 100-400 counts (I think 'z' was much larger).  The gyroscope magnitude of the raw counts [sqrt(x^2 + y^2 + z^2)] was around ~70 counts.  These values were observed while the board was at rest.  As expected, when the board was rotated or accelerated in a given direction the accel and gyro counts would change.

    However, once the board's at rest orientation is changed, the resting accelerometer offset changes dramatically.  For example, the 'x' and 'y' component counts jumped to ~8000  and saturated after rotating the boards 90 degrees.  I then laid the board in its original position, but face down, and the accelerometer offset counts rested at 1000-2000.  I thought perhaps it was a function of environmental noise (EMI) from some nearby motors, but with or without the motors energized the counts remain as is.  

    Is this change in accelerometer offset expected depending on board orientation when the board is static (i.e. at rest)?  

    As far as calibration goes, should I take note of whatever the offset is at boot and subtract it off?  I noticed that there are some offset registers for saving such readings.  

    Any help would be appreciated.  I can share code if needed.

    Thank you!

    1 REPLY 1

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your inquiry.

    Please refer to https://forum.arduino.cc/t/how-to-calibrate-an-accelerometer/961066/6 about how to do accelerometer calibration at 6 positions stationary. The 6 positions mean Xup, Xdown, Yup, Ydown, Zup and Zdown. Please note that X/Y/Z are your board or your device body axes, not BMI270 accel x/y/z axes. However, you can choose BMI270 x/y/z to be aligned to body X/Y/Z to make it easier.

    After you perform accel calibration at 6 positions, you will get total 12 calibration parameters: 3x3 scale factor matrix and 3 offsets. Then you can apply these parameters to all future BMI270 accel data so that when you put your board or your device on a leveled surface, no matter if Z axis is facing up or facing down, you should always get Ax, Ay close to 0g and Az close to +1g when facing up or -1g when facing down. If you use BMI270 accel +/-2g full scale range, then +1g corresponds to 16384 counts or LSBs.

    Thanks.

    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