Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMM150 Hard-iron calibration process

    BMM150 Hard-iron calibration process

    EIC_Niranjan
    New Poster

    Hi,

    We have used BMM150 in one of our Android 9 device. The BMM150 is already mounted in the PCB.
    We want the Hard-iron calibration data  for the device so that when the device boot for the first time it have calibrated magnetometer data.
    Would you please share the steps to perform Hard-iron calibration for BMM150.

    Thanks,
    Niranjan

    3 REPLIES 3

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your inquiry.

    There are two ways to perform hard-iron calibration for BMM150 in your Android 9 device. One way is put your device in a Helmholtz coil and program the coil to generate rotating magnetic field in 3D space. The other way is rotate the device in your hand in 3D space for a few full rounds like figure-8 motion. After you plot the BMM150 data in 3D space, you can quickly figure out the x/y/z offsets of BMM150 which are the hard-iron of your device.

    Thanks.

    Hi,

    I appreciate your help.

    I have figure out X, Y, and Z axis orientation with respect to Display with the help of figure-8 motion.
    In android 9 for Hard-iron calibration, I need compensation_matrix and bias values so that when the device boots up for the first time I don't need to perform manual calibration.

    I need a bias value for X, Y, and Z.
    Compensation_matrix for below:
    COMPENSATION_MATRIX_0_0  
    COMPENSATION_MATRIX_0_1  
    COMPENSATION_MATRIX_0_2  
    COMPENSATION_MATRIX_1_0  
    COMPENSATION_MATRIX_1_1  
    COMPENSATION_MATRIX_1_2  
    COMPENSATION_MATRIX_2_0  
    COMPENSATION_MATRIX_2_1  
    COMPENSATION_MATRIX_2_2

    On Query:
    In your previous comment, you have mentioned plotting BMM150 data in 3D space. Which BMM150 register value I need to plot in 3D space.

    Thanks,
    Niranjan

     

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your inquiry.

    The bias values for x/y/z are the hard-iron of your Android 9 device. After you remove these bias values, you should be able to move the sphere or ellipsoid of the 3D plot from your figure-8 motion to the origin. BMM150 values on the 3D plot are in the unit of uT. You can use BMM150 API on the Github at https://github.com/BoschSensortec/BMM150-Sensor-API to convert BMM150 raw data in signed integers to uT.

    The 3x3 matrix is for soft-iron and mismatch of sensitivity compensation. Please do Google search for Android magnetometer calibration algorithms.

    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