BME680 BSEC dual sampling rate

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