inaccurate temperature reading using: AD8495 thermocouple am

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
bhowe
 
Posts: 1
Joined: Thu Aug 07, 2014 12:54 pm

inaccurate temperature reading using: AD8495 thermocouple am

Post by bhowe »

Hello,

I'm trying to use The AD8495 Thermocouple Amplifier with a type K Thermocouple. I am using a Arduino Uno and supplying the amplifier with 5.05V as measured by a Fluke multimeter. As measured by the Fluke the program is picking up and reporting the voltage correctly, however the temperature is wrong. measuring using other equiptment at 0C it reports -3C, at 22C it reports 17C, at 120C it reports 100C and at -40C it reports -30C. I've tested the Thermocouple and I know it's not that. I've also used this with two different amplifier chips both with the same results.

Below is the Code:

void setup(){
analogReference(EXTERNAL);
}

const int ThermoCouplePin = 0;

void ForumGetTemp() {
double Vout = 5.05;
double temp = analogRead(ThermoCouplePin);

temp = (temp * Vout) / 1024; // calculates the voltage from the raw data

Serial.print("Voltage: ");
Serial.println(temp);

temp = (temp - 1.25) / 0.005; // Formula from the AdaFruit Website for converting

Serial.print("Temperature: ");
Serial.println(temp);

delay(1000);
}

For Wiring:
the V+ is wired to the 5V,
both grounds are wired to the Uno's ground
the Vout is wired to analog pin 0
and the 5 V pin is wired to VREF.

Can anyone help me out?
Thank you,

User avatar
zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: inaccurate temperature reading using: AD8495 thermocoupl

Post by zener »

It looks like the gain needs to be tweaked a bit. Try replacing:

temp = (temp - 1.25) / 0.005;

with

temp = (temp - 1.25) / 0.004126;

User avatar
geoffreyarnold
 
Posts: 10
Joined: Mon May 05, 2014 11:15 pm

Re: inaccurate temperature reading using: AD8495 thermocoupl

Post by geoffreyarnold »

Hello,

I was referred to this thread from another forum topic. How did you calculate the new gain?

Thanks in advance,
Geoff.

User avatar
zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: inaccurate temperature reading using: AD8495 thermocoupl

Post by zener »

Well, it was a little involved. What I really needed were the actual temperatures and the values that were read at those temperatures. But I only had the actual temps and the reported temps after being converted with the formula that was used. So first I had to calculate the raw AD values using the formula. Then I plotted those against the actual temperatures and created a linearization formula in the form y=mx+b. Then I changed that into the format that the OP was using in the code.

Short answer: I used Excel

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”