cancel
Showing results for 
Search instead for 
Did you mean: 

LSM9DS1 Temperature

Giorgio Cancelli
Associate II

HI,

I've problems on the temperature detected by the LSM9DS1. I used the "Unico" software to configure the Acc/Gyro and the Magnetometer, in particular I used the "Easy configuration button".

I read the temperature (Unico page Acc/Gyro Registers) from registers OUT_TEMP_L/OUT_TEMP_L and the values are:

OUT_TEMP_L: around 3-7 (in hex)

OUT_TEMP_H: always zero (it's ok)

I'm in office and at the moment the temperature is around 24°C. Is something I'm missing?

Thanks,

Giorgio

1 ACCEPTED SOLUTION

Accepted Solutions

In this case the ​OUT_TEMP_H + OUT_TEMP_L is a negative value, because the value must be read in two's complement. So FFD0h is -48 decimal, and /16 means -3°C. In your room (or outside, maybe not here in Milan...) you should have around 25-3=22°C. Regards

View solution in original post

5 REPLIES 5
Eleon BORLINI
ST Employee

Ciao Giorgio, consider that the 0 output of the temperature registers is at 25°C, and that sensitivity is 16 LSB/°C (so basically only the 12 MSbit of OUT_TEMP_H + OUT_TEMP_L are significant), p16 of the datasheet. In your case the output is 03h-07h, so basically 25°C. Not the top accuracy this temperature sensor indeed, but you can check heating it with your finger if temperature is changing. Please refer to these drivers.

float_t lsm9ds1_from_lsb_to_celsius(int16_t lsb)
{
  return (((float_t)lsb / 16.0f) + 25.0f);
}

Regards

Giorgio Cancelli
Associate II

Ciao Eleon,

thank you very much! Really appreciated.

I'm experiencing another kind of problem at the moment. Same steps I mentioned above but the temperature registers are now:

OUT_TEMP_L: 0xD0

OUT_TEMP_H: always 0xFF

It seems the device is not configured but I've done the same operations I mentioned.

BR,

Giorgio

In this case the ​OUT_TEMP_H + OUT_TEMP_L is a negative value, because the value must be read in two's complement. So FFD0h is -48 decimal, and /16 means -3°C. In your room (or outside, maybe not here in Milan...) you should have around 25-3=22°C. Regards

Giorgio Cancelli
Associate II

You're right and I understood your explanations. The point is that the sensor (EVAL BOARD) is in office as when it was detecting 25°C.

I configured the sensor with Unico as all other times.

Any clue?

Giorgio Cancelli
Associate II

Hi,

forget the previous message...now I really got!!!

BR,

Giorgio