Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BNO055 does not store heading value on startup

    BNO055 does not store heading value on startup

    rghc
    Occasional Visitor

    I bought the BNO055 absolute orientation board from Adafruit. I use it with Teensy 4.1 via I2C. the example I use is the standard code to get the orientation:

    #include <Wire.h>
    #include <Adafruit_Sensor.h>
    #include <Adafruit_BNO055.h>
    #include <utility/imumaths.h>

    Adafruit_BNO055 bno = Adafruit_BNO055(55);

    void setup(void)
    {
    Serial.begin(9600);
    Serial.println("Orientation Sensor Test"); Serial.println("");

    /* Initialise the sensor */
    if(!bno.begin())
    {
    /* There was a problem detecting the BNO055 ... check your connections */
    Serial.print("Ooops, no BNO055 detected ... Check your wiring or I2C ADDR!");
    while(1);
    }

    delay(1000);

    bno.setExtCrystalUse(true);
    }

    void loop(void)
    {
    /* Get a new sensor event */
    sensors_event_t event;
    bno.getEvent(&event);

    /* Display the floating point data */
    Serial.print("X: ");
    Serial.print(event.orientation.x, 4);
    Serial.print("\tY: ");
    Serial.print(event.orientation.y, 4);
    Serial.print("\tZ: ");
    Serial.print(event.orientation.z, 4);
    Serial.println("");

    delay(100);
    }

    the X, Y, Z shows valid and noise free values on the screen according to the movement of the board. There is no drift, when the board stands still, the values are constant. The problem is, the heading is losing its value upon resetting the power/ board. For example, on powering on the board and Teensy, I see X=358.5, Y=-20, Z= 5.3. I move the board a little and then I see for example, X=30.4, Y= -41.3, Z=5.5. I keep the board at this position, then I power off the devices and turn them on again. I see: X= 358.7 , Y=-41.3, Z=5.5. The heading value (X) is "0" again. The board does not retain its value. I tried to use the "restore offsets" example, and calibrate the board. The result is the same. The board was calibrated, everything shows fine except the X axis behaves the same.

    What could be the problem?

    1 REPLY 1

    Vincent
    Community Moderator
    Community Moderator

    The BNO055 don't have ROM inside, so there is no space to store all the parameters. 

    Every time sensor power reset,  the algorithm inside will start from 0 for heading if there is no calibration parameter restored into. 

    I tried the following steps:

    1. turn on the sensor

    2. calibrated the sensor until the system calibration level goes to 3

    3. read out the calibration parameters including offset value from BNO

    4. do the power reset to sensor

    5. write back all calibration parameters into BNO under configure mode

    6. switch sensor in working mode

    I can see the sensor can start from the previous heading value directly. 

    You can also try to follow these steps.

    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