Go Down

Topic: AD595AQ Offset Output (Read 1 time) previous topic - next topic

landru

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!

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

Grumpy_Mike

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

landru

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





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

retrolefty

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

landru

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.
If architects designed buildings like programmers wrote code, the first woodpecker to come along would be the end of civilization.

CrossRoads

Ooh, that's good - all off by 5C.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up