Readings from Tmp36 Drop Off

by mail929 on Sat Feb 02, 2013 9:12 pm

I'm using a tmp36 with an Arduino Due. The first 5 readings I am getting are normally good (about 70*f or .72v), but after that they drop off to about 31*f or .5v. I have checked the voltage going in and there is no change occationally it drops to 3.32v instead of 3.33v. Any ideas?

Reading, Converting, and Printing Code
Code: Select all
  int reading = analogRead(tempPin); //reads voltage
  float voltage = reading * 3.3;  // saves voltage
  voltage /= 1024; //divides voltage by 1024
  Serial.print(voltage);
  Serial.println(" volts"); //prints voltage
  float tempC = (voltage - 0.5) * 100 ;  //converts to celcius
  Serial.print(tempC); Serial.println(" degrees C"); //prints c
  float tempF = (tempC * 9.0 / 5.0) + 32; //converts to farenhiet
  Serial.print(tempF); Serial.println(" degrees F"); //prints farenhiet
mail929
 
Posts: 4
Joined: Sun Jul 15, 2012 11:31 am

Re: Readings from Tmp36 Drop Off

by mail929 on Sat Feb 02, 2013 11:40 pm

It appears to last a little longer when I use my 9v wall adapter
mail929
 
Posts: 4
Joined: Sun Jul 15, 2012 11:31 am

Re: Readings from Tmp36 Drop Off

by adafruit_support_bill on Sun Feb 03, 2013 6:42 am

It appears to last a little longer when I use my 9v wall adapter

What were you using before?
User avatar
adafruit_support_bill
 
Posts: 25397
Joined: Sat Feb 07, 2009 9:11 am

Re: Readings from Tmp36 Drop Off

by mail929 on Sun Feb 03, 2013 10:38 am

I was using a MicroUSB connection to the programing port.
mail929
 
Posts: 4
Joined: Sun Jul 15, 2012 11:31 am

Re: Readings from Tmp36 Drop Off

by mail929 on Sun Feb 03, 2013 11:22 am

Well it appears to be working but I am using a different USB cable. I think it maybe because the wire to the analog from the tmp36 is just stretched tight.
mail929
 
Posts: 4
Joined: Sun Jul 15, 2012 11:31 am