Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME680 BSEC dual sampling rate

    BME680 BSEC dual sampling rate

    Benedikt32
    Member

    Dear community,

    I'm currently setting up a project using the BME680 with BSEC Arduino Library 1.4.7.4. I want to use the ability of sampling the different sensor parts with different rates as given in the ULP_LP_Example. LP sampling rate for T/P/H and ULP sampling rate for IAQ/bVOC/eCO2. 

    My first question is which bsec_config_iaq file to use? The 3s or the 300s version? In the example I see that the following was done:

    #include "bsec_serialized_configurations_iaq.h"

    But this can be either one of the eight config files provided, right? 

    My second question is more of an observation where I can't explain the reason but hope that you can help me out. I set up my two sensor lists as given in the example and provided the respective sampling rates as follows:

    //just an excerpt of the full program  
    
    bsec_virtual_sensor_t sensorList_LP[3] = {
        BSEC_OUTPUT_RAW_PRESSURE,
        BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE,
        BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY,
      };
    
      bsec_virtual_sensor_t sensorList_ULP[5] = {
        BSEC_OUTPUT_STABILIZATION_STATUS,
        BSEC_OUTPUT_RUN_IN_STATUS,
        BSEC_OUTPUT_CO2_EQUIVALENT,
        BSEC_OUTPUT_BREATH_VOC_EQUIVALENT,
        BSEC_OUTPUT_IAQ,
      };
      
      iaqSensor.updateSubscription(sensorList_ULP, 5, BSEC_SAMPLE_RATE_ULP);
      checkIaqSensorStatus();
      iaqSensor.updateSubscription(sensorList_LP, 3, BSEC_SAMPLE_RATE_LP);
      checkIaqSensorStatus();
    
    void loop() {
      if(iaqSensor.run()){
        updateState();
        Serial.print(String((uint16_t)(millis()/1000)) + "s");
        Serial.print(" BSECstate: " + String(iaqSensor.status));
        //    Serial.print(" IAQacc: " + String(iaqSensor.iaqAccuracy));
        Serial.print(" riStat: " + String(iaqSensor.runInStatus));
        Serial.print(" stabStat: " + String(iaqSensor.stabStatus));
        Serial.print(" IAQ: " + String(iaqSensor.iaq) + "(" + String(iaqSensor.iaqAccuracy) + ")");
        Serial.print(" CO2: " + String(iaqSensor.co2Equivalent) + "(" + String(iaqSensor.co2Accuracy) + ")");
        Serial.print(" bVOC: " + String(iaqSensor.breathVocEquivalent) + "(" + String(iaqSensor.breathVocAccuracy) + ")");
        Serial.print(" p: " + String(iaqSensor.pressure));
        Serial.print(" t: " + String(iaqSensor.temperature));
        Serial.println(" h: " + String(iaqSensor.humidity));
        }
        else {
          checkIaqSensorStatus();
        }
    }
    1. The values for the gas sensor (IAQ, bVOC, eCO2) are updated on a 3s basis and their values are changing. Is this normal, when their sampling rate is set to ULP?
    2. What struck me most is that the temperature value is "running away" in ULP_LP mode. It rises quickly to like 2°C above the value that it measures, when all of the above sensors are polled in either LP or ULP mode. What can the reason for that behavior be? It seems to me as if the heater is either not turned off or activated for a longer duration as in when all sensors are polled with the same rate.

     

    Thanks,
    Benedikt

    9 REPLIES 9

    Dvalin
    Occasional Visitor

    Worked for me as well. BSEC v1.4.8.0

    Had to comment out also zeroOutputs() in readProcessData to keep gas related values going to zero..

    Dissapointed that the examples supplied aren't working. Makes me wunder about the BSEC library.

    Minhwan
    Community Moderator
    Community Moderator

    Hello, 

     

    I don't think we are using zeroOutputs fuction. 

    Please download as below url. Currently,  we released BSEC 2. 

    https://www.bosch-sensortec.com/software-tools/software/bsec/

    Of course, you might need to comment out or modify some code if your arduino hardware doesn't have EE2ROM part. 

    Thanks, 

    dduehren
    Occasional Visitor

    Just to be clear, you're saying this libary is buggy: https://github.com/BoschSensortec/BSEC-Arduino-library/tree/master/examples

    What is this library https://github.com/BoschSensortec/BME680_driver/releases and how to use it?

    That's now been updated to this one: https://github.com/BoschSensortec/BME68x-Sensor-API

    How do those APIs fit into the picture?

    As for the bsec_iot_example, it  is, at best,  very awkward to use.  Who wants all those files in their application?  WHy can't you make it a good Arduino style library?  At least put your bsec_iot_example into a decent library format and example.ino.  And  you should put a notice on the arduino library that it's buggy.

     

     

    dduehren
    Occasional Visitor

    Could you expand upon the libaries.  I downloaded one library though the Arduino library manager.  You say it's buggy.  ANd that we should copy the iot_example libary to the src, but more information is needed.

    The existing ..Arduino\libraries\BSEC_Software_Library\src has directories of various platforms atmega, esp8266 and also of bme680

    The BSEC_1.4.8._Generic_Release_Update has a number of things in it.  It has a config directory with the  files defining the various generic... Does that need to go somewhere?

    Then there's the algo directory with a lite_version and normal_version, which I assume are the actual libaries. So do those get copied into the src directory? Inside each of those is a bin and inc folder.  And the bin folder has a list of hardware platforms : esp, gcc, MAC, avr etc.   Inside of the esp file is esp8266 and four files . 

    SO exactly how is this suppossed to be done?  

     

    Minhwan
    Community Moderator
    Community Moderator

    Hello, 

     

    This post was year and half ago. The bug I mentioned was already fixed. 

    Currently, you can use our bsec and bsec2 both for your platform. 

    For example, in case of bsec2, you can download the our bsec2 example code as below link 

    arduino github - https://github.com/BoschSensortec/Bosch-BSEC2-Library

    general bsec2 example - https://www.bosch-sensortec.com/software-tools/software/bme688-software/

    Then, you need to follow the migration guide step for bsec 2. 

    Yes, you need to use right algo file for your platform. If your platform is esp8266, please use the algo file in esp8266 folder. 

    If you are using Arduino platform, you just need to add our librariy into Arduino as guided. 

    Thanks, 

     

    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