Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    Interpreting, converting BME280 Data

    Interpreting, converting BME280 Data

    kamendo
    Occasional Visitor

    Hi all. I have a bunch of pressure/humidity/temperature data produced by the BME280 which were stored in essentially a text file as integers, but I have no clue how to convert these into standard units. The data sheet for the BME280 is not so clear on how to do this. The goal would be to write a script in i.e. Python to convert these. An example from the data log is:

    BME280 pressure:989571 humidity:44 temperature:1458

    ...

    BME280 pressure:989659 humidity:43 temperature:1498

    What exactly do these numbers represent, and how do I correctly convert them to standard units? Has the data been stored properly to do this?

    Thanks.

    2 REPLIES 2

    handytech
    Community Moderator
    Community Moderator

    Could you please provide a little more background about what data has been logged already?

    From the register map of BME280, you only read ADC outputs from the temperature, pressure and humidity sensors. To convert these values into units such as °C, %RH or Pa, it is mandatory to use some compensation formulas.

    Therefore, I could see two possibilites:

    • If the the compensation formulas were implemented in your MCU or device already, then you should be aware of the output units already. When using our recommended sensor API, you can refer to the chapter about sensor data units based on the compensation variant used.
    • If only ADC values were logged, then you would also need to extract the trimming parameters that are unique for each sensor. That way you could run the compensation formula in your script.

    billm9212
    New Poster

    The pressure is in units of Pascal (Pa), and the temperature is 100.0*C, so a reading of 1423 represents 14.23 C.  I can't speak to the humidy as I am not using it.  How did you manage to get a valid reading of the pressure.  I am having difficulty getting that result using their 32-bit integer alogorithms outlined in the SDK &/or datasheet.  My temp readings are as expected.

    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