Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME688 giving wrong reads after awhile

    BME688 giving wrong reads after awhile

    Radu
    New Poster

    Hello everyone, 

    I have a little problem with my new bme688 sensor. Sort breaf: I need to use it for temperature, humidity and pressure, to monitor a grow room. I took this sensor in hope to replace my currentDHT22( as I need pressure measurement as well, DHT22 have only temp and hum). My problem starts after some time, over 30 min, around a couple hours, of good readings my sensor suddenly give 195C and 100% humidity and seems to never come back to normal readings again. I'm using "sSense_BME680.h" library( - https://itbrainpower.net/downloadables/ssense_BME680_example.ino, from here)  and arduino Due. It seems I can't make  BSEC or BSEC2, it won't compile on my Due even if I do the steps from github( - https://github.com/BoschSensortec/Bosch-BSEC2-Library, this one).

    i2c breakout that I'm using - https://itbrainpower.net/sensors/BME688

    8 REPLIES 8

    I did that, giving me this error on ESP32 Wemos Lolin: In file included from C:\Users\d_rad\Documents\Arduino\libraries\Bosch-BSEC2-Library-master\examples\generic_examples\basic\basic.ino:21:
    C:\Users\d_rad\Documents\Arduino\libraries\Bosch-BSEC2-Library-master\src/bsec2.h:50:10: fatal error: bme68xLibrary.h: No such file or directory
    #include "bme68xLibrary.h"
    ^~~~~~~~~~~~~~~~~
    compilation terminated.
    exit status 1
    Error compiling for board WEMOS LOLIN32. 

    Thb I don't know from where to take it atm, I'm using the library from bme680 and its working ok till now. Not worth to keep trying with bsecv2. But thank you all for replies and help.

    Update: Not sure what I've done yestarday night but the bsecv2 library is working on my esp32 now. But I have another small problem, the output of the sensor, acording to the library, is a string corresponding to cases, like: BSEC_OUTPUT_RAW_TEMPERATURE, BSEC_OUTPUT_RAW_PRESSURE. But I need to convert that to something so I can publish it over mqtt. I did this but nothing is publishing...Have to say the sensor print the correct values on serial but I guess there is something in my conversion to char that breaks or lose the data.

    Spoiler

    void newDataCallback(const bme68xData data, const bsecOutputs outputs, Bsec2 bsec) {

    if (!outputs.nOutputs) {
    return;
    }
    for (uint8_t i = 0; i < outputs.nOutputs; i++) {
    const bsecData output = outputs.output[i];
    switch (output.sensor_id) {
    case BSEC_OUTPUT_RAW_TEMPERATURE: {
    String test = String(output.signal);
    char buff[10];
    test.toCharArray(buff, 10);
    client.publish("feedback/growTemp", buff);
    }
    break;
    // case BSEC_OUTPUT_RAW_PRESSURE:
    // client.publish("feedback/growPress", String(output.signal).c_str());
    // break;
    // case BSEC_OUTPUT_RAW_HUMIDITY:
    // client.publish("feedback/growHum", String(output.signal).c_str());
    // break;
    // case BSEC_OUTPUT_RAW_GAS:
    // client.publish("feedback/growGas", String(output.signal).c_str());
    // break;
    }
    newData = false;
    }
    }

    Update 2: I made it 😄

    Still don't know 100% how but adding void checkBsecStatus(Bsec2 bsec) from the basic example made everthing work as it should, I have the readings send over MQTT an everything seems good. Hope it will stay this way. Thank everyone again for the info and the help.

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Radu,

    You could download BSEC2 package from here: https://www.bosch-sensortec.com/software-tools/software/bme688-software/
    And compile BSEC example in this package.

    You can write program based on the output of BSEC algorithm and convert it into the format you need.

    Yep, everything is working good now. One more thing: did the sensor is purposely calibrated to show around 10% less on humidity? I had this problem the first time withthe library from bme680, reached around 95% humidity in my grow room because of that, automation was set at 80% with 5% tolerance, but due to this sensor reading with 10% less when humidifier stopped at 85% in realty there was around 95% humidity. Got into the room and everything was foggy, good that nothing had broken or worse. I'm experiencing the same thing with this bsec2 library, atm humidity is at around 69%, the real one, sensor is reading 58.1%. Also the temperature is a bit offset as well, but that I saw on almost every bme sensor I've worked with, it's 1 degree( Celsius) higher( experienced this with bme280, bmp280 and now with this bme688). So my question is why those drifts or factory calibrated are in place? For what? Sensor protection or is just because of the factory calibration process?
    I know I'm not the only one as I saw more people online speaking about those.

    For the temperature I have 2 computherm wireless control system, that both are showing 20.9°C, an DHT22 with 20.5°C. On bosch part I have BME280 with 23.1°C( this is in my control box where I have my automation, close to an esp32 so showing higher temperatures is ok for this on, the box is cooled by 2 fans), BMP280 with 22.9°C( in another box, so higher temperatures are ok for this one as well) and the BME688 that's outside any box, in my grow room, that's showing 22.1°C atm.

    For the humidity I have an analog humidity and temperature meter that I've calibrated with a calibration bag( got this from amazon) and it's showing 69%, BME688 is showing 59.5% atm.

    So there are some differences here, I can offset them with some filters in my automation but I'm curious if there is a reason why some of bosch sensors don't show the real thing. I've also tested the temperature compensated humidity, from bsec2 generic code, but there is only a 2-4% higher humidity reading.

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Radu,

    BSEC integrated temperatures, humidity compensation algorithm. If you read sensor data from BSEC output, the data was compensated.

    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