Bosch Sensortec Community

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

    General questions about BME680

    General questions about BME680

    Napsty
    Member

    I bought a BME680 sensor from Adafruit and I've been testing it for the last couple of days. Some questions arise however.

    IAQ Calculations

    I know it's written in the datasheet that the IAQ calculation happens in a closed-source library from Bosch:

    Bosch Sensortec BSEC software is available as a closed source binary which will be made available via a Software License Agreement (SLA) on the Bosch Sensortec website (https://www.bosch-sensortec.com/bst/products/all_products/BSEC).

    The key features of the hardware-software system are:
    Calculation of ambient air temperature outside of the device (e.g. phone)
    Calculation of ambient relative humidity outside of the device
    Calculation of indoor air quality (IAQ) level outside of the device

    But there are other libraries/scripts out there which attempt to directly talk to the sensor without the BSEC library and use their own algorithm/calculation to obtain an IAQ value:

    You've been asked this probably a thousand times but I'm asking it again: Would you be so kind to share the IAQ calculation algorithm? Or at least give some hints to get to a close to correct value?

     

    Calibrations + Runtime

    In the last few days I've been using a C script from https://github.com/alexh-name/bsec_bme680_linux to in combination with the BSEC library to obtain some values. Example output:

     

    2020-04-03 10:17:08,[IAQ (2)]: 23.54,[T degC]: 2.36,[H %rH]: 68.66,[P hPa]: 950.59,[G Ohms]: 985240,[S]: 0,[eCO2 ppm]: 487.148864746093750,[bVOCe ppm]: 0.4762972593307495117187500
    2020-04-03 10:17:11,[IAQ (2)]: 23.56,[T degC]: 2.36,[H %rH]: 68.62,[P hPa]: 950.60,[G Ohms]: 985968,[S]: 0,[eCO2 ppm]: 487.308288574218750,[bVOCe ppm]: 0.4765842854976654052734375
    2020-04-03 10:17:14,[IAQ (2)]: 23.62,[T degC]: 2.35,[H %rH]: 68.60,[P hPa]: 950.60,[G Ohms]: 987426,[S]: 0,[eCO2 ppm]: 487.841918945312500,[bVOCe ppm]: 0.4775463342666625976562500

     

    After a couple of hours of runtime, the sensor eventually switched to accuracy 3.

    If I stop the script and launch it again (even just for a few seconds), the IAQ accuracy drops to 0 again. Does that mean that the sensor needs to be actively queried all the time to stay at accuracy level 3? Shouldn't the sensor have at least a short-term memory to recall it's already calibrated?

     

    Python

    From what I saw in the BSEC library, there's only support for C. Are there any plans to officially support python by creating a module?

     

    Values between BSEC and Open Source Libraries differ

    By comparing the Adafruit BME680 python library and using the above mentioned C program using the BSEC library I noticed different values retrieved from the sensor. This is probably caused by the Adafruit's own sensor calculations. Are you (Bosch) in direct contact with Adafruit which could help to get the same values as retrieved from the BSEC library (supposing the data retrieved from BSEC is correct)? -> https://github.com/adafruit/Adafruit_CircuitPython_BME680/issues/29

     

    Thanks in advance for any helpful answers!

    13 REPLIES 13

    handytech
    Community Moderator
    Community Moderator

    @Napsty wrote:


    The bVOCeq output in ppm is derived from our static-IAQ output.


    OK but so that means that the sensor does not have its own VOC sensor but rather calculates the VOC value based on other sensor data. Correct?


    It means that the built-in VOC sensor's output is not directly in ppm units. BME680's gas sensor outputs a relative gas resistance value (in Ω) proportional to the tVOC concentration, then BSEC calculates the IAQ/sIAQ outputs and derivatives.

    Thanks for all the responses so far. Really helps me to better understand the sensor.

    Since ~2 days, the sensor shows extremely high raw data which would indicate polluted air. The sensor is being in fresh air right now. Country side.

    2020-04-07 07:19:53,[IAQ (3)]: 240.37,[T degC]: 5.26,[H %rH]: 76.10,[P hPa]: 962.52,[G Ohms]: 173467,[S]: 0,[eCO2 ppm]: 6446.424804687500000,[bVOCe ppm]: 1000.0000000000000000000000000

    Is there a way to "reset" the sensor so it can properly recalibrate itself? bVOC stays fixed on 1000 by the way...

    handytech
    Community Moderator
    Community Moderator

    @Napsty wrote:

    Since ~2 days, the sensor shows extremely high raw data which would indicate polluted air. ..


    Sounds odd, but keep in mind that one should track the relative changes in the raw gas data rather than its absolute value. In fact, one single point can alone be indicative of the current performance, the current value is still in the lower range of the possible values, and higher VOC concentrations are typ. indicated by lower raw gas values.


    @Napsty wrote:

    Is there a way to "reset" the sensor so it can properly recalibrate itself? bVOC stays fixed on 1000 by the way...


    If the sensor has been operating for some time now it should be doing fine, in this case you would restart BSEC (without re-loading any state string). If possible I would recommend to keep a log of your outputs, especially raw data and timestamp, as it could always be used for debugging purpose or post-processing.

    Very interesting... the sensor was on fixed 1000 bVOC for over 24 hours and now that I checked again (I'm running the bsec script in a screen session), the current values have finally changed:

    2020-04-07 11:41:39,[IAQ (3)]: 123.71,[T degC]: 12.33,[H %rH]: 63.63,[P hPa]: 962.62,[G Ohms]: 242752,[S]: 0,[eCO2 ppm]: 2889.081542968750000,[bVOCe ppm]: 27.0098762512207031250000000
    2020-04-07 11:41:42,[IAQ (3)]: 122.63,[T degC]: 12.33,[H %rH]: 63.60,[P hPa]: 962.64,[G Ohms]: 244926,[S]: 0,[eCO2 ppm]: 2860.153320312500000,[bVOCe ppm]: 25.8542098999023437500000000
    2020-04-07 11:41:45,[IAQ (3)]: 121.48,[T degC]: 12.33,[H %rH]: 63.56,[P hPa]: 962.64,[G Ohms]: 246768,[S]: 0,[eCO2 ppm]: 2829.265380859375000,[bVOCe ppm]: 24.6747932434082031250000000
    2020-04-07 11:41:48,[IAQ (3)]: 120.63,[T degC]: 12.33,[H %rH]: 63.50,[P hPa]: 962.66,[G Ohms]: 247140,[S]: 0,[eCO2 ppm]: 2806.448242187500000,[bVOCe ppm]: 23.8382377624511718750000000

    As I am writing this, bVOC decreases more and more, IAQ values too. I am asking myself what could cause this behaviour? If there was really such bad air outside, I would have certainly smelled at least a bit of it (not saying that my nose is a dog-nose but still)?

    Is it possible that the sensor really needs to run at least a couple of days (non-stop) to stabilize the values?

    handytech
    Community Moderator
    Community Moderator

    @Napsty wrote:

    Is it possible that the sensor really needs to run at least a couple of days (non-stop) to stabilize the values?


    This statement will always be true, the longer the sensor is operated, the higher the chances that the sensor stabilized to its environment and that BSEC's calibration is optimal.


    @Napsty wrote:

    As I am writing this, bVOC decreases more and more, IAQ values too. I am asking myself what could cause this behaviour? If there was really such bad air outside, I would have certainly smelled at least a bit of it (not saying that my nose is a dog-nose but still)?


    Pretty challenging to tell. Also note that compounds and air mixtures outside can be quite different than inside.

    From a raw data perspective:

    • on 2020-04-03, gas resistance was in the ~1MΩ range with very low IAQ,
    • on 2020-04-07 early morning, raw gas values were the lowest (~175kΩ) with higher IAQ values (still under 250IAQ though, so not the worst BSEC has observed?),
    • later on 2020-04-07 mid-day, gas values increased again (~250kΩ) meaning better (lower) IAQ.

    Note sure if the gas values were so high at the very beginning because the sensor was operating for the first time (or after a long break), but if so the overall IAQ behavior seems coherent with raw gas values and could still improve over time.

    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