11-03-2021 09:21 PM - edited 11-03-2021 09:29 PM
Hi,
I'm developing a IAQ Sensor using BME688 in conjunction with the BSEC 2.0 library on ESP32 board.
I'm using the sample code provided with the library that detects IAQ and also sense 4 different gases.
Yet I'm only interested to the IAQ measurement.
Now I've run the sensor for some days and I've got a strange peaky response in the IAQ readings, it seems a very periodic behavior, with a period every 5 measurements, the interval between a measure and the other is roughly of 10 seconds, then when it reaches the lower bound it stucks for approx 120 seconds and then spikes up.
I pasted a picture here of the measured IAQ. It seems to me that the correct IAQ is the lower measurement
Do you have any hint?
bme/iaq {"IAQ":235.1,"IAQ_accuracy":3,"GAS_R":56612.1}
bme/iaq {"IAQ":190.9,"IAQ_accuracy":3,"GAS_R":72112.7}
bme/iaq {"IAQ":157.4,"IAQ_accuracy":3,"GAS_R":78988.0}
bme/iaq {"IAQ":136.3,"IAQ_accuracy":3,"GAS_R":83387.6}
bme/iaq {"IAQ":122.8,"IAQ_accuracy":3,"GAS_R":86340.6}
bme/iaq {"IAQ":236.4,"IAQ_accuracy":3,"GAS_R":56499.7}
bme/iaq {"IAQ":192.0,"IAQ_accuracy":3,"GAS_R":71930.3}
bme/iaq {"IAQ":158.0,"IAQ_accuracy":3,"GAS_R":78914.9}
bme/iaq {"IAQ":137.2,"IAQ_accuracy":3,"GAS_R":83143.9}
bme/iaq {"IAQ":123.8,"IAQ_accuracy":3,"GAS_R":86079.4}
bme/iaq {"IAQ":237.8,"IAQ_accuracy":3,"GAS_R":56276.1}
bme/iaq {"IAQ":193.0,"IAQ_accuracy":3,"GAS_R":71748.9}
bme/iaq {"IAQ":159.0,"IAQ_accuracy":3,"GAS_R":78696.6}
bme/iaq {"IAQ":138.0,"IAQ_accuracy":3,"GAS_R":82982.2}
bme/iaq {"IAQ":124.9,"IAQ_accuracy":3,"GAS_R":85819.6}
bme/iaq {"IAQ":237.5,"IAQ_accuracy":3,"GAS_R":56424.9}
bme/iaq {"IAQ":194.8,"IAQ_accuracy":3,"GAS_R":71329.1}
bme/iaq {"IAQ":160.4,"IAQ_accuracy":3,"GAS_R":78407.4}
bme/iaq {"IAQ":138.9,"IAQ_accuracy":3,"GAS_R":82821.1}
bme/iaq {"IAQ":125.1,"IAQ_accuracy":3,"GAS_R":85819.6}
11-04-2021 03:10 AM
Hello carmixdev,
What's the sample rate you configured?
When you do the test, what is your air environment like?
11-04-2021 09:41 PM
The sample rate is the one defined by the macro BSEC_SAMPLE_RATE_HIGH_PERFORMANCE,
I pasted the relevant code snippet from my implementation, as of the environment it is a study room, the detected IAQ seems reasonable if you don't consider the "comb" effect 😄
void setup(void)
{
bsec_virtual_sensor_t sensorList[] = {
BSEC_OUTPUT_RAW_TEMPERATURE,
BSEC_OUTPUT_RAW_PRESSURE,
BSEC_OUTPUT_RAW_HUMIDITY,
BSEC_OUTPUT_RAW_GAS,
BSEC_OUTPUT_RAW_GAS_INDEX,
BSEC_OUTPUT_IAQ,
BSEC_OUTPUT_CO2_EQUIVALENT,
BSEC_OUTPUT_STABILIZATION_STATUS,
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE,
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY,
BSEC_OUTPUT_GAS_ESTIMATE_1,
BSEC_OUTPUT_GAS_ESTIMATE_2,
BSEC_OUTPUT_GAS_ESTIMATE_3,
BSEC_OUTPUT_GAS_ESTIMATE_4
};
Serial.begin(115200);
EEPROM.begin(BSEC_MAX_STATE_BLOB_SIZE + 1);
if(!bsecInst.begin(BME68X_I2C_ADDR_HIGH, Wire) ||
!bsecInst.setConfig(bsec_config_selectivity) ||
!loadState(bsecInst) ||
!bsecInst.updateSubscription(sensorList, ARRAY_LEN(sensorList), BSEC_SAMPLE_RATE_HIGH_PERFORMANCE))
checkBsecStatus(bsecInst);
12-03-2021 10:41 AM
Hello carmixdev,
BSEC_SAMPLE_RATE_HIGH_PERFORMANCE sample rate was used in BSEC example code.
The value of IAQ is affected by the actual air.