Bosch Sensortec Community

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

    BNO055 problem to set offsets and radius for calibration after power on reset

    BNO055 problem to set offsets and radius for calibration after power on reset

    theoJC
    Member

    Dear Bosch Sensortec Community,

    I experience some trouble trying to reuse the calibration profile with the BNO055. I'm using the evaluation board from adafruit with an Arduino Uno. I'm able to read the offsets and radius registers, then to save into the EEPROM of the ATmega328P and to load it afterwards. Nevertheless, it doesn't always work when I try to restore these values into the registers after reboot.

    I wrote a very simple code for expressing my problem, I initialise the sensor, then a just read the offsets registers (from 0x55 to 0x6A) once, then I restore the offset with 2 arrays (not in the same time, two differents to see the difference) I just defined in the setup function and then I read again the offsets registers to check if they have been correctly updated.  These two arrays are:

    byte Array1[NUMBER_OF_OFFSET_REGISTERS]={236,255,187,255,221,255,0,0,0,0,0,0,255,255,254,255,254,255,232,3,224,1};
    byte Array2[NUMBER_OF_OFFSET_REGISTERS]={194,204,161,204,224,255,0,0,0,0,0,0,101,102,229,229,254,255,232,3,224,1};

    My problem is that it works perfectly with the first Array, but with the second one the values are not correctly stored in the registers! How could it happen since the format is exactly the same? Are there some restrictions about the values allowed to be written in these registers?

    I spent days being stuck on that problem, if someone can provide me an explanation I would be very grateful. I attached the code if someone wants to check.

    Thank you in advance,

    TheoJC 

    4 REPLIES 4

    Vincent
    Community Moderator
    Community Moderator

    Are those two data group read from sensor offset register or you just made some random value? 

    At lease data group is not reasonable gyro offset value.

    You can also check BNO register 0x3A to see if there is some error code shower up there

    Both data groups are read from sensor offset register, values come from 10 previous calibrations and are averaged. I made it two times, this makes the two arrays.

    For each, I initialise the sensor, then I set the offsets, then I read SYS_ERROR register and print it (sys_error1), then I read the offsets registers, then I read again the SYS_ERROR to check wether it has been correctly set and I print the values. This is what I obtain

    ---------------------First array--------------------------

    Begin Setup
    BNO055 initialisation
    Restoring the following calib data into IMU's register:
    236 ,255 ,187 ,255 ,221 ,255 ,0 ,0 ,0 ,0 ,0 ,0 ,255 ,255 ,254 ,255 ,254 ,255 ,232 ,3 ,224 ,1 ,
    sys error1: 0
    sys error2: 0
    236 ,255 ,187 ,255 ,221 ,255 ,0 ,0 ,0 ,0 ,0 ,0 ,255 ,255 ,254 ,255 ,254 ,255 ,232 ,3 ,224 ,1 ,

    -------------------Second array-----------------------

    Begin Setup
    BNO055 initialisation
    Restoring the following calib data into IMU's register:
    194 ,204 ,161 ,204 ,224* ,255* ,0 ,0 ,0 ,0 ,0 ,0 ,101 ,102 ,229 ,229 ,254* ,255* ,232* ,3* ,224* ,1 *,
    sys error1: 9
    sys error2: 9
    0 ,0 ,0 ,0 ,224 ,255 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,254 ,255 ,232 ,3 ,224 ,1 ,

     

    We can see that in the second case, only a few values (those with a *) have been correctly updated and the SYS_ERROR triggers: 9 Fusion algorithm configuration error. But there is no error with the first set of data which is correctly passed to the registers. Nevertheless, we can't really see big differences in the values of the two arrays. What happens?

    I think I know where it comes from. The first array is the values after one calibration, the second is average values after 10 calibrations. But it seems that some average values triggers a SYS_ERROR=9 fusion algorithm config error. Maybe these values are out of the bound of what the library can accept. But what are these bounds?

    Vincent
    Community Moderator
    Community Moderator

    The boundary of offset register / sensors are listeed on chapter 3.6.4 in BNO055 datasheet.

    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