Problems Calibrating a TMP36

Hey I'm simply trying to get a TMP36 to measure temperature in Celcius. I may have my conversion wrong but it doesn't seem to be that I find my typical analog reading seems off.

int TempRaw = 0; float TempCel = 0;

void setup() { Serial.begin(9600);

}

void loop() { TempRaw = analogRead(A1); TempCel = (TempRaw - 102.3)/2.046; Serial.println(TempCel); delay(100);

}

If any one has help for me weather they think my conversion is wrong or if i just have a general software or hardware potential issue please inform me.

Ps. My Analog reading in the room im in is about 150-160, and the celcius is reading 26 degrees in a room thats about 22 degrees.

The analogRead() uses the 5V as reference by default. If you power your Arduino only via the USB cable, the 5V might be 4.5V. That results in a higher value for analogRead().

Do you have a power supply (for example a regulated wall wart) of 7.5V or 9V (or 12V) ? Connect that to the power jack. The temperature should be more accurate.

This problem is why most of us decide to use a temperature sensor with digital interface, like the DS18B20. The DS18B20 returns always the right temperature, regardless of changes of the 5V.