10 years, 11 months ago.

tmp36/lm61 with mbed

hi ,

can anyone explain to me , tempC = ((LM61*3.3)-0.500)*100.0; , why do we need to type this conversion to get the data . why must i multiply by 3.3 then -0.5 ?

and also the conversion for analog data to Fahrenheit tempF = (9.0*tempC)/5.0 + 32.0;

2 Answers

10 years, 11 months ago.

Which device are you talking about? They're different, and will require different conversion constants.

From the LM61 data sheet:

Quote:

The nominal output voltage of the LM61 ranges from +300 mV to +1600 mV for a −30°C to +100°C temperature range.

So you have 1300mV for a 130°C temperature range, or 10mV/°C. And at 0°C it has a 600mV output.

From the TMP36 data sheet:

Quote:

10 mV/°C scale factor

...

The TMP36 is specified from −40°C to +125°C, provides a 750 mV output at 25°C

So at 0°C it has a 500mV output. Which your conversion is using, so it's set for the TMP36. If you have a LM61, you would use 0.6 instead of 0.5.

If your analog input reads 1.0 for 3.3v, then to convert to voltage you would multiply by 3.3.

Of course you can simplify these conversions using your high school algebra.

10 years, 11 months ago.

ohhhh im using tmp36 . haha thanks for your explanation .