Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BNO055 drift

    BNO055 drift

    weecabin
    New Poster

    I have been trying to use the bno055 as a compass for a marine autopilot. I notice that the magnetic heading slowly drifts in the presence of a slight vibration coming from the boat engine. If I turn the engine off, the drift stops. I duplicated this off the boat by creating a similar vibration on my bench.

    My solution is the following... I save the cal values and periodically force them down to the device. This solves the drift issue, but the only way I can reliably recal is to restart the device. This adds a dead time in my navigation as I wait for the device to start functioning again.

    Is there something else I should be doing to eliminate this vibration effect?

    or, is there a recomendation on how to send new cal data down without having to basically restart the device?

    7 REPLIES 7

    A little more detail... the device is on an Adafruit breakout board, and I'm using their library. This is the initialization routine they use that works for me. If I use the simple method referenced in the manual, the device won't lock up and I had to go through the manual cal process which isn't practical in my application. I also tried adding delays between and after the three line process you suggested to no avail.
    This is what works.

    /* Switch to config mode (just in case since this is the default) */
    setMode(OPERATION_MODE_CONFIG);

    /* Reset */
    write8(BNO055_SYS_TRIGGER_ADDR, 0x20);
    /* Delay incrased to 30ms due to power issues https://tinyurl.com/y375z699 */
    delay(30);
    while (read8(BNO055_CHIP_ID_ADDR) != BNO055_ID) {
    delay(10);
    }
    delay(50);

    /* Set to normal power mode */
    write8(BNO055_PWR_MODE_ADDR, POWER_MODE_NORMAL);
    delay(10);

    write8(BNO055_PAGE_ID_ADDR, 0);

    /* Set the output units */
    /*
    uint8_t unitsel = (0 << 7) | // Orientation = Android
    (0 << 4) | // Temperature = Celsius
    (0 << 2) | // Euler = Degrees
    (1 << 1) | // Gyro = Rads
    (0 << 0); // Accelerometer = m/s^2
    write8(BNO055_UNIT_SEL_ADDR, unitsel);
    */

    /* Configure axis mapping (see section 3.4) */
    /*
    write8(BNO055_AXIS_MAP_CONFIG_ADDR, REMAP_CONFIG_P2); // P0-P7, Default is P1
    delay(10);
    write8(BNO055_AXIS_MAP_SIGN_ADDR, REMAP_SIGN_P2); // P0-P7, Default is P1
    delay(10);
    */

    write8(BNO055_SYS_TRIGGER_ADDR, 0x0);
    delay(10);
    /* Set the requested operating mode (see section 3.3) */
    setMode(mode);
    delay(20);

    // write the cal registers
    SetSensorCal();
    delay(1000);
    setExtCrystalUse(true);

    I attached a file that includes a printout of the Cal state following my attempt to write the cal offsets.

    I used two techniques, the first set of data is using the simple method explained in the manual. You can see from the data that the device eventually unlocks.

    The second set (bottom of the file) is where I use the Adefruit startup routine I documented in a previous post in this thread. That routine never has a problem, but it does take about 2s for the device to come up.

    BSTRobin
    Community Moderator
    Community Moderator

    Hi weecabin,

    After you set calibration profile, need to wait for the calibration status to change.

    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