Thermocouple Interfacing With Arduino UNO

Thermocouple is a device consisting of two dissimilar metals connected together creating a junction which is used for measuring the temperature

73.8k views2 min readUpdated Apr 12, 2023
Thermocouple Interfacing With Arduino UNO

Overview of Thermocouple

 

Thermocouple
Thermocouple

 

Thermocouple consists of two different conductors forming an electrical junction at different temperatures.

Due to thermo effect, thermocouples produce a voltage which is dependent on temperature.

Temperature can be found out from this voltage.

ADC output of this voltage can be processed by a microcontroller to give the temperature.

For more information about Thermocouple and how to use it, refer the topic Thermocouple in the sensors and modules section.

 

Connection Diagram of Thermocouple with Arduino

Interfacing Thermocouple With Arduino UNO
Interfacing Thermocouple With Arduino UNO

 

 

Measure Temperature using Thermouple and Arduino Uno

Measuring temperature using a thermocouple and displaying it on Arduino serial monitor.

 

Here, AD595 is used to connect thermocouple to UNO board. The output voltage from AD595 is given to ADC of UNO board.

The ADC value is then converted into ºC using the formula given below.

C = \frac{((ADC Value)* 4.88)-0.0027}{10}

Why 0.0027 subtracted in above formula

AD595 provides output as follows,

AD595 Output = (Type K Voltage + 11 uV) x 247.3

  • The above formula shows AD595 provides output with amplified offset voltage. So, we have to eliminate total offset voltage (11 uV * 247.3) to get accurate temperature value.

Note : 11 uV is an offset voltage of IC AD595 instrumentation amplifier for K-type thermocouple.

 

AD595

  • AD595 is a complete instrumentation amplifier (Monolithic Thermocouple Amplifiers) with a Cold Junction Compensation.
  • AD595 is compatible for K-type thermocouple, while AD594 is compatible for J-type thermocouple.
  • It combines ice point reference with the pre-calibrated amplifier to produce a high level output (10mV/ºC) directly from the thermocouple output.
  • AD595 gain trimmed to match transfer characteristic of K-type thermocouple at 25ºC. The output of K-type thermocouple in this temperature range is 40.44uV/ºC.
  • The resulting gain for AD595 is 247.3 (10mV/ºC divided by 40.44uV/ºC).
  • The input offset voltage for AD595 is 11uV, this offset arises because the AD595 is trimmed for a 250 mV output while applying a 25°Cthermocouple input.
  • Output of AD595 is,

AD595 Output = (Type K Voltage + 11 uV) x 247.3

  • The IC AD595 pin diagram is shown in figure below.
Pin Diagram of AD595
Pin Diagram of AD595

 

Note: If you connect +5 volt and ground to the AD595 you can measure the temperature from 0ºC to +300ºC. For more information, refer AD595 datasheet.

 

Thermocouple Code for Arduino Uno

const int thermocouple_input = A1;	/* AD595 O/P pin */

void setup() {
  Serial.begin(9600);	/* Define baud rate for serial communication */
}

void loop() {
  int adc_val;
  float temperature;
  adc_val = analogRead(thermocouple_input);
  temperature = ( ((adc_val * 4.88) - 0.0027 ) / 10.0 );
  Serial.print("Temperature = ");
  Serial.print(temperature);
  Serial.print("\n\n");
  delay(1000);
}

 

Video of Temperature Measurement using Thermocouple and Arduino

Components Used

Powered byMouser Electronics

Downloads

Comments13

Join the discussion — share a question or tip.

  • NS
    nstgn

    Hi, If I used other microcontroller, should I change the equation?

  • SU
    SUBHAMDAS

    hi there i was wondering that k type thermocouple can able to detect -200 to +1200 degree celcious so how this sensor can able to archive the negetive temperature ,

  • PA
    PaulCarew

    Taken from AD595 data sheet: Using AD595 Objective of 10mV per C AD5959 Output Voltage (OPV) = C*10mV + 11uV*247.3 Therefore: C = (OPV - 11uV*247.3) / 10mV ---> Using 1/10mV = 1/10E-3 = 100 = (OPV - 0.0027 ) * 100 = OPV*100 - 0.27 Example OPV=2.603V ( which of course is 2603 mV) C = 2.603*100 - 0.27 = 260.03 degrees C Arduino 8bit ADC provides 1023 values. Each value represents 5v/1023 = 4.89mV Therefore to find AD 595 OPV from ADC, multiply ADCvalue by 4.89E-3

  • MA
    mansteinliu

    Thanks for sharing, but there is something wrong with your equation and code. The ADCvalue is the the result of analogRead(), which read the voltage of output from AD595 and convert it into digital number ranging from 0 to 1023. And then you multiply 4.88, which comes from 5V/1024 =0.00488V=4.88mV, you use 4.88mV here, it's fine. But the unit of offset "0.0027" is V, which comes from 11uV*247.3=0.0027V=2.7203mV. So you used mV as unit for the front, but V as unit for the back. That's not right. It confused me a lot and cost me some time to balance the equation, hope you find it and correct it soon. Kind regards

    • NO
      noumanaqil9

      I'm also having trouble with the code, but I couldn't quite get what you are trying to say. Are you saying we should use "2.7" instead in the code?

  • MA
    MayyajiControl

    Hi, Fantastic post! is it possible to connect 7 Segment display to have TC temp display ? & how segment will be connected? Thanks for your help.

  • HE

    is it possible to connect a type T thermocouple?

    • PA
      PaulCarew

      This is the replacement device for the AD595: https://www.analog.com/en/technical-articles/ad8495-interface-to-type-t-thermocouples.html

  • AB
    abboudmohamed01

    how to cabler an ad 595 and ad 594 type amplifier with an arduino uno card

  • MA
    manuelgarcia1405

    Hello, I was wondering if you could tell me what thermocouple you used. thanks

  • ED
    eduardpartenie

    Hi, Thank you for the great post, very informative. Could you please let me know if it is possible to connect multiple thermocouples and if yes, what would be the approach? I need to connect around 50 of them to Arduino. I really appreciate your help.

    • KA
      kalongogracia

      It depends on the number of analog pins that you have on your arduino; I'm also working on the same project where I have to connect 4 thermocouples. I already did.