Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BSEC library / BME680 - minimum sample rate and BSEC_SAMPLE_RATE_ULP_MEASUREMENT_ON_DEMAND

    BSEC library / BME680 - minimum sample rate and BSEC_SAMPLE_RATE_ULP_MEASUREMENT_ON_DEMAND

    dslc
    New Poster

    I am aware that the BSEC library offers two sample rates by default - LP (every 3 seconds) and ULP (every 5 minutes).

    It also seems that - if the sensor is not read at sufficient frequency (e.g. the sensor is configured for LP mode but only read every 10 seconds) - the IAQ values are not updated. (IAQ accuracy remains at 0 and IAQ value and CO2 equivalent never change.)

    But I am working with a firmware in which the MCU is put to sleep for >> 5 minutes.

    Can BSEC_SAMPLE_RATE_ULP_MEASUREMENT_ON_DEMAND be used to overcome this minimum sample rate?

    (I have experimented with this mode briefly, but the call to updateSubscription() returns a BSEC_E_SU_WRONGDATARATE error - and I get the impression that this is not the use case that this mode is provided for.)

    I am currently using the Arduino BSEC library version 1, but am willing to switch to the BSEC2 library if necessary.

    I have prior experience with the lower-level C library also, and am willing to work with that again - but perhaps not if the library is simply not designed to work with sample intervals greater than 5 or 10 minutes.

    P.S. The goal is to allow the device running this firmware to sleep for 30 minutes at a time.

    1 REPLY 1

    BSTRobin
    Community Moderator
    Community Moderator

    Hi dslc,

    The sample rate of ULP, LP and CONT mode is 1/300Hz, 1/3Hz, 1Hz respectively.
    You can only use sample rates that BSEC already supports. If you set the sample rate to ULP, you can only let the MCU sleep for 300 seconds, not more than 300 seconds.

    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