Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BME680 strange behaviour on humidity and gas sensing

    BME680 strange behaviour on humidity and gas sensing

    Hi everyone! 

    I am testing the BME680 sensor on a Adafruit Breakout board since few days now. I am using a STM32L073 Cortex M0+ processor, and i am still trying the iot examle BSEC code.  I didn't change anything in the code, just added the parts necessary for the integration. The initialization doesn't return any error. First of all i activated the sensor for around 40 minutes, then reseted it and activated another time for maybe 1 hour. Values are always quite strange: first of all iaq accuracy is always 0, (it can't be caused by a timing violation because when i debug it this error doesn't occur) i red that there is an activation time after that it should change (5 minutes in Low Power Mode that i am using) but this value never changes. (i don't know if i have to wait the "Burn In" Period to see changes in the iaq accuracy). But the most strange value is the RHumidity value, it is aways 100 or quite close (99.84 ecc...) that is absurd, i am also using an SHT31 from sensirion that reads normal value between 30/40 %. In debug mode i saw that the data obtained by the i2c trasmission seems to be actually 100 or similar, so it is not a software problem. Temperature and Pressure seem accurate. Here i show you some of the values recived:

    Temperature: (23.64439) C, RHumidity:(100.0)
    IAQ: (0) accuracy:(0), Pressure:(100213)
    C02eq: (0.0) , BVocsEq:(0.0)
    Temperature: (23.64439) C, RHumidity:(100.0)
    IAQ: (0) accuracy:(0), Pressure:(100212)
    C02eq: (0.0) , BVocsEq:(0.0)
    Temperature: (23.64439) C, RHumidity:(100.0)
    IAQ: (0) accuracy:(0), Pressure:(100213)
    C02eq: (0.0) , BVocsEq:(0.0)
    Temperature: (23.64439) C, RHumidity:(100.0)
    IAQ: (0) accuracy:(0), Pressure:(100212)
    C02eq: (0.0) , BVocsEq:(0.0)
    Temperature: (23.64439) C, RHumidity:(100.0)
    IAQ: (0) accuracy:(0), Pressure:(100213)
    C02eq: (0.0) , BVocsEq:(0.0)

    Temperature: (23.3396) C, RHumidity:(100.0)
    IAQ: (0) accuracy:(0), Pressure:(100241)
    C02eq: (0.0) , BVocsEq:(0.0)
    Temperature: (23.3396) C, RHumidity:(100.0)
    IAQ: (0) accuracy:(0), Pressure:(100245)
    C02eq: (0.0) , BVocsEq:(0.0)
    Temperature: (23.37862) C, RHumidity:(100.0)
    IAQ: (0) accuracy:(0), Pressure:(100245)
    C02eq: (0.0) , BVocsEq:(0.0)
    Temperature: (23.37862) C, RHumidity:(100.0)
    IAQ: (0) accuracy:(0), Pressure:(100245)
    C02eq: (0.0) , BVocsEq:(0.0)
    Temperature: (23.3396) C, RHumidity:(100.0)
    IAQ: (0) accuracy:(0), Pressure:(100245)
    C02eq: (0.0) , BVocsEq:(0.0)

    From one side temperature and pressure are correct values, from the other side RH and gas are strange, I don't know how to solve this behaviour. Did anyone noticed something similar or has an idea about what is going on? Is it possible the problem is caused by bad soldering that dameged the component or similar reasons? 

    Thank you for the help! 

    6 REPLIES 6

    micha_pr
    Established Member

    Hi,

    can you add to output the other values - so that we could see all?

    Something like print out the "output":

        output = String(time_trigger);
        output += ", " + String(iaqSensor.rawTemperature);
        output += ", " + String(iaqSensor.pressure);
        output += ", " + String(iaqSensor.rawHumidity);
        output += ", " + String(iaqSensor.gasResistance);
        output += ", " + String(iaqSensor.iaqEstimate);
        output += ", " + String(iaqSensor.iaqAccuracy);
        output += ", " + String(iaqSensor.temperature);
        output += ", " + String(iaqSensor.humidity);
        output += ", " + String(iaqSensor.staticIaq);
        output += ", " + String(iaqSensor.co2Equivalent);
        output += ", " + String(iaqSensor.breathVocEquivalent);

    Not only start values, but also after 15 minutes, 30 minutes,....

    Michael

    Hi, thank you for your help!

    Here i paste some values coming from the sensor (just what the output ready function gives to me)

    these are the first three measuraments:

    IAQ accuracy: (0)

    Temperature: (22.665) C, RHumidity: (100.0)

    Raw Temperature: (22.665) C,Raw RHumidity: (100.0)

    IAQ: (0), Pressure: (100215)

    C02eq: (0.0) , BVocsEq: (0.0)

    Static IAQ: (0.0) , BSEC status: (0)

     

    IAQ accuracy: (0)

    Temperature: (22.35131) C, RHumidity: (99.21053)

    Raw Temperature: (22.35131) C,Raw RHumidity: (100.0)

    IAQ: (0), Pressure: (100217)

    C02eq: (0.0) , BVocsEq: (0.0)

    Static IAQ: (0.0) , BSEC status: (0)

     

    IAQ accuracy: (0)

    Temperature: (22.35131) C, RHumidity: (99.56683)

    Raw Temperature: (22.35131) C,Raw RHumidity: (100.0)

    IAQ: (0), Pressure: (100221)

    C02eq: (0.0) , BVocsEq: (0.0)

    Static IAQ: (0.0) , BSEC status: (0)

     

    These are after 20 minutes:

    IAQ accuracy: (0)

    Temperature: (22.35131) C, RHumidity: (99.32422)

    Raw Temperature: (22.35131) C,Raw RHumidity: (100.0)

    IAQ: (0), Pressure: (100210)

    C02eq: (0.0) , BVocsEq: (0.0)

    Static IAQ: (0.0) , BSEC status: (0)

     

    IAQ accuracy: (0)

    Temperature: (22.35131) C, RHumidity: (99.23802)

    Raw Temperature: (22.35131) C,Raw RHumidity: (100.0)

    IAQ: (0), Pressure: (100212)

    C02eq: (0.0) , BVocsEq: (0.0)

    Static IAQ: (0.0) , BSEC status: (0)

     

    IAQ accuracy: (0)

    Temperature: (22.665) C, RHumidity: (100.0)

    Raw Temperature: (22.665) C,Raw RHumidity: (100.0)

    IAQ: (0), Pressure: (100212)

    C02eq: (0.0) , BVocsEq: (0.0)

    Static IAQ: (0.0) , BSEC status: (0)

     

    These are after 40 minutes:

    IAQ accuracy: (0)

    Temperature: (23.6793) C, RHumidity: (100.0)

    Raw Temperature: (23.6793) C,Raw RHumidity: (100.0)

    IAQ: (0), Pressure: (100194)

    C02eq: (0.0) , BVocsEq: (0.0)

    Static IAQ: (0.0) , BSEC status: (0)

     

    IAQ accuracy: (0)

    Temperature: (23.41240) C, RHumidity: (99.20443)

    Raw Temperature: (23.41240) C,Raw RHumidity: (100.0)

    IAQ: (0), Pressure: (100194)

    C02eq: (0.0) , BVocsEq: (0.0)

    Static IAQ: (0.0) , BSEC status: (0)

     

    IAQ accuracy: (0)

    Temperature: (23.41240) C, RHumidity: (99.42264)

    Raw Temperature: (23.41240) C,Raw RHumidity: (100.0)

    IAQ: (0), Pressure: (100192)

    C02eq: (0.0) , BVocsEq: (0.0)

    Static IAQ: (0.0) , BSEC status: (0)

     

    They are all pretty similar (also the samples between these ones are the same). I checked what comes from the sensor and for humidity it gives always 2 bytes: 0x80,0x00  (that corresponds to the value 100) so i can' t undertand the oscillations of the humidity parameter (if you notice it goes from 99.5 to 100) than should be fixed to 100 (that isn' t correct anyway). 

    I checked the behavior of the sensor with a raspberry pi and i received correct values so the problem is not the sensor but the code. I modified just the part for the integration of the code and i am pretty sure it works because temperature and pressure are correct values. So i can't understand where is the problem,  i also checked for stack overflow or something similar but that does't occur. Actually i have no idea.

    I integrated all the files in BSEC downlod folder in Lite Version, the only files i did't used are the file in the Config Folder, can be this one the problem? and in case how should i integrate them?

    Thanks for your help! Have a nice day!

    If you are using the BSEC Lite version, state and configuration features are not available, therefore this is not related.

    Based on your feedback that "humidity gives always 2 bytes: 0x80,0x00" it would seem that the sensor may have not properly been configured. In particular, 0x8000 could be the default register output returned when the sensor's measurement was skipped (i.e. oversampling value set to zero, as described in chapter 5.3.2 of BME680's datasheet). Some of the other outputs also show unexpected outputs.

    Are you using the available example code from BSEC's package? If not, sharing more details about your code/implementation could help us better this behavior.

    Hello dear All,

    I have a similar problem as LeonardoPapale.

    • I use the with STM32L071RBT
    • I use it in C
    • The sensor is good, I tested it with RPI
    • I use the bsec library
    • bsec_iot_init(BSEC_SAMPLE_RATE_LP, 0.0f, bus_write, bus_read, sleep, state_load, config_load) runs successful
    • the read and write functions work well.
    • in inside bsec_iot_loop(sleep, get_timestamp_us, output_ready, state_save, 10000) I leaved everything as it was.
    • But the sensor responses 100% humidity, and  a lot of 0 values
    • like this: (screenshot from a terminal):


    log.png

     

     

     

     

     

     

     

     

    Is it possible the example driver does not initialize the sensor?

    If yes, where should I do it?

    Thanks for your reply!
    Adam

    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