Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    Interpreting, converting BME280 Data

    Interpreting, converting BME280 Data

    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?


    2 REPLIES 2

    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.

    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.