Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMI160 undersampling for low-power and normal mode

    BMI160 undersampling for low-power and normal mode

    arurke
    Established Member

    We run the BMI160 in low-power mode, returning it briefly to normal mode in order to read the FIFO, before setting it back to low-power mode.

    The BMI160 datasheet Section 2.2.3 states: "(...) an undersampling mode is defined in such a way that it mimics the behavior of the lower data rate in low power mode in normal mode. The low power mode then only switches clock sources."

    This makes me think that for our application, we should just keep the undersampling mode enabled during the brief normal mode operation.

    However, the official BMI160 driver on github, always disables the under-sampling when going to normal power mode, see "process_under_sampling()" at https://github.com/boschsensortec/BMI160_SensorAPI/blob/master/bmi160.c#L3534-L3573  Also, the datasheet, in Section 2.4.1.1 states "When normal power is used, the undersampling mode should be disabled)."

    Could you please advice, for our application, what is the most appropriate setting for the undersampling mode? 

    4 REPLIES 4

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your inquiry.

    Sorry for the confusion. When BMI160 is powered on, both accel and gyro are in suspend mode. When you write value of 0x11 to command register 0x7E, then BMI160 accel will enter normal mode. When you write value of 0x12 to command register 0x7E, then BMI160 accel will enter low power mode (LPM). Normal mode is continuous and has ODR from 12.5Hz to 1600Hz. LPM uses duty cycling with lower clock and has ODR from 0.78Hz to 400Hz. When acc_bwp is 0b000, then BMI160 accel will take one single measurement in normal mode and go to suspend mode. When acc_bwp is 0b001, then BMI160 accel will take 2^1 = two measurements in normal mode, average them, put the average value into data registers and then go to suspend mode. So on and so on.  This will save power consumption.

    The undersampling acc_us bit-7 in register 0x40 is for LPM only. When BMI160 accel is in LPM, acc_us bit must be set to 0b1. When BMI160 accel is in normal mode, this bit must be set to 0b0.

    Please see the attached PDF file as an example.

    Thanks.

    arurke
    Established Member

    Thank you very much @FAE_CA1 !

    A couple of follow-up questions:

    1) If configuring acc_bwp such that averaging is done in low-power mode, what is the ODR of those measurements that are being averaged?

    2) In our application, the BMI stays in normal mode only to read out the data, and then we return it to low-power mode. Do I need to disable undersampling during the short normal-mode period when we read out data?

    3) In the datasheet section 2.4.1.1 it states "When acc_us=0b0, the acc_bwp parameter needs to be set to 0b010 (normal mode)". But in the following paragraph it describes modes OSR2 and OSR4, which has acc_us=0b0 but acc_bwp is not 0b010. Is the first statement incorrect?

    hqlsolution
    Occasional Visitor

    The BMI160 sensor supports undersampling in both low-power and normal modes to conserve energy. In low-power mode, it reduces the sampling frequency to save power, making it ideal for basic motion detection. In normal mode, undersampling balances power efficiency with data accuracy, suitable for more detailed motion tracking.

    https://www.hqlsolutions.com/

    arurke
    Established Member

    Thanks for the input @hqlsolution  It sounds like you are saying that I could configure undersampling in both modes, while @FAE_CA1 just stated that "When BMI160 accel is in LPM, acc_us bit must be set to 0b1. When BMI160 accel is in normal mode, this bit must be set to 0b0.".  Thus I am a bit torn - would either of you care to elaborate?

    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