Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BNO055 drift

    BNO055 drift

    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) */

    /* Reset */
    write8(BNO055_SYS_TRIGGER_ADDR, 0x20);
    /* Delay incrased to 30ms due to power issues */
    while (read8(BNO055_CHIP_ID_ADDR) != BNO055_ID) {

    /* Set to normal power mode */

    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
    write8(BNO055_AXIS_MAP_SIGN_ADDR, REMAP_SIGN_P2); // P0-P7, Default is P1

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

    // write the cal registers

    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.

    Community Moderator
    Community Moderator

    Hi weecabin,

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