Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    Testing two bmx160's Yaw readings

    Testing two bmx160's Yaw readings

    Established Member

    Hi Everyone,

    We are using 9DoF BMX160 Sensor in our project. Till now I am able to read ACC, GYRO and MAG raw readings from the IMU and also getting Roll, Pitch and Yaw readings by using Madgwick filter. I took the readings from two IMUs, by configuring both as below:

    ODR: 100Hz (both ACC, GYRO and MAG)
    Range: 2g for ACC, 500dps for GYRO
    Power Mode: Normal (both ACC, GYRO and MAG)

    Then by keeping the orientation of both the sensors same, we moved them in random directions simultaneously. I need your help on the following observations:

    1) Why Yaw readings are different for these two (BMX160) IMUs, even we moved the both in the same directions and simultaneously?

    2) Will MAG sensor readings have any effect on this?

    3) Is internal FOC enough for ACC and GYRO calibration or any other external/manual calibration is required?

    Thank you in advance.



    6 REPLIES 6

    Community Moderator
    Community Moderator


    Thanks for your inquiry.

    If you use 9DoF Madgwick filter to get Euler angles such as pitch/roll/heading, then the magnetometer inside BMX160 needs to be calibrated for hard-iron and soft-iron distortions. Mag calibration requires multiple rotations in 3D space. Please refer to the article online at for more information.

    If you use 6DoF Madgwick filter to get pitch/roll/yaw Euler angles, then you should be able to see yaw angles from two BMX160 close to each other at the beginning. After more movements or rotations, the difference of the yaw angles between two BMX160 will grow because the mag is not used for absolute heading with respect to earth magnetic north. The yaw angle is just a relative orientation compared to the beginning of the rotation.

    Sensor fusion is a complex task for BMX160. You may consider using our smart sensors such as BNO055 or BHI260AB + BMM150 mag. Then you will get 9DoF sensor fusion results directly which means that you don't need to develop your own sensor fusion algorithms.

    This also means that the internal FOC for acc and gyro is good enough for sensor fusion. If you need higher accuracy of Euler angles, then you can calibrate BMX160 acc and gyro on a rate table. The more complicated thing is for mag calibration.


    Established Member

    Hi FAE_CA1,

    Thank you for your useful inputs. We are working on the MAG calibration as you suggested. And for better accuracy, we are suggested to go for Manual

    Offset Compensation than FOC.

    In the mean time, please provide us more info on these points.

    1. Can you help us find a tech comparison doc for "BMX160 vs BNO055 vs (BHI260AB + BMM150)"? For our requirement/application "Wheelchair control as per Head movements", we are interested in only Pitch and Yaw readings. As per your input, "The yaw angle is just a relative orientation compared to the beginning of the rotation.". To handle this limitation, please provide us with few more details.

    2a. Does it mean Pitch & Roll are more dependable than yaw?

    2b. Shall we change the orientation of sensor mounting so that we work with Pitch & Roll ignoring Yaw?

    2c. Will axis remapping helps instead of changing Orientation of sensor physcially? In our application the sensor is used in a vertical direction,

    where Y-axis is pointing upwards and is placed in the left side of the head.

    For your reference we are attaching below image.




    Thank you,


    Community Moderator
    Community Moderator


    BMX160 is a 9-axis sensor which can only output sensor raw data. this means that you can only get measurements of accel in the unit of g or m/s^2, gyro in the unit of dps or radian per second and mag in the unit of uT.

    BNO055 (12mA current consumption) and BHI260AB + BMM150 (2mA current consumption) are smart sensors and have Bosch sensor fusion algorithm and sensor auto-calibration algorithm built-in to directly output Euler angles in the unit of degrees. So it is not possible to compare BMX160 against smart sensors.

    For your wheelchair application I would like to recommend 6DoF sensor fusion without using the mag. This is because there are a lot of metal materials in the wheelchair and the motor is spinning. The mag measurements will get disturbed all the time. In addition, it is not possible to lift the wheelchair and rotate it in 3D space to calibrate the mag.

    Therefore, if you use BNO055 or BHI260AB 6DoF sensor fusion, then you can get pitch/roll/yaw angles outputs directly. Because there is always gravity measurements from the accel, the errors of pitch and roll angles outputs will not increase over time. But for yaw angle the error will grow over time because there are no mag measurements to help. So you may need to find another way in wheelchair to measure the yaw angle.

    After the sensor is soldered on PCB and the PCB is installed in a casing, sensor axes will be invisible. You only know the X/Y/Z body axes of the wheelchair. Axis remapping is helpful when you want to align sensor axes to wheelchair body axes for sensor fusion.

    Yaw angle is always needed to tell how the wheelchair is turning left and right. You cannot use axis remapping to avoid yaw angle.

    If you use BNO055 or BHI260AB, then your processor doesn't need to take care of sensor calibration and sensor fusion. It can focus on other tasks.

    Hope it helps.

    Established Member

    Hi FAE_CA1,

    Thank you for your useful inputs.

    1) Can you please recommend a method to do the Calibration of IMU(BMX160),mainly for Magnetometer.

    2) And also any such tool or Procedure given for BMX160 as like BNO055 IMU like below attached link

    Thank you inadvance