Bosch Sensortec Community

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

    BMX160 PITCH,ROLL AND YAW

    BMX160 PITCH,ROLL AND YAW

    amar
    Established Member

    Hi everyone,

    I worked on BMX160 IMU last few days, Till now i am able to get Raw readings of it like ACC(X,Y,Z),GYRO (X,Y,Z)and MAG(X,Y,Z) sensor.

    I confirmed raw readings of ACC and GYRO are correct or not by placing sensor at rest state and then raw readings are came like acc: 0,0,-/+1 and

    gyro: 0,0,0.(datasheet page no:106) but i didnot find any thing which is related to confirm Raw MAG readings are correct or not?

    And also i converted Acc and Gyro raw readings in to gravity,m/s^2 by using below formulas,

    //Here 2 is for 2g and 32768 for 16 bit value because ACC raw data is in 16 bit value 

    Ax = (acc_raw_x * 2)/32768;

    Ay = (acc_raw_y * 2)/32768;

    Az = (acc_raw_z * 2)/32768;

    //Here 250 is for 250dps and 32768 for 16 bit value because Gyro  raw data is in 16 bit value 

    Gx = (gyro_raw_x * 250)/32768;

    Gy = (gyro_raw_y * 250)/32768;

    Gz = (gyro_raw_z * 250)/32768;

    1) Can you please help me to find MAG Raw data correct or not?

    2) I am just reading raw data from six registers of MAG(0x04 -0x09)?is it correct?

    3) In BMX160 Datasheet for reading MAG data procedure given like below attached imge

     

    bmx160_image_1.PNG

    4) What is bmi160 API for doing above image task? i did not find any API in bmi160.c file like above image suggested ?

    5)  What king of fusion algorithm/filters  can i use to find pitch,roll and yaw from above readings?

    Please help me to come out of this issue.

    Thank you,

    Amarr

     

     

     

    11 REPLIES 11

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Minhwan will get back to you shortly and keep supporting you.

    Thanks.

    amar
    Established Member
    Hi,
    I will wait. Thank you

    Minhwan
    Community Moderator
    Community Moderator

    Hello Amar, 

     

    Yes, you can get BMM150 data from BMI160 AUX interface as below url ( you mentioned already though ) 

    https://github.com/BoschSensortec/BMI160_driver

    However, it's not possible to contact your MCU and BMM150 directly in BMX160. 

    Please let me know if you have any questions. 

    Thanks, 

    amar
    Established Member

    Hi minhwan,

    Thank you so much for reply, Now i understood about BMX160(BMI160(acc and gyro) + BMM150(mag)). 

    1) What is the max raw value we can get for MAG(x,y,z) as well as ACC, GYRO also at rest position or any testing/moving  conditions?

    2) can you suggest me any best testing procedure/way for magnometer?

    3) If i conduct testing for MAG data, is YAW(Heading) only vary or Pitch, roll are also changed? if yes how much cutoff values(angle) we can accept for

     them?

    Thank you,

    amarr

    Minhwan
    Community Moderator
    Community Moderator

    Hello Amar,

     

    1. What is the max raw value we can get for MAG(x,y,z) as well as ACC, GYRO also at rest position or any testing/moving  conditions?

    - Our typical range is -+1300uT (x,y-axis), -+2500uT (z-axis)

    2. can you suggest me any best testing procedure/way for magnometer?

    - We recommend two self-test options. Please check page 16 in our datasheet. (Normal Self-test, Advanced Self test)

    https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmm150-ds001.pdf

    3. If i conduct testing for MAG data, is YAW(Heading) only vary or Pitch, roll are also changed? if yes how much cutoff values(angle) we can accept for them?

    - For sensor fusion,  only heading is affected by mag output.  Pitch and roll is contributed by acc. For mag self test,  there is no need of any movement of the boards.  And during self test,  no fusion data read out.  Just give a pass or fail status for self test. For testing the mag output,  checking heading deviation with reference device or Ture North direction is good option. Mag data affected by environment and even the component surrounding the sensors.  So we can’t give a simple threshold to judge if mag sensor output is correct or not.    

     

    Please let me know if you have any questions. 

    Thanks, 

    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