Bosch Sensortec Community

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

    BMI160 No Motion Interrupt Duration

    BMI160 No Motion Interrupt Duration

    AlexC
    Member

    Hi,

    I currently have the no motion interrupt working fine as long as the duration is set to around 10 seconds or below, if i set the duration any higher than this there seems to be some sort of offset being applied causing a duration setting of 60 seconds to trigger at around 6 miniutes. So really im just abit confused about the maths used for the duration setting, I had a read of the data sheet and found the stuff relating to the slow/no motion duration delay equations however i couldnt really make much sense of it in all honesty.

    My IMU is currently set up like:

    ODR: 25HZ

    Range: 16G

    BW: NORMAL_AVG4

    power mode: Normal

    I would greatly appreciate any help to aid my understanding of the maths involved/issue if there is one, surrounding this.

    Thank you in advance!

    4 REPLIES 4

    shellywang
    Occasional Contributor

    Hi AlexC,

    The following suggestions hope will be helpful with  your question:

    1.The no motion interrupt is generated when the slope on all selected axis remains smaller than a programmable threshold for a programmable time.

    so, threshold and duration time should be configured. What is the threshold in your experiment?

    2.  Be sure no external vibration.

    3.   Please upload your log file.

    Hi,

    Thank you for your reply.

    I can confim there is no external vibration and my current test consists of starting the interrupt then dropping the device on the table and leaving it until the interrupt triggers. Currently my no motion interrupt is set up like this:

     

        ret_code_t err_code;
            
        // Configure interrupt
        bmi160int.int_channel = BMI160_INT_CHANNEL_2;
        bmi160int.int_type = BMI160_ACC_SLOW_NO_MOTION_INT;
        bmi160int.int_pin_settg.output_en = BMI160_ENABLE;
        bmi160int.int_pin_settg.output_mode = BMI160_DISABLE;
        bmi160int.int_pin_settg.output_type = BMI160_DISABLE;
        bmi160int.int_pin_settg.edge_ctrl = BMI160_ENABLE;
        bmi160int.int_pin_settg.input_en = BMI160_DISABLE;
        bmi160int.int_pin_settg.latch_dur = BMI160_LATCH_DUR_NONE;
        
        bmi160int.int_type_cfg.acc_no_motion_int.no_motion_sel = BMI160_ENABLE;
        bmi160int.int_type_cfg.acc_no_motion_int.no_motion_x = BMI160_ENABLE;
        bmi160int.int_type_cfg.acc_no_motion_int.no_motion_y = BMI160_ENABLE;
        bmi160int.int_type_cfg.acc_no_motion_int.no_motion_z  = BMI160_ENABLE;
        bmi160int.int_type_cfg.acc_no_motion_int.no_motion_dur = 40;
        bmi160int.int_type_cfg.acc_no_motion_int.no_motion_thres = 20;
    
        // Add interrupt
        err_code = bmi160_set_int_config(&bmi160int, &sensor);
     

     

     

    With this setting the interrupt is reliably going off after being still for around 3 minutes and 10 seconds. 

    Hi,

    Sorry to double post but i believe I have sorted my problem by having a more detailed read through of the data sheet and look through the bmi160 code hosted on github. I noticed that there are only 6 bits used for the duration and combined with the different tick times of 1.28, 5.12 and 10.24s explains why im getting weird times as a settign of 40 using a tick time of 5.12 would mean it triggering after around 3 mins. Unfortunately this means the max duration time i can have is around 7 mins, which wont work for my intended use so I will have to come up with a custom way of detecting no motion.

    Many thanks for your assistance.

    A1zxn
    Occasional Visitor

    Hello mate, my research in finding a code for the BMI-160 to detect NO MOTION has brought me here. I hope you are well. Have you got any idea as to where to start if I am looking for an example code

    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