Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMA400 Step Counter Application

    BMA400 Step Counter Application

    ekmekci
    Member

    Hello,

    I am trying to use BMA400 for step counter and activity tracker features in my demo application,
    I get faced some problems,
    I need help about solving and understanding these problems.

    Settings;
    Sensor connected to mcu with I2C interface,

    ==> i2c_read(BMA400_I2C_ADDRESS,0x00,&regval,1); // Ask Chip ID

    regval = 0x90, It is OK

    ==> tmp = 0xB6;

    i2c_write(BMA400_I2C_ADDRESS ,0x7E, &tmp, 0x01); //Soft Reset

    i2c_read(BMA400_I2C_ADDRESS,0x7E,&regval,1);

    regval = 0x00, It is OK

    ==> tmp = 0x02;

    i2c_write(BMA400_I2C_ADDRESS ,0x19, &tmp, 0x01); //Set Power mode = Normal Mode
    i2c_read(BMA400_I2C_ADDRESS,0x19,&regval,1);
    regval = 0x02, It is OK

    ==> tmp = 0x11;

    i2c_write(BMA400_I2C_ADDRESS ,0x20, &tmp, 0x01); //Set step interrupt

    i2c_read(BMA400_I2C_ADDRESS,0x20,&regval,1);

    regval = 0x11, It is OK


    When i am doing below settings,
    I get faced these problems,

    1) When i taking step <10, it is not give response. For example when i taking 8 steps. It still says No step, When i taking 10 or more than 10 steps. It will start to counting correct steps.

    Why it is ignore steps less than 10 ? How i can solve,

    2) When i change my activity from one to another, activity status is not updated real time, it wiil comeafter 5-8 sec.

    3) When i compare steps resolution with some of smart band ( Just like a Xiaomi, Vestel …) our resolution is worst according to them.

    There is many selectable options (ODR, OSR, acc_filter1, acc_filter2 etc…) These options can effect my accuracy ?

    Power consumption is not important i just want to get real time Step count and real time Activity.

    4) Placing sensor any of Axis is important ? It can effect step accuracy to place x axis or y axis or z axis ?

    5) There is STEP_COUNTER_CONFIG register (0x59 – 0x70) there is no explanition about it. How we can configure it ?

    I need help and example about it.

    Summary,
    I just want to get real time step counter and real time activity

    I need help about it,

    10 REPLIES 10

    Techmore
    Member
    Hi ekmekci, thanks for your post. We'll get the needed information and get back to you as soon as possible.

    kgoveas
    Community Moderator
    Community Moderator

    Hi ekmekci,

    Some of your questions are answered below. I will answer the rest in a follow-up post.

    1) The steps are detected by the step detector algorithm. They are however not accumulated in the step counter until it continuously hits a minimum threshold. This is done in order to prevent counting of steps for brief movements. This is the expected behavior.

    4) It doesn't matter which axis you place the sensor at for step counting.

    5) The step counter config is briefly described in the datasheet. You can configure between default, sensitive and robust. 

    Regards,
    kgoveas

    Dear Kgoveas,

    Thank for your reply,

    But, according to your answer. This sensor is useful for continuos movement. 
    For example if i use this sensor and i will take 5 steps in every 1 min, after 10min in reality i will do 50 steps. But sensor will show 0 step. Am i correct ?

    I am using BST-BMA-DS000-03 (July 2019
    There are two options wrist(default) and non-wrist,
    But when i looked into BST-BMA-DS000-03(July 2018)
    There are three options Sensitive, Normal, Robust

    Which datasheet i should care ?
    Values between july2018 and july2019 are very different.
    For example
    According to July2019
    Address 0x70 ==> 247 (default)
    According to July2018
    Address 0x70 ==> 0 (default and for all options)


    Also, i need your help about setting best parameters for step counting (ODR, OSR, filteracc, vsvs)

    Best regards,

    ekmekci,

    This threshold is a robustness feature. In real life, it is far more likely that the algorithm incorrectly counts 1 or 2 steps, than the user actually walks a short distance like this. Overall, the step counter output is the most representative indication of the number of steps taken by the user over the whole day.

    What you might be looking for is the step detector output, which is instantaneous (including false positives). Please note the following remark in the datasheet:
    "There are situations when the step counting value is different than the sum of steps detected by the step detector". The hypothetical scenario you describe is such a situation, where the step count would be 0, but the sum of step detected is 50.

    o_o
    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