Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME280 and BME680 humidity accuracy

    BME280 and BME680 humidity accuracy

    Ochrin
    Member

    Hello,

    I have a design where I can plug either BME280 or BME680. I am using BME280 driver version 3.4.2 and BSEC driver (full one not lite) version 3.5.10 for BME680 driver and version 1.4.7.4 for BSEC. Software is running on ESP8266. I am using float calculation for both.

    I am seeing differences in humidity measured by BME280 and BME680 (and temperature also)

    I have tested different devices and here what I see:

    Same board, same place, same time, just replaced the sensor:

    DevicesHumidityTemp
    BME280 dev159.7%25.9
    BME680 dev174,5%22.8
    BME680 dev2

    73,4%

    22.9

    Two different boards, same place, same time:

    DevicesHumidityTemp
    BME280 dev254,6%24,0
    BME680 dev372,3%19.9

     

    Could it be that the humidity offset is linked to the temperature offset? And if not what could be the cause of this offset

    Normally I am adding an offset to temperature after measurement so that sensors indicate right and same temperature. But I just realize that there is an offset between these 2 type of devices for temperature.

    Pressure measurement are almost identical between type of devices.

    I have also tried integer calculation (both 32b and 64b)  on BME280 but the measurements where the same as when using float.

    Any idea where I could look for?

    Thanks.

    NB: I don't have a reference for humidity so I don't know which sensor is right, even I would think that BME680 is closer to real value.

     

    7 REPLIES 7

    In the end I found this page http://bmcnoldy.rsmas.miami.edu/Humidity.html

    So my method is given the temp and humidity returned by the sensor, to calculate the dewpoint, then add my correction offset to the temperature and then from this new temp and the dewpoint calculate the new humidity.

    static double compensate_temp(double t_mes, double t_comp, double rh) {
    	double new_rh, td;
    
    	// Calculate Td
    	td = 243.04 * ( log(rh/100) + (17.625*t_mes)/(243.04+t_mes) );
    	td /= 17.625- log(rh/100) - (17.625*t_mes)/(243.04+t_mes);
    
    	// Calculate new RH
    	new_rh = 100 * exp((17.625*td) / (243.04+td)) / exp((17.625*t_comp)/(243.04+t_comp));
    
    	return new_rh;
    }

    Something like this above.

    On wiki, you can find some equivalent formula but with different coeff.

    Hope my method is valid...

     

    handytech
    Community Moderator
    Community Moderator

    This method looks valid 🙂 Alternatively since td is considered locally constant at t_mes and t_comp, one could further reduce the equation down to rh_comp=f(t_mes, rh_mes, t_comp), e.g.:

    rh_comp = rh_mes * exp(243.12 * 17.62 * (t_mes - t_comp) / (243.12 + t_mes) / (243.12 + t_comp))

     

    Hi - I am struggeling like others with the BME280 used in outdoor. Even protected in a box the humidity seems to increase and settle at 100% once ambient temperature goes down.

    I am using official libaries. #include <Adafruit_Sensor.h> & #include <Adafruit_BME280.h> and the reading is: bme.readHumidity()

    Now I assume it could be:  a) needed protection of the sensor itself against humidity at dewpoints (other communities suggest to wrap PTFE around the BME280

    or  b) dewpoint compensation, if that is the flaw.

    For the point b) you had an exachange here  on an compensation, which I do really please let me understand where to put this squence of code in and Arduino project. And how to get t_comp? I assume t_mes = measured temperature by BME280. rh_mes = measured. Could you help me out, evtl. with a ready-made code to use?

    Thank you very much indeed,

    Manfred

    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