Skip to content

Temperature #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wallarug opened this issue Jan 5, 2020 · 3 comments
Closed

Temperature #3

wallarug opened this issue Jan 5, 2020 · 3 comments
Assignees

Comments

@wallarug
Copy link

wallarug commented Jan 5, 2020

I believe the temperature formula should be:

Option for MPU6050

temp = (raw_temperature / 340.0) + 36.53

or Option for MPU6500

temp = (raw_temperature / 333.87) + 21.0

Rather than exiting formula:

temp = (raw_temperature + 12412.0) / 340.0

This is based on the code available here.

I still question if the MPU6050 values are correct. I get approximately 48 degrees C with the IMU sitting on my desk (I am using an MPU6500 which should have the same registers). The ambient temperature is about 20 degrees C.

@wallarug
Copy link
Author

wallarug commented Jan 5, 2020

UPDATE based on datasheet for MPU6050 (Page 30):

Temperature in degrees C = (TEMP_OUT Register Value as a signed quantity)/340 + 36.53

And FYI for MPU6500 (different chip, Page 33):
TEMP_degC = ((TEMP_OUT – RoomTemp_Offset)/Temp_Sensitivity) + 21degC

@FoamyGuy
Copy link
Contributor

I've got a sensor on the way. I'm going to work on this once it arrives.

@FoamyGuy
Copy link
Contributor

FoamyGuy commented Feb 5, 2020

This change was merged in. Thank you wallarug.

@FoamyGuy FoamyGuy closed this as completed Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants