Bosch Sensortec Community

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

    BME680 2 second delay

    BME680 2 second delay

    sagar448
    Member

    Hello,

    I have been using the BSEC library with ESP32 with Arduino. Everything is working fine. 

    As it is a battery powered application, I wanted to decrease the time the esp32 is awake and so while looking deeply within the BSEC functions I noticed that the BSEC::Run() function causes approximately a 2second delay. Upon experimentation I overrode the delay function and set the delay to 200ms regardless of whats passed in as a delay from BSEC. Everything is still working fine, the sensor readings dont seem to be off.

    I wanted to know if it is okay to leave it at that? And what might the consequences be for such changes?

    Thank you!

    Kind Regards

    Sagar Jaiswal

    3 REPLIES 3

    handytech
    Community Moderator
    Community Moderator

    In the BSEC::Run() function, the library triggers a measurement of the BME680 sensors. The duration of each measurement, especially of the gas sensor, depends on the current operating mode. In Ultra-Low-Power mode (ULP with 5min sampling period), the gas measurement itself takes about 2 seconds. Since this duration corresponds to the active measurement time of the sensor, its respective delay period shall not be reduced.

    If you would like to do something else within this measurement period, it is optionally possible to override the default delay function by a custom idle task, but be aware that this method would replace all internal delays, even of a few milliseconds, therefore this custom task shall not break the BME680 or BSEC timing requirements, nor reset the controller or BSEC/RAM states, etc.

     

    Hello  handytech,

    Thank you for the quick response.

    Yes you are correct, I am running this with the the ULP mode 300s. What mode would you recommend that would provide a faster reading with the least hinderance in the accuracy? (Something less than a second? Possible in the millisecond range). 

    Yes I did override the delay function but if its just possible to change the operating mode then no need.

    Thank you!

    handytech
    Community Moderator
    Community Moderator

    Currently only two operating modes are available. The other operating mode, the Low-Power (LP) mode, samples data every 3 seconds, with each measurement taking about ~200ms.

    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