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:

    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?


    Short version: no. We are trying to support new platform requests to the extent of our resources, but their is no plan to open BSEC algorithms.


    @Napsty wrote:

    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?


    For optimal performance, it is recommended to query the BME680 at fixed sampling period. The sensor itself is only providing raw data outputs (and has no on-board memory). During run-time, the different BSEC processes are happening in RAM, thus their status are lost if reset without further context information. In real-life, devices may be reset for different reasons (power outage, battery replacement, ...). Therefore BSEC offers interfaces to pull (respectively upload) a "state string" from (resp. to) the library (bsec_get_state() and bsec_set_state()). This state contains information about calibration history among others, so that IAQ accuracy could be restored as quickly as possible.


    @Napsty wrote:

    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?


    There is currently no plan to officially support python for BSEC. Interfacing BSEC and python should be possible on larger platforms (e.g. Windows/Linux), but I understand it may get more challenging for the embedded python trend.


    @Napsty wrote:

    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


    We typ. support sensor usage and integration, but as far as I know we don't support third-party software. This specific implementation seems to me more like a port our sensor API/drivers in python, meaning a pure read-out our raw sensor signals.

    Note that in addition to the IAQ calculation, BSEC is also doing all sorts of internal (and optionally even external) cross-influences compensation .

    Thanks, handytech, for your answers.

    Another question arose concerning the VOC data (shown using the C program from https://github.com/alexh-name/bsec_bme680_linux and BSEC library):

    2020-04-03 16:29:04,[IAQ (3)]: 38.57,[T degC]: 11.69,[H %rH]: 40.90,[P hPa]: 950.21,[G Ohms]: 1086249,[S]: 0,[eCO2 ppm]: 620.440551757812500,[bVOCe ppm]: 0.7882111072540283203125000
    2020-04-03 16:29:07,[IAQ (3)]: 39.00,[T degC]: 11.70,[H %rH]: 41.06,[P hPa]: 950.19,[G Ohms]: 1082725,[S]: 0,[eCO2 ppm]: 624.260070800781250,[bVOCe ppm]: 0.7996708750724792480468750
    2020-04-03 16:29:10,[IAQ (3)]: 39.44,[T degC]: 11.72,[H %rH]: 41.07,[P hPa]: 950.21,[G Ohms]: 1080097,[S]: 0,[eCO2 ppm]: 628.181396484375000,[bVOCe ppm]: 0.8116095066070556640625000
    2020-04-03 16:29:13,[IAQ (3)]: 39.11,[T degC]: 11.72,[H %rH]: 41.03,[P hPa]: 950.17,[G Ohms]: 1089796,[S]: 0,[eCO2 ppm]: 625.240966796875000,[bVOCe ppm]: 0.8026405572891235351562500
    2020-04-03 16:29:16,[IAQ (3)]: 38.94,[T degC]: 11.75,[H %rH]: 40.85,[P hPa]: 950.23,[G Ohms]: 1088907,[S]: 0,[eCO2 ppm]: 623.730834960937500,[bVOCe ppm]: 0.7980731725692749023437500
    2020-04-03 16:29:19,[IAQ (3)]: 39.21,[T degC]: 11.79,[H %rH]: 40.73,[P hPa]: 950.25,[G Ohms]: 1082725,[S]: 0,[eCO2 ppm]: 626.131042480468750,[bVOCe ppm]: 0.8053450584411621093750000
    2020-04-03 16:29:22,[IAQ (3)]: 39.79,[T degC]: 11.77,[H %rH]: 40.85,[P hPa]: 950.23,[G Ohms]: 1076613,[S]: 0,[eCO2 ppm]: 631.281250000000000,[bVOCe ppm]: 0.8211731314659118652343750
    2020-04-03 16:29:25,[IAQ (3)]: 39.76,[T degC]: 11.80,[H %rH]: 40.87,[P hPa]: 950.23,[G Ohms]: 1082725,[S]: 0,[eCO2 ppm]: 630.964599609375000,[bVOCe ppm]: 0.8201911449432373046875000

    First of all, what is meant with "bVOCe" ? Is it similar to other sensors TVOC (Total Volatile Organic Compounds)?

    In the source code I can find this description:

     * param[in]       breath_voc_equivalent  breath VOC concentration estimate [ppm]

    But I'm not quite sure how to interpret this.

    For comparison with TVOC, the typical PPM ranges are:

    • 0.12 - 0.20 ppm = Good
    • 0.20 - 0.30 ppm = Moderate
    • 0.30 - 0.60 ppm = Unhealthy
    • 0.60 - 2.00 ppm = Very unhealthy
    • > 2.00 ppm = Hazardous

    According to the readings from my BME680 sensor this would mean the air is currently Very Unhealthy (~ 0.8 ppm). That's really not the case right now ;-).

    Am I misinterpreting the VOC data or is the sensor giving wrong data?

    handytech
    Community Moderator
    Community Moderator

    @Napsty wrote:

    First of all, what is meant with "bVOCe" ? Is it similar to other sensors TVOC (Total Volatile Organic Compounds)?


    bVOC stands for breath-VOC. We use this notation since that was the gas mixture used in lab tests to derive its scaling, thus making the assumption that the main source of pollution is from human breath.

    e stands for equivalent, since this sensing technology doesn't output an absolute gas concentration, but practical outputs are derived from it by BSEC.


    @Napsty wrote:

    Am I misinterpreting the VOC data or is the sensor giving wrong data?


    The bVOCeq output in ppm is derived from our static-IAQ output. Typical good air as derived by BSEC (~25IAQ) will correspond to about  ~0.5ppm of bVOCeq. If you are pleased with the sIAQ trend but not with the bVOCeq output, you may try to define your own algorithm based on the sIAQ output.



    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?

    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