Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BNO 055 calibrate using horizontal plane rotations only? And having to recalibrate too often.

    BNO 055 calibrate using horizontal plane rotations only? And having to recalibrate too often.


    Excuse me, I've bought some of your BNO 055 compass sensors for use in letting a robot navigate, is there any way to calibrate these (atleast calibrating the compass and accelerometer elements if not the gyro which I'm not using) by only rotating on a single plane?

    I've mounted the boards on a robot and therefore it can spin on the spot with it's wheels, and it can because of it's design manage a deliberate and controlled 10 degrees of back-forth pitch, but it can't by itself do anything to rotate the compass board in ALL 3 axes. All it can do is a fast spin clockwise or anticlockwise about the vertical axis (normal to the PCB on which the BNO 055 chip sits), or slowly do a 0 to 20 degree pitch range about the axis pointing parallel to the longer length side of the BNO 055 chip.

    I don't need accuracy on all three axes, just in the horizontal plane (my board is arranged on the robot such that the componentless side of the board has a normal pointing to the sky, and the other face of the board, where the chips are SMD soldered on to, has a normal pointing to the ground). As I don't need compass data in the other dimensions is there any way to calibrate well enough for use in the horizontal plane by using only movements in the horizontal plane?

    I have been using the adafruit bno055 library on an atmega328p, similar to an arduino uno but fitted with other components on a custom board, to interface over I2C to this sensor. I can work on modifying the library to add any extra features your BNO 055 datasheet describes which the library doesn't implement.

    I'm working in a situation where my robot must be able to find a globally determined heading relative to "north" for where-ever it currently is, it is NOT a problem in my application if where this north is changes with position, so long as it does so more slowly than 5 degrees of difference per metre of travel along the floor. So when travelling in a "straight line" it is ok if this straight line deviates by 5 degrees per metre, but  the robot would still need to have the same perception of where "north" is at a given location if it later returns to that same location.

    I think the device is operating in the NDOF fusion mode, with the faster, not needing full figure of 8, type of calibration enabled. I wonder if shifting to a non-fusion compass mode could help, or if this would leave the sensor useless for navigation. 

    In running test code to get the value from code doesn't print anything higher than a 1/3 for the magnetometer confidence until rotations on >=2 axes are made, it can get to 2/3 with some rotation about the vertical axis (that is to say staying on the horizontal plane) and a little bit of gentle tipping on one other axis, it refuses to reach 3/3 without the robot being hefted up and waved around in all directions. I wondered if there were any features on the BNO 055 which let you put it in to a horizontal plane mode, without having to get deeply involved with complex sensor fusion algorithms.

    Also, as my robot drives around, probably due to passing through different magnetic fields in the environment such as from steel structures under the floors, confidence sooner or later drops down again, and usually within a few metres and a very few minutes. The confidenc level does not manage to persist at the level it reaches after calibration for as long, even though I had thought that calibration remained from power-on of the sensor until power-off. I could well understand, and handle the resulting robot situation, if the presence of such altered field regions just caused local navigation confusion, but having to recalibrate is very bothersome.

    P.S. the board is in a robot, but I've been careful in the design and kept it well away from the robot's motors (which are small and low current anyway) and from any metal structural pieces, most of the robot is made from plastic, or high current wires. From checking around the robot using other tools I am confident that my motors should NOT in any way be interfering with the BNO 055. The BNO 055 is on a separate small daughter board from the other circuitry of the robot. The only metal, except header pins, anywhere near the BNO 055 is the end of an M2.5 screw 23mm away, and the side of another about 20mm away, this latter one could be removed if necssary.

    Thank you

    11 REPLIES 11

    Community Moderator
    Community Moderator


    Inside BNO055 the magnetometer is actually BMM150 whose datasheet is avaialble online at The repetition number of xy and z axis of BMM150 means averaging how many times of the measurements to get final value to be placed in data registers. The higher repetition, the cleaner the data, of cause higher power consumption. In BMM150 datasheet we defined the preset of repetition as low power, regular, etc.

    BMM150 has normal mode, forced mode, sleep mode and suspend mode. Normal mode with up to 30Hz ODR is continuous updating the data registers. Forced mode is upon request from the external host. After measurement is done, BMM150 goes to sleep mode from forced mode.

    There is no difference between MAGOnly and ACCMAG because they all output mag raw data without calibration and sensor fusion.


    When the BNO 055 starts up it puts the magnetometer in to forced mode. Does this mean the magnetometer would by default only give one value then go to sleep? Or does forced mode mean the BNO 055 keeps forcing the magnetometer to give readings at 20Hz, and the microcontroller which is I2Cmaster of the BNO 055 just gets, whenever it calls the BNO 055, the latest values the magnetometer has?

    Does this end up requiring the BNO 055's interrupt pin, I haven't been using that so far?

    Would setting them MAG_config register to x1110101 (x being any value)sort any possible problem by giving forced power, enhanced regualr accuracy and 20Hz? Or would x0010101 do better, using normal power mode? I'm not sure how the BNO 055 interprets that forced mode, is the BNO 055 in a non-fusion mode the immediate master of a BMM150, with all the BMM150 details hidden away, or does the BNO 055 act just like a BMM150, with registers chanegd and everything, when in a non-fusion mode?


    If I just use config mode to put the bno 055 in ACCMAG or MAGONLY mode without changing any default registers will it act as a standalone magnetometer and give a mag value updating at atleast 20Hz, even if the BNO 055 is I2C'd mroe often than 20Hz (in which case I'd expect a few succesive I2C values to be the same, then a new value occurs at 20Hz).