Bosch Sensortec Community

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

    BMA250 Selftest

    BMA250 Selftest

    elieli
    Member

    Hello

    I am trying to implement inline self-test of the BMA250 accelerometer, mounted on a board at our product. It is calibrated to measure up to 2g. As you point out at the datasheet at table 10, I should see difference of at least 0.8g between +x and -x g values - i.e. difference of 256*0.8=204.8 beteween the values. 

    Unfotrunately I checked in 2 different accelerometers and on x dimention the difference is never larger than 120, so it is not even close. The other 2 axis pass the self-test fine. I put 300 ms sleep between every measure and reading.

    What do you think is the problem?

    Kind reagrds

    Eli

    9 REPLIES 9

    Yanchao
    Community Moderator
    Community Moderator

    Hi,

    The second round test x+/x- difference almost same with first round.

    I check bma2x2_support , have you check your initial code same with this.

    If same, you can comment softreset, and make another round test.

    Another suggestion, change the ACC_RANGE from 2g to 8g, try to find x axis raw data is different?

    Best regards.

    Hi

    My initial code is based on: https://github.com/ControlEverythingCommunity/BMA250/blob/master/Python/BMA250.py

    I don't sure what should I check in the code bma2x2_support ... also I changed ACC_RANGE to +/-8g and there were no changes:

    these are results of two selftest I did:

    nvidia@tegra-ubuntu:~/Downloads$ sudo python3 imu.py
    IMU operation - Please choose CALIB or SELFTEST or READ
    SELFTEST
    selftest acc results:
    -58.0
    85.0
    -218.0
    287.0
    147.0
    357.0
    nvidia@tegra-ubuntu:~/Downloads$ sudo python3 imu.py
    IMU operation - Please choose CALIB or SELFTEST or READ
    SELFTEST
    selftest acc results:
    -61.0
    83.0
    -219.0
    285.0
    147.0
    356.0

     

    Yanchao
    Community Moderator
    Community Moderator

    Hi,

    From  bma2x2_support, you could find the workflow as

    1 com_rslt = bma2x2_init(&bma2x2);

       read 0x00, chip id;

       read 0x3E,  fifo_config_1

    2 com_rslt += bma2x2_set_power_mode(BMA2x2_MODE_NORMAL);

       set 0x11, power mode

    3 com_rslt += bma2x2_set_bw(bw_value_u8);

    4 com_rslt += bma2x2_get_bw(&banwid);

    do self-test

    return self-test result;

    Best regards.

     

     

    Hi 

    It seems like the workflow I already use. The results of the Accelerometer seem fair

    I need the accelerometer just to measure a static pitch and roll angles of my sensor.

    For this use case, is there any neccesity that you suggest to perform the selftest as part of my product assembly process or I can rely on the tests and calibrations were done on the manufacturing process?

    Yanchao
    Community Moderator
    Community Moderator

    Hi elieli,

    Sorry for my late reply, because we make bma250 self-test in our lab.

    From our test, bma250 x-axis value(Accl_x_pos_lsb: -45.3 Accl_x_neg_lsb:90.5), difference almost same with your test. We set range to 8g, so the result is(Accl_x_pos_lsb: -707mg, Accl_x_neg_lsb:1414mg), difference 2114mg >800mg(minimum difference).

    For your new question, after product assemble, you could make self-test to verify if bma250 is ok. Reset sensor, then make offset compensation, avoid solder and assemble stress. For compensation, you could refer to BMA4xy-accelerometer-series-design-guide .

     
     

     

    Best regards.

    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