Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME280 relative altitude not stable

    Myzhar
    Established Member

    BME280 relative altitude not stable

    Hi all,
    I'm using a BME280 sensor to estimate the realtive altitude of an object, but the results are not really stable.

    This is the formula I use:

     

    float heightOutput_mm = (44330.77f * 1000.0f) * (1.f - pow((p1 / p0), 0.190294957f));

     

    Where:

    • p1 -> current pressure
    • p2 -> reference pressure taken at ground level

    The problem is that keeping the object STATIC at ground level I get a very highly changing relative altitude in the range [-0.5,+0.5] m

    The sensor is configured in as suggested in the datasheet for INDOOR NAVIGATION:

     

    	bme280_dev.settings.osr_h = BME280_OVERSAMPLING_1X;
    	bme280_dev.settings.osr_p = BME280_OVERSAMPLING_16X;
    	bme280_dev.settings.osr_t = BME280_OVERSAMPLING_2X;
    	bme280_dev.settings.filter = BME280_FILTER_COEFF_16;
    	bme280_dev.settings.standby_time = BME280_STANDBY_TIME_0_5_MS;

     


    Any suggestion to inprove the stability of the readings?

    Thank you
    Walter
     

    4 REPLIES 4
    shellywang
    Occasional Contributor

    Re: BME280 relative altitude not stable

    The relative accuracy for the pressure part of the BME280 is 12pa -> 96cm. The highly changing relative altitude in the range [-0.5,+0.5] m is acceptable.

    Could you please provide the ground truth and the height value you measured?

    Myzhar
    Established Member

    Re: BME280 relative altitude not stable

    My ground truth is "zero" since I'm not measuring the altitude relatively to the sea level, but to the first value I get from the barometer (the sensor is steady).

    This is the formula that I use to estimate the relative altitude:

     

    float rel_height_m = ((pow((p0 / p1), 1.f/5.257f) - 1.f) * (temp + 273.15f)) / 0.0065f;

     

    where:

    • p0: reference pressure
    • p1: current pressure
    • temp: current sensor temperature

    Attached a 30' plot of the relative altitude

    o_o
    Contributor

    Re: BME280 relative altitude not stable

    Hi Myzhar,

    Your plot suggests a testing time of of 30 minutes. Without a reference sensor, there is no way to real real pressure change (Building ventilation, doors/windows opening, weather, etc.) with sensor drift.

    Do you have access to a reference pressure sensor?

    o_o
    Myzhar
    Established Member

    Re: BME280 relative altitude not stable

    I have not a pressure reference sensor... I search for one. Any suggestion?

    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