Bosch Sensortec Community

    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

    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

    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.