Skip to main content
AFars.1
Associate
Jan 27, 2021 8:24 PM UTC
Solved

Temperature offset in LSM6DSRX's Temperature sensor

I'm using the temperature sensor in LSM6DSRX.

In page 12 (4.3 Temperature sensor characteristics) of the Datasheet (see the image), what is "Toff" (Temperature Offset)?

The Table 4 gives a range of -15 to +15 C for Toff, what is this range for? The Table also gives the operating range of -40 to +85 C.

I was wondering how to use "Toff" in calculating the temperature ?

Thanks for any help!

0693W000007Cwx3QAC.png

    This topic has been closed for replies.
    Eleon BORLINI
    Eleon BORLINIBest answer
    ST Employee
    Jan 29, 2021 2:39 PM UTC

    Hi @AFars.1​ ,

    the values declared in the datasheet refers to the maximum and minimum value for the offset at 25°C of the internal sensor. The typical value is however close to 0 (i.e., the T sensor effectively measure 25°C at true 25°C), and the range limits have a lot of margin.

    For temperature measures that require deep accuracy, I suggest you to compare the value with the one of a reference temperature sensor at true 25°C and store the offset via software for real-time or post processing compensation.

    For completeness, please consider the below formula for the temperature raw value conversion (source Github lsm6dsrx_reg.c:(

    float_t lsm6dsrx_from_lsb_to_celsius(int16_t lsb)
    {
     return (((float_t)lsb / 256.0f) + 25.0f);
    }

    In case this answer helped you, please select this as "best".

    -Eleon

    2 replies

    Eleon BORLINI
    Eleon BORLINIBest answer
    ST Employee
    Jan 29, 2021 2:39 PM UTC

    Hi @AFars.1​ ,

    the values declared in the datasheet refers to the maximum and minimum value for the offset at 25°C of the internal sensor. The typical value is however close to 0 (i.e., the T sensor effectively measure 25°C at true 25°C), and the range limits have a lot of margin.

    For temperature measures that require deep accuracy, I suggest you to compare the value with the one of a reference temperature sensor at true 25°C and store the offset via software for real-time or post processing compensation.

    For completeness, please consider the below formula for the temperature raw value conversion (source Github lsm6dsrx_reg.c:(

    float_t lsm6dsrx_from_lsb_to_celsius(int16_t lsb)
    {
     return (((float_t)lsb / 256.0f) + 25.0f);
    }

    In case this answer helped you, please select this as "best".

    -Eleon

    AFars.1
    AFars.1Author
    Associate
    Jan 29, 2021 5:58 PM UTC

    Thank you, Eleon!

    Abi