Bosch Sensortec Community

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

    BMA253 Acc X, Y axis value issue

    BMA253 Acc X, Y axis value issue

    mgchoi
    New Poster

    Hi, Bosch

    The initial setting referred to bma2x2_support.c within the github.

    com_rslt += bma2x2_set_power_mode(BMA2x2_MODE_NORMAL);

    bw_value_u8 = 0x08;/* set bandwidth of 7.81Hz*/

    com_rslt += bma2x2_set_bw(bw_value_u8);

    After setting it as above, I read the value in the API below.

    com_rslt = bma2x2_read_read_sample_xyzt(&sample_xyzt);

    Below is the result of reading the accel value from BMA253.

    The environment is stably placed in a horizontal position on the desk.

    I (24872) bma253: AccXYZ (00212,00016,04072), Temperature (00006)
    I (25074) bma253: AccXYZ (00188,-0020,03916), Temperature (00006)
    I (25274) bma253: AccXYZ (00176,00140,03944), Temperature (00006)
    I (25474) bma253: AccXYZ (00132,00076,03836), Temperature (00006)
    I (25676) bma253: AccXYZ (00176,00164,04080), Temperature (00006)
    I(25876) bma253: AccXYZ(00200,00128,04424),temp(00006)
    I (26076) bma253: AccXYZ (00128,00100,04188), Temperature (00006)
    I (26278) bma253: AccXYZ (00172,00092,03920), Temperature (00006)
    I (26478) bma253: AccXYZ (00208,00212,03748), Temperature (00006)
    I (26678) bma253: AccXYZ (00240,00168,04096), Temperature (00006)
    I (26878) bma253: AccXYZ (00216,00136,04048), Temperature (00006)
    I (27080) bma253: AccXYZ (00248,00108,03968), Temperature (00006)
    I (27280) bma253: AccXYZ (00248,00112,04092), Temperature (00006)
    I (27482) bma253: AccXYZ (00136,00168,04172), Temperature (00006)
    I (27682) bma253: AccXYZ (00132,00164,04180), Temperature (00006)
    I (27882) bma253: AccXYZ (00184,00096,03912), Temperature (00006)
    I (28084) bma253: AccXYZ (0024,00024,03784), Temperature (00006)
    I (28284) bma253: AccXYZ (00288,00040,03812), Temperature (00006)
    I (28482) bma253: AccXYZ (00236,00036,04092), Temperature (00006)
    I (28682) bma253: AccXYZ (00212,00228,04340), Temperature (00006)
    I (2884) bma253: AccXYZ (00204,00088,04184), Temperature (00006)
    I (29082) bma253: AccXYZ (00212,-0104,04008), Temperature (00006)
    I (29282) bma253: AccXYZ (00204,-0048,03956), Temperature (00006)
    I (29484) bma253: AccXYZ (00124,00060,03940), Temperature (00006)
    I (29684) bma253: AccXYZ (00136,00064,04036), Temperature (00006)
    I (29884) bma253: AccXYZ (00200,-0012,03860), Temperature (00006)
    I (30086) bma253: AccXYZ (00268,-0024,03724), Temperature (00006)
    I (30286) bma253: AccXYZ (00196,-0088,04236), Temperature (00006)
    I (30486) bma253: AccXYZ (00192,00200,04412), Temperature (00006)
    I (30688) bma253: AccXYZ (00132,00132,04108), Temperature (00006)
    I (30886) bma253: AccXYZ (00184,00080,03960), Temperature (00006)
    I (31086) bma253: AccXYZ (00184,00060,04020), Temperature (00006)
    I (31288) bma253: AccXYZ (00116,00008,04032), Temperature (00006)

    The X and Y values are positive, and for Y values, the sign waveform is similar.
    In addition, the deviation of the X value fluctuates a lot compared to the BMI 160.

    Below is the result of reading the accel value from BMI160.
    It is located next to BMA253.

    I(66211986) bmi160: AccXYZ(-0876,-0296,16585), GyrXYZ(00022,-0051,-0055)
    I(66212186) bmi160: AccXYZ(-0863,-0237,1669) GyrXYZ(00004,-0054,-0059)
    I(66212388) bmi160: AccXYZ(-0830,-0295,16574), GyrXYZ(00008,-0037,-0062)
    I (66212586) bmi160 : AccXYZ (-0867,-0264,16559), GyrXYZ (00014,-0052,-0055)
    I(66212788) bmi160: AccXYZ(-0850,-0271,16574), GyrXYZ(00006,-0040,-0056)
    I(66212988) bmi160: AccXYZ(-0871,-0305,1669) GyrXYZ(00010,-0042,-0061)
    I(66213188) bmi160: AccXYZ(-0866,-0281,16530), GyrXYZ(00020,-0037,-0060)

    The value is constant without significant deviations.

    It is urgent that the mass-produced products cannot be delivered due to this problem.

    4 REPLIES 4

    BSTRobin
    Community Moderator
    Community Moderator

    Hi mgchoi,

    From your data log, the z-axis data is out of the sensor range.

    BMA253 accel range.png

    You need to set sensor range in your code.

    Thanks BSTRobin 

    I'll check that code

    BSTRobin
    Community Moderator
    Community Moderator

    Welcome, mgchoi.

    Did it work well?

    Yes, it works well. I think it was a range problem.

    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