Jump to content
  • 0

Temperature measurement from Pmod Nav barometer chip.


rmac

Question

I am trying to read the temperature from the barometer (LPS25HB) on the Pmod Nav board.  Per the data sheet this is in a two byte register (L=2B, H=2C).  I can read the data, which is supposed to be in 2's complement format.  Typical readings at room temperature are: H = 11011001, L=10111011.  In 2's complement format this temperature is negative.  Room temperature is not negative in any units I am familiar with.  I assume the units are degrees C.  What do I do with this data to calculate the temperature?

By the way, the barometric pressure reading works fine.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @rmac, welcome to the forums.

The temperature counts need to have an offset and scale applied. Please review this technical note for the LPS25HB part describing how to convert from sensor counts to pressure and temperature in hPa and degrees C: https://www.st.com/resource/en/technical_note/tn1228-how-to-interpret-pressure-and-temperature-readings-in-the-lps25hb-pressure-sensor-stmicroelectronics.pdf.

Thanks,

Arthur

Link to comment
Share on other sites

  • 0

Thanks Arthur:

The 42.5 degree offset was the part I was missing.  The data sheet for the LPS25HB gave the 480 count/degree scaling factor but no mention of an offset.  All is good now.

Thanks for your quick response.

Richard

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...