Pantech.AI

How to Interface Thermocouple with Arduino UNO

Overview of Thermocouple

Thermocouple

A thermocouple is made up of two distinct conductors forming an electrical junction at different temperatures. Due to the thermoelectric effect, this junction generates a voltage that varies with temperature. This voltage can be measured to determine the temperature. The analog-to-digital converter (ADC) output of this voltage can be processed by a microcontroller to calculate the temperature.

For further details on thermocouples and their usage, refer to the “Thermocouple” section under Sensors and Modules.

Connection Diagram of Thermocouple with Arduino

Interfacing Thermocouple With Arduino UNO


Measure Temperature using Thermouple and Arduino Uno

Measuring temperature with a thermocouple and displaying it on the Arduino Serial Monitor.

In this setup, an AD595 amplifier connects the thermocouple to the Arduino UNO board. The output voltage from the AD595 is fed into the ADC of the UNO. This ADC value is then converted to degrees Celsius (ºC) using the formula provided below.

Why 0.0027 is subtracted in the formula above:

The AD595 output is given by:

AD595 Output = (Type K Voltage + 11 µV) × 247.3

This formula shows that the AD595 introduces an amplified offset voltage. To obtain an accurate temperature reading, we need to eliminate the total offset voltage (11 µV × 247.3).

Note: 11 µV is the offset voltage of the AD595 instrumentation amplifier for a K-type thermocouple.

AD595

The AD595 is a complete instrumentation amplifier, specifically designed as a monolithic thermocouple amplifier with cold junction compensation. It is compatible with K-type thermocouples, while the AD594 is suited for J-type thermocouples. The AD595 combines an ice-point reference with a pre-calibrated amplifier, delivering a high-level output of 10 mV/°C directly from the thermocouple signal.

The AD595 is factory-trimmed to match the transfer characteristics of a K-type thermocouple at 25°C, where the K-type thermocouple output is 40.44 µV/°C. As a result, the gain of the AD595 is 247.3 (calculated as 10 mV/°C divided by 40.44 µV/°C).

The input offset voltage for the AD595 is 11 µV, which arises because the AD595 is calibrated for a 250 mV output when applying a 25°C thermocouple input.

The output of the AD595 is given by:

AD595 Output = (Type K Voltage + 11 µV) × 247.3

Below is the pin diagram of the AD595 IC.

Pin Diagram of AD595

Note: By connecting +5V and ground to the AD595, you can measure temperatures from 0°C to +300°C. For further details, please refer to the 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);
}

Leave a Comment

Your email address will not be published. Required fields are marked *