Currently I'm working with a MSP-EXP430F5529LP microcontroller and a LM35, because I need to built a thermometer. The results will show on a seven segment, 4 digit display. I'm using the following conversion, in order to show the temperature in Celsius:
voltage = (conversion * 3.3)/ 4095;
celsius = (((voltage - 0.5) * 100) / 10);
Problem is the reading of my own thermometer it's around 27°C and the reading I'm getting on the display it's around 53.4°C. I checked the voltage around the LM35 and the reading seems to be around 270mV, so I don't know what's wrong with the code.
I also tried with the following formula:
temp = (conversion*8.05); // 3.3/4096 it's around 8.05
tempC = (temp/10);
The previous one will give an acurrate reading at ambient temperature, but as I soon as I tried to drop it with an ice, it won't come down.