Pages: [1]   Go Down
Author Topic: AD595AQ Offset Output  (Read 1634 times)
0 Members and 1 Guest are viewing this topic.
East Coast, USA. (PA)
Offline Offline
Newbie
*
Karma: 7
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have wired up an AD595AQ in both stand alone Celsius mode, and have tried it with an external K type thermocouple.

The readings I am getting off the chip, when converted, are yielding temperatures about 4 deg C higher than every other thermometer/thermocouple probe I own. (AD595 reads 24.5, all others read 20)

The chip seems to be behaving normally otherwise. I've even swapped in another identical chip with the same exact results. I've quadruple checked my wiring and even re-done it from scratch twice to hopefully eliminate any stupidity on my part. I've even tried adjusting the input voltage from 5-9v with no change in results. This is leading me to believe it is my code at fault.

If someone could provide some explanation what might be causing the offset reading I would really appreciate it.


The code I'm using is as follows:


int Thermocouple = A0;
float temp = 0;

void setup() {
 
  pinMode (Thermocouple, INPUT);

   Serial.begin(9600);
}


  void loop () {   
   
    float sum = 0;
    Serial.begin(9600);     
   
    for (int i=0; i<500; i++) {
       
      sum = sum + analogRead (Thermocouple);      //Sums 500 analog readings
      delay(5);   
    }     
     
   temp = sum/1024;                     //  Finds average of the 500 readings and converts to degC
                                                 //  sum/500 = average value
                                                 //  (Average value)/(1024 divisions)*5v/ gives us Volts
                                                 //  10mv = 1 deg C so take Volts*100 to get deg C
                                                 //  Math simplifies to temp=sum/1024
                                                 
   Serial.println  (temp, DEC) ;
 
   
  }

Thanks!

   
Logged

If architects designed buildings like programmers wrote code, the first woodpecker to come along would be the end of civilization.

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 639
Posts: 34725
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You are summing 500 values but I can't see where you divide by 500 to get the average.
Logged

East Coast, USA. (PA)
Offline Offline
Newbie
*
Karma: 7
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it's done at:

temp = sum/1024

which is simplified from

(sum/500)*(5/1024)*(1/.01)=(sum/1024)


with units of:

(number of divisions)*(Volts/number of divisions)*(DegC/Volt) = Deg C





Logged

If architects designed buildings like programmers wrote code, the first woodpecker to come along would be the end of civilization.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The readings I am getting off the chip, when converted, are yielding temperatures about 4 deg C higher than every other thermometer/thermocouple probe I own. (AD595 reads 24.5, all others read 20)

Thermocouples are active sensors, that is they generate a low level DC voltage proportional to the temperature. Assuming you have multiple sensors of the same type (J,K,etc.) just read them directly with a good multimeter in it's millvolt range. If one sensor is off compared to the others, then you just have a faulty thermocouple. This could be caused by a faulty weld at the sensor tip, bad connected lead wire, etc.

 Thermocouples are not really all the accurate of a temp sensor, their real claim to fame is the very high temperatures they can measure, assuming the sensor's wire insulation used is rated for that high a range.

Lefty
Logged

East Coast, USA. (PA)
Offline Offline
Newbie
*
Karma: 7
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I solved my own problem. All the temperature devices in my house are off by ~3-5 deg C.

The Arduino/AD595 read 100degC +-.1deg C in violently boiling distilled water, while the other thermocouple display Reads only 95C.
Logged

If architects designed buildings like programmers wrote code, the first woodpecker to come along would be the end of civilization.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27418
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ooh, that's good - all off by 5C.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: