Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BME680 - how frequent to query the sensor

    New Poster

    BME680 - how frequent to query the sensor

    Hi all

    I bought a BME680 sensor (Watterott Breakout) to measure the indoor air quality and report it to some server using an ESP8266 and the BSEC library via Arduino.
    Unfortunately the AIQ accuracy remains 0, even over hours (I let it run for over half a day).

    I tried the Arduino Library samples and there around after 5 minutes the accuracy changes to 1. Means the sensor itself works and my code must be wrong.


    Now the difference to my code is that the sample just calls '' in the loop all the time without any delay, and it receives a result every 3 second.
    That perfectly matches the sample rate which is set (BSEC_SAMPLE_RATE_LP).

    Some experiments have shown that as long as I query more frequently than the sample rate of 3 seconds, the accuracy changes to 1. Means also a delay of 2 seonds is no issue.
    But as soon as the delay is higher, e.g. 5 seconds, the accuracy will remain with 0.

    I had the understanding that the sample rate just specifies how frequent the sensor can provide updated values. But I would not expect that it does not work properly if these values are not read (I would expect they just get overwritten all the time).

    As for my use case, I only need a measurement every 2-3 minutes. So having a delay of 2 minutes is not going to work and it's the reason why my accuracy has remained with 0.

    Is that the intention of the library and I need to handle it by myself to call run() constantly in the loop, getting a result only every 3 seconds and use the returned value only every 2 minutes instead of having a delay?
    And in case the ESP8266 needs to perform some intermediate activities (e.g. sending/receiving HTTP requests) which takes longer than 3 seconds and hence no run() is called in the meanwhile, it will cause BME680 to loose it's accuracy?


    (I know I could move to the ULP rate with an update of 5 minutes, but I prefer 2-3 minutes). BSEC library version


    Thanks & Regards

    2 REPLIES 2
    Community Moderator

    Re: BME680 - how frequent to query the sensor

    Hi Manitu, 


    You should follow our time frame for LP or ULP. 

    Or, you can't get proper result. 

    Thank you. 

    New Poster

    Re: BME680 - how frequent to query the sensor

    Thanks. I had the hope the API works different.