Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    Are there a default, identity values for the calibration data of the BME280

    Are there a default, identity values for the calibration data of the BME280

    New Poster

    Hi there,


    I am in the process of creating a software version of the BME280 and one thing I cannot find is how to 
    program the calibration data such that I can simply use raw values that would be equal to the compensated values

    For example if I have a raw temperature (16.4 format) with the value 0x3FFF0 then have a value that reads something like 84.99 celsius 

    Alternatively, is there a way to invert the formulas such that if I start with a temperature I can compute the raw value? 

    11 REPLIES 11

    Hi @BSTRobin,

    Thanks for your reply. 

    However I think there's still a misunderstanding about what I am trying to do so I'll try again.
    I've written a piece of software that communicates over SPI with Arduino where the Bosch Sensortec library is used to read sensor data.
    The arduino side of things reads the calibration data (as recommended in the documentation), sets the sensor mode to normal and starts
    reading sensor data.

    Since the data is used on the arduino side feed into the compensation methods of the BStec libraries I wanted to know what data
    I can provide in the calibration data such that when the sensor data is read and the software is reporting something like 0x789AB (20 bits in 16.4 format)
    the resulting value would be something that represents the top of the range of the temperature sensor, resulting in something like 75.12 *C.

    To be clear I am not trying to reimplement the hardware, rather allow users to add this component to a simulator like Tinkercad for whatever project they are building.

    I hope this helps clarify my query.







    Hi @BSTRobin

    Any help possible here?

    @BSTRobin, @FAE_CA1

    Can one of you please tell me if what I'm trying to do is possible?



    Community Moderator
    Community Moderator

    Hi bonnyr,

    The temperature data obtained from the BME280 sensor API can be considered as raw data, and then you can perform the format conversion you need.

    Hi @BSTRobin 


    I am not sure why we are going in circles...

    I am trying to produce these raw values so that a user software, using the BST library can read these over SPI and coupled with the coefficients, get the compensated values

    So for example, what should I put in the 24bit of the temperature registers so that when a client reads that they can convert to a real temperature?


    So if I wanted to generate the raw values for:

    Temperature.        Register Values (FA, FB, FC)
    20*C ? ? ?
    25*C ? ? ?
    -15*C ? ? ?
    -2.5C ? ? ?

    I know you'd say these depend on the coefficients, but given a set of coefficients what are the register values for the above temperatures?

    Alternatively, is there a way to program the coefficients for test purposes so that they simply are ignored (identity)?

    for example, if I used 0x1000 with those coefficients, the resulting temperature would be 40.96*C?