Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BNO055 calibration. Am I missing any configuration register?

    BNO055 calibration. Am I missing any configuration register?

    fgallardo
    Occasional Visitor

    I am trying to get some reading from the IMU BNO055, the implementation from ADA Fruit below.

    https://cdn-learn.adafruit.com/downloads/pdf/adafruit-bno055-absolute-orientation-sensor.pdf

    It seems like I am not able to pass the calibration step.

    The BNO055 manual can be found below: https://cdn-shop.adafruit.com/datasheets/BST_BNO055_DS000_12.pdf

    I am not using libraries but communicating using I2C directly and reading and writing from the device registers.

    The configuration I am doing is as follows:

    // The opening of the device and so on, works, so the line below is not a problem.
        if (ioctl(data_exchange->file_imu_sensor, I2C_SLAVE, data_exchange->imu_addr) < 0) 
    {
    printf
    ("Impossible to communicate with the IMU in the i2c. Make sure that the address you have is correct!\n");
    exit
    (1); } // Here is where I start with the configuration. First I reset the device. //SYS_TRIGGER Register. ADD 3F //CLK_SEL (0 internal oscillator) REST_INT(reset interrumptions)RST_SYS(1 to reset) x x x x Self_TEST(1 to make a self test.) // 00xxxx0
    buf
    [0] = 0x3F;
    buf
    [1] = 0x20; //00100000
    write_buf
    (data_exchange,buf,3);
    printf
    ("IMU WAS COMMANDED TO RESET");
    sleep
    (1); //It needs some time to reset. With one sec should be sufficient.
    // Here I start with the real configuration. // G range 2G xxxxxx00 // BW 7.81Hz xxx000xx // Op mod normal 000xxxxx //So I will write a 0 to the register ACC_condfi
    buf
    [0] = 0x0D;
    buf
    [1] = 0x00;
    write_buf
    (data_exchange,buf,3);
    // Now unit selection.UNIT_SEL Page 30. //Accelaration m/s2 xxxxxxx0b // Magnetic field in micro Teslas (always) // Angular rate defrees ps xxxxxx0xb // Euler angles Degress> xxxxxxxb // Quaternion in Quaernion units always. //Temperatyre deg xxx0xxxxb // NPI The data output format can be selected by writing to the UNIT_SEL register, this allows user to switch between the orientation definition described by Windows and Android operating systems // Windows> 0xxxxxxxb // Android> 1xxxxxxxb. Page 30. // Bits 5 and 6 are reserved. So it does not matter. So we write a 0.
    buf
    [0] = 0x03;
    buf
    [1] = 0x00;
    write_buf
    (data_exchange,buf,3); //We now need to set the operation mode: //Register OPR_MODE Page 21. //Fusion mode NDOF. xxxx1100b
    buf
    [0] = 0x1C;
    buf
    [1] = 0x0C; //00001100
    write_buf
    (data_exchange,buf,3); // GYR_Config_0
    buf
    [0] = 0x0B;
    buf
    [1] = 0x00; //00001100
    write_buf
    (data_exchange,buf,3); // PWR_MODE. Normal mode is xxxxxx00b
    buf
    [0] = 0x3E;
    buf
    [1] = 0x00; //00000000
    write_buf
    (data_exchange,buf,3);

    Now, I am supposed to wait for the internal calibration of the chip to be performed. But it seems like it does not finish doing that.

    I am checking it by means of checking the register 0x35, which should be >0 if the calibration was finished.

     char buf[10];
     int status=0;         
    read_buf
    (dataset_pointer,0x35,3,buf);
    status
    =buf[0]; if(status>0){ //Here is where I perform all the reading and so on. }

     

    I also followed this code:

    https://github.com/fgallardo/BNO055/blob/master/BNO055%2BBMP280_Basic_AHRS_t3.ino

    Which also writes a 1 to the PAGEID register (0x07) and then a 0 after writing to the configuration registers.

    Am I missing something in the configuration? I checked on the Internet and I found some suggestions (as per the IMU manual, too) about making an 8 symbol in the air with the device, which I did, but the calibration is not finished anyway.

    I don't think it is a power issue (I found some references about that in the Bosh forums) because I connected VIN to 5.0V, 3VO to 3.3V and GND to GND.

    Any comment on this would be of great help. Am I configuring the device wrong? Am I missing any register?

    Thanks!

    1 REPLY 1

    Vincent
    Community Moderator
    Community Moderator

    1. ACC_config and gyro _config is on parameter page 1,  so you need switch to page 1 then write all the configure then switch to page 0

    2. all configure can only write when device in configure mode ( the default mode after reset)

    3. the buf [0] is register address,  acc_config is register address 0x07 on page 1

    4. when you select NDoF mode, all data rate of sensor is fixed,  0.781Hz of accel is not acceptable

    5.  after reset, you can just only change unit you want, then change the operation mode to NDoF mode,  others will take care by sensor itself

    6. you must perform the calibration motion. you can refer to the video as following as exmaple.

    https://www.youtube.com/watch?v=Bw0WuAyGsnY    

    after doing calibration movements, you can get the calibration status.

    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