Using thermocouples to measure high temperature


Thermocouples can be used to measure temperatures as high as 1000 degrees Celsius. Here, we describe how to connect a thermocouple to the USB-DUX-sigma board.

Theory of operation

Thermocouples generate a small voltage which is proportional to the measured temperature. Here, we use a K type thermocouple which gives us 39uV/C. This voltage is called Seebeck voltage and is generated when two different kind of wires are welded together. The trouble is that these two wires end up inside of a plug containing probably two copper clamps which will give us an additional voltage. People call this place "cold junction" where this unwanted voltage is generated. The cold junction reduces the voltage measured which we can be written down as a simple formula:

V_out = a (T_h - T_c)

where a is the so called Seebeck coefficient which is 39uV/C for our K type sensors and T_h and T_c are our hot and and cold junction temperatures. In other words, T_h is the actual temperature we would like to measure whereas T_c is the temperature of our socket at the pre-amplifier. We see that we subtract the temperature of the cold junction from the temperature from the hot junction. With a bit of school math we arrive at our formula which converts the voltage to temperature:

T_h = V_out / a + T_c

In our case we measure the temperature of the socket (the cold junction) with an LM35 temperature sensor.

The hardware

The circuit is very simple and comprises of an INA126 instrumentation amplifier at a gain of 250 and an LM35 temperature sensor. It can be quickly built on a matrix board or even fitted into a D type plug for the USBDUX boards (omitting the bulky socket). The second channel is used for the LM35 temperature sensor which is in thermal contact with the socket (see below).


Python script

This is a slowly changing sensor input and requires no fast processing. The Python script for comedi2py does the job with a few lines of code. Adjust GAIN_INSTR_AMP and ZERO_INSTR_AMP if necessary.

C++ program

The C++ program uses the same QT widgets as the Python program but needs to take care of the comedi initalisation and is therefore much longer.

Download contains the EAGLE files (v5) and the application "thermocouple" showing the measured temperature.

Copyright (C) 2005-2012, Bernd Porr,,
Open Software License v. 2.1