Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BMA280 no-motion & LPM1

    BMA280 no-motion & LPM1

    New Poster

    I want to minimize current consumption by switching from NORMAL to Low Power Mode 1 and to detect no-motion simultaneously.

    That works. But when I'm trying to move BMA280 continually, no-motion interrupt is fired despite the fact that motion does persist. Tested with sleep_dur 0.5ms, 500ms, 1s. In NORMAL mode I see no interrupts by moving the device, and I do see no-motion interrupt when BMA280 is motionless.


    Is that expected behaviour? Can I use no-motion & LPM1 together or not?

    15 REPLIES 15

    Thanks for detailed explanation.

    To summarize my issue:
    If I want BMA280 in LPM1 with no-motion functionality, I have to
    1. set no-motion interrupt as non-latched (INT_RST_LATCH)
    2. use filtered data (not default max ODR in PMU_BW)
    3. use software timer to measure pulse width, because BMA280 generates interrupt always (even when in motion)

    Real application:

    slo_no_mot_dur = 14 (Delay time 15s)
    software timer counts up to 285 (seconds), when BMA280 interrupt pulse is high, and resets with every high-to-low pulse transition


    This ensures max time 300s (5 minutes) for no-motion detection (with max 15s uncertainty, no-motion state can happen sooner than in 300. second, i.e. in 285. second, but must happen in 300. second at the latest)


    Community Moderator
    Community Moderator


    When BMA280 is working in low power mode 1 (LPM1), it switches between suspend mode and normal mode automatically based on the preselected sleep time. This is so called duty cycling to save current consumption. However, when an interrupt is enabled, every time when BMA280 wakes up from suspend mode and enters normal mode, it will take one measurement and then spend the amount of duration time of the interrupt to take more measurements to see if the interrupt condition is met or not. If yes, BMA280 will generate an interrupt signal. If the interrupt condition is always met, then BMA280 will not go to suspend mode. Instead, it will remain in normal mode to keep checking if the interrupt condition is still valid or not. If not, then it will enter suspend mode and wake up again once the sleep time expires.

    This means that if you only use BMA280 no-motion interrupt in LPM1, when BMA280 is stationary, then BMA280 will always stay in normal mode that consumes 130uA all the time.

    So my suggestion to you is that whenever you see no-motion interrupt, you disable it and enable Slope (also called any-motion) interrupt. Whenever you see any-motion interrupt, you disable it and then enable no-motion interrupt. Therefore, you will save current consumption in all situation.


    This means that if you only use BMA280 no-motion interrupt in LPM1, when BMA280 is stationary, then BMA280 will always stay in normal mode that consumes 130uA all the time.

    I can confirm that.

    I rewrote the code to use NO_MOTION + ANY_MOTION interrupt swapping (both use pin INT2) and current consumption is good.

    But: do I then need NO_MOTION interrupt at all?

    My observation shows (Fluke amperemeter), that ANY_MOTION + LPM1 with 1 second sleep_dur + 300 seconds software timer (any motion causes its reset, by motionlessness is timer incremented) proves the same consumption and BMA doesn't stay in NORMAL mode whether in motion or at rest (PMU_BW = 500Hz, INT_RST_LATCH = 0).

    Whenever you see any-motion interrupt, you disable it and then enable no-motion interrupt.

    Why should I do that? Am I forgetting something?

    Community Moderator
    Community Moderator


    You are right. You don't need to use no_motion interrupt. You can just use any_motion interrupt.

    No_motion interrupt uses both internal timer and any_motion detection. But it consumes a lot of current. If there is no any_motion, then the timer starts counting for example 5 seconds or 10 seconds based on your configuration. If there is any_motion happening during the timer counting, then the timer will get reset and start counting again whenever there is no any_motion again. If it is true that there is no any_motion for the timer duration, then no_motion interrupt will be generated. This can save your MCU's effort to determine if your device is stationary or not.

    It is true that you can use your MCU's own internal timer to replace no_motion interrupt and only use any_motion interrupt.


    Thank You for confirmation.


    One last question:

    If there are no changes in acceleration (theoretically constant velocity) for 300s, software timer will reach 300 and system will detect rest state.
    Neither ANY_, nor NO_ motion solves that case.