user670: I found similar type of code in many sites for coverting analog signal lm35 to centigrade.
But i can't understand that fully. So I need some help what this equation means
tempC = (5.0 * tempC * 100.0)/1024.0;

Thank you,

user2778: I took a quick look at the data sheet for LM35 and it says that each centigrade means a 10 millivolt change.
If you have an ADC with 10-bit resolution, it means you have 1024 steps from 0 V to 5 V.
The temperature is then:
tempC = 5 * (ADCdata / 1024) * 100
This is equal to your equation. So it seems to be correct.
EDIT:
A more thorough explanation of the formula:
Lets call the value you read from your LM35 "ADCdata". The range of this value is determined by the resolution of the Analog-to-Digital Converter (ADC). The ADC converts a voltage to a digital value in the Arduino. This value is again what I refer to here as "ADCdata".
If the ADC resolution is 10-bits, it means the 5 volt input can be divided into 1024 equal levels. One level is about 5 millivolts (five thousands of a volt).
To find what value "ADCdata" is in volts we need to divide it with the resolution (1024) and multiply with 5 volts.
Lets say we have a 2.5 volt input signal. The ADCdata will then be 512. If we now divide 512 by 1024 we get 0.5. Lets multiply that with 5 volts and we get 2.5 volts!
We know from the data sheet that 10 millivolts equals 1 centigrade. Since we have our value in volts (2.5 V, which is the same as 2500 millivolts) we need to multiply it with 100 to get centigrades.

670: <p>I found similar type of code in many sites for coverting analog signal lm35 to centigrade.
But i can't understand that fully. So I need some help what this equation means</p>

<pre><code>tempC = (5.0 * tempC * 100.0)/1024.0;
</code></pre>

<p>Thank you,</p>
 2778: <p>I took a quick look at the data sheet for <a href="http://www.ti.com/lit/ds/symlink/lm35.pdf" rel="nofollow">LM35</a> and it says that each centigrade means a 10 millivolt change.</p>

<p>If you have an ADC with 10-bit resolution, it means you have 1024 steps from 0 V to 5 V.</p>

<p>The temperature is then:</p>

<p>tempC = 5 * (ADCdata / 1024) * 100</p>

<p>This is equal to your equation. So it seems to be correct.</p>

<p><strong>EDIT:</strong></p>

<p>A more thorough explanation of the formula:</p>

<p>Lets call the value you read from your LM35 "ADCdata". The range of this value is determined by the resolution of the Analog-to-Digital Converter (ADC). The ADC converts a voltage to a digital value in the Arduino. This value is again what I refer to here as "ADCdata".</p>

<p>If the ADC resolution is 10-bits, it means the 5 volt input can be divided into 1024 equal levels. One level is about 5 millivolts (five thousands of a volt).</p>

<p>To find what value "ADCdata" is in volts we need to divide it with the resolution (1024) and multiply with 5 volts.</p>

<p>Lets say we have a 2.5 volt input signal. The ADCdata will then be 512. If we now divide 512 by 1024 we get 0.5. Lets multiply that with 5 volts and we get 2.5 volts!</p>

<p>We know from the data sheet that 10 millivolts equals 1 centigrade. Since we have our value in volts (2.5 V, which is the same as 2500 millivolts) we need to multiply it with 100 to get centigrades.</p>
