Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME 680 invalid atmospheric pressure values

    BME 680 invalid atmospheric pressure values

    joao_ladeira
    Established Member

    Some of my sensors after a couple of months start to get invalid readings from the bme 680 driver, sometimes it's the atmospheric pressure values, other times is the temperature/Humidity and/or the raw gas resistance. Basically we start to get invalid values like negative values for atmospheric pressure, super high/low values for humidity or temperature.

    Is anyone aware of this issues for the BME680? Before i was thinking that mabye it was because our sensors where outdoor's, but now they are protected with a hidrophobic filter and i start to wonder if it's not an issue with the sensor/firmware.

    This happens randomly after some months for some sensors, for others was after a year.

    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hello joao_ladeira,

    Could you describe you hardware and software information you used? Like your hardware schematic, whch software you referred, etc.

    Hi BSTRobin,

    Thank you for your quick repply, we are using the official drivers from Bosch:

    BoschSensortec/BME68x-Sensor-API: Common Sensor API for the BME680 and BME688 sensors (github.com)

    And the hardware was developped by us.

    Our config of the BME680 is as follows:

    rslt = bme68x_init(&gas_sensor);

    if (rslt == BME68X_OK)
    {
    bme68x_conf conf;
    conf.filter = BME68X_FILTER_OFF;
    conf.odr = BME68X_ODR_NONE;
    conf.os_hum = BME68X_OS_16X;
    conf.os_pres = BME68X_OS_1X;
    conf.os_temp = BME68X_OS_2X;
    rslt = bme68x_set_conf(&conf, &gas_sensor);

    bme68x_heatr_conf heatr_conf;
    heatr_conf.enable = BME68X_ENABLE;
    heatr_conf.heatr_temp = 300;
    heatr_conf.heatr_dur = 100;
    rslt = bme68x_set_heatr_conf(BME68X_FORCED_MODE, &heatr_conf, &gas_sensor);

    //Calculate delay period in microseconds
    meas_period = bme68x_get_meas_dur(BME68X_FORCED_MODE, &conf, &gas_sensor) + (heatr_conf.heatr_dur * 1000);
    }

    Every 3 seconds we set forced mode and read sensor data as follows:

    int8_t dataStatus = 0x00;
    int8_t rslt = bme68x_set_op_mode(BME68X_FORCED_MODE, &gas_sensor);
    gas_sensor.delay_us(meas_period, gas_sensor.intf_ptr);

    if(rslt == BME68X_OK)
    {
    uint8_t n_fields;
    struct bme68x_data data;
    rslt = bme68x_get_data(BME68X_FORCED_MODE, &data, &n_fields, &gas_sensor);
    if(rslt == BME68X_OK && n_fields)
    {
    dataStatus = data.status;
    /* Avoid using measurements from an unstable heating setup */
    if(data.status & BME68X_GASM_VALID_MSK)
    {
    currentSensorsData.humidity = data.humidity;
    currentSensorsData.pressure = data.pressure / 100.0f;
    currentSensorsData.temperature = data.temperature;
    currentSensorsData.gasResistance = data.gas_resistance;
    }
    }
    }

     

    All this works fine for a long time, and for some sensors, after a couple of months they start to report really weird values and do not recover anymore, even after restarting or taking of the power completelly and trying to communicate with the BME680.

    We are using floating point data output #define BME68X_USE_FPU

    We are using an ATMEGA328PB, and i will share the parts of the schematics regarding  the BME680 as son as i can, just need some time to collect that.

    Kind regards,

    João Ladeira

    Hello joao_ladeira,

    From your code, it uses the official driver code.
    Your device works outdoors. When abnormal data occurs, what is the surrounding working environment?

    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