Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME688 strange IAQ output with BSEC2

    carmixdev
    New Poster

    BME688 strange IAQ output with BSEC2

    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}

     

    Tags (3)
    3 REPLIES 3
    BSTRobin
    Community Moderator

    Re: BME688 strange IAQ output with BSEC2

    Hello carmixdev,

    What's the sample rate you configured?
    When you do the test, what is your air environment like?

    carmixdev
    New Poster

    Re: BME688 strange IAQ output with BSEC2

    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);

    BSTRobin
    Community Moderator

    Re: BME688 strange IAQ output with BSEC2

    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.

    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