2019-10-03 09:04 AM
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
Solved! Go to Solution.
2019-10-04 03:16 AM
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
2019-10-04 02:56 AM
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
2019-10-04 03:07 AM
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
2019-10-04 03:16 AM
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
2019-10-04 03:24 AM
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?
2019-10-04 03:26 AM
Hi,
forget the previous message...now I really got!!!
BR,
Giorgio