MPU-9250 Temperature Readings

By wilkins , 23 December 2015

I'm trying to understand how to use registers 65 and 66 (temperature measurement) with the MPU-9250. The register map shows that there exist a high and low byte. Shifting the high byte up and oring with the low byte seems to provide a reasonable value for TEMP_OUT. In one real reading this yields 2311. Using this value and the offset and sensitivity from another part (-521 & 340) gives a value of 29.3294...˚C using the equation TEMP_degC = ((TEMP_OUT – RoomTemp_Offset)/Temp_Sensitivity) + 21degC. Using the function in inv_mpu.c (from Motion Driver 6.12) called mpu_get_temperature returns a value of 2839636. This function says that this number is 'q16 format'. Qm.n format missing the 'm' implies 0 or 1 bits for the integer portion which means the temperature can never be as high as 2˚C leaves me not believing this. To hit the specified temperature range it would have to be Q8.8 format. Neither the example code or the given formula deal with this.

What are the correct offset and sensitivity for the MPU-9250?
What format is the number read from the registers (TEMP_OUT)?

I cooled the IC enough to get a high MSB (negative temperature?), but neither formula returns a reasonable value for the temperature in degrees C.
Should the temperature sensor work down to the rated -40ËšC?

The most relevant thread I could find doesn't have any firm answers. Thanks for any help.

- Brent

phpbb Topic ID
32260