Wow! Arduino is fabulous!! I've been wanting this kind of environment for years. Great fun. Great platform. Huge thanks!!!
First project: Read LM335, display temp, max temp, min temp. Status: With the help of other posted projects, got it working. Nice.
Background: I am not clear about the temperature calculation in an example. It appears to produce valid readings, but I want to understand the general case so the experience can be applied to my subsequent projects.
VOLTAGE = 5.0, Vcc for the Arduino board
INPUT_PIN = 0, the Arduino pin attached to the LM335 ADJ pin temp is a value in Celsius
I don't understand the formula and don't find very good explanations. I've read the LM335 datasheet, and searched the web for quality references and coaching
Questions:
Why subtract 273.15? C = Kelvin - 373, right? Why not subtract 373?
Why divide by 1024.0?
Why the 100 term?
I believe this math is necessary because the analog read feature of the Atmega328 (Duemilinove) which converts the analog voltage reading to one of 1024 values. True?
Has the formula been simplified, so some of the factors are obscured? Would be nice to have the entire formula, for clarity.
Derive a Celsius value from the LM335 voltage: C = (V / 0.10) - 373
V is the LM335 voltage. It is produced in 10 mv steps.