Temperature with thermocouples
There are situations where thermocouples are the best choice as temperature sensors. Their output is standardized, determined only by the metal alloys that form the thermocouple, and not by the size or shape of the junction. With no change in calibration, the metals can be formed into a variety of sizes or shapes suited to different applications.
In biology thermocouples are used to construct tiny probes with rapid response and/or low thermal mass. Low thermal mass is necessary for example to measure temperatures inside flowers or on leaf surfaces. Rapid response is necessary for example to respond dynamically to the temperature of inhaled and exhaled air. Type T couples are often used for biological studies, because of their ease of construction, and resistance to mildly reducing and mildly oxidizing aqueous environments at temperatures typical in biology. Some commercially available probes mounted on thin films or in stainless steel syringes are also of interest in biological work. Type T has a range from -200°C to +350°C. Of all the thermocouple types, type T has the lowest "limit of error", which means that the level of purity attainable in the metals allows them to adhere to the standard type T curve most closely.
Other unique properties of thermocouples, such as their high temperature performance, are of great importance in industrial applications as well as in household appliance. Type K couples (chomel-alumel) are often used, because they are useful up to much higher temperatures, up to over 1000 degrees Celsius. Type J (iron constantan) is also used for its low cost, but the iron is problematic in oxidizing situations. There are many more types of thermocouples useful for special purposes and up to much higher temperatures. The OMEGA Engineering site has a great technical reference section.
The difficulty in using thermocouples come, first, because their
signal is small and has to be amplified. Second, the signal
is not produced as an absolute value, but is relative to a
reference temperature which must be known or measured
independently. Third, the signal, a voltage on the
order of 10 to 50 microvolts per degree Celsius, is not linear,
rather, the sensitivity varies widely as a function of
Maxim <http://www.maxim-ic.com> has come out with a couple of chips that provide a direct to digital interface to thermocouple chips. These are both for type K thermocouples. The MAX6674, covers the range from 0 to 128 degrees C with 10 bit (0.125 degree) resolution, while the MAX6675 covers a wider range, from 0.0 to 1024 degrees Celsius with 12 bit (0.25 degree) resolution. These chips make the interface to a thermocouple a breeze. Simply attach the thermocouple to one side, and the digital temperature readings come out the other side. It is feasible to use a separate chip for each thermocouple in a system. The chip is only avaialable as an 8 pin SOIC, and cost about $7 each in small quantities.
Thermocouples otherwise require quite a bit of low level analog circuitry and adjustment. First there is a high gain amplifier to bring the basic sensitivity of about 5 microvolts per bit (0.125 degrees C) up to a more manageable level. Also required is cold junction compensation, to account for the temperature of the second thermocouple junction formed where the thermocouple is attached to the chip. The Maxim chip measures its own temperature and subtracts the appropriate offset internally. The chip also includes the necessary voltage references and auto-zeroing circuitry, in order to account for the amplifier's own offsets. Finally, there is a 10 or 12 bit analog to digital converter and SPI serial interface.
These chips are designed to work with the popular type K (chromel-alumel) thermocouple, nevertheless,are also be useful with the type T (copper-constantan), because the two types have very similar sensitivities around room temperature, where the cold junction compensation is concerned. The basic accuracy for type K is around 2 degrees Celsius. The chip does not make any linearity correction, so far as I can tell. For best results, additional corrections can be made in software. The usual considerations for thermocouples apply. Namely, the thermocouple itself generates a tiny voltage that is subject to noise pickup and a variety of error sources. One must adhere to the usual engineering practices for use of thermocouples, including the use of shielding, thermowells, and appropriate grounding or insulation of the thermocouple tip. The MAXIM data sheet for the part offers recommendations, as do standard references on thermocouples.
The photo shows the MAX6675 mounted an a SOIC to DIP converter board, with a type K fiberglass insulated thermocouple attached directly to the board. The chip is only avaialable as an 8 pin SOIC.
The circuit is simplicity itself. The 200 ohm resistors are included simply for the purpose of protection, in case something gets connected up incorrectly. The bypass capacitor is recommended for best low noise performance.
Follow the recommendations in the MAXIM data sheet. The thermocouple should be attached as close to the chip as possible, so that the cold junction and the chip (which is measuring the cold junction temperature internally), are isothermal. The whole assembly should of the cold junction and the chip should be kept away from sources of heat or thermal gradients of any kind, perhaps inside an enclosure. You will observe changes in the reading if you touch the MAX667x chip. That is because you are affecting the cold junction compensation by creating a thermal gradient from the chip to the thermocouple connections.
Isolate the thermocouple from noise sources. For example, if you pinch the bare thermocouple junction with your fingers, you may induce a huge 60hz signal into the circuit that it is not able to compensate, and you will see fluctuations in the readings. The fluctuations will be much less if you insulate the thermocouple tip. Other means may be necessary for different situations, for example, to put the thermocouple inside a grounded, shielded thermo-well.
The MAX667x data sheet shows a connection from the (T-) side of
the thermocouple to ground. The purpose of that
connection is to hold the differential inputs to the amplifier
within the common mode range. If there happens
to be lots AC pickup or a bad ground loop, that can drive the high
impedance chip inputs out of the common mode range and result in
incorrect or failed amplification. The connection of
T- to Vss can be either directly or via a resistor in the range of
0 – 1000 Ω. Additionally, small resistors in series
with the thermocouple junctions can help protect against
For use with type T thermocouples, the connection is (T+) blue
copper, and (T-) red constantan.
' Program MAX667x.bse
' Demo of MAXIM thermocouple interface chip.
' thermocouple pins
' +5.0 volts to MAXpin4
' common to MAXpin1
' k thermocouple to (-) red alumel pin 2, and (+) yellow chromel pin 3
' or t thermocouple to (-) red constantan pin 2, and (+) blue copper pin 3
' SPI pins as follows:
thdta con 8 ' MAXpin7 brown
thcs con 9 ' MAXpin6 white
thclk con 10 ' MAXpin5 green
result var word
THC var word ' degrees Celsius (* power of 10)
THCb var bit
low thcs ' select chip
shiftin thdta,thclk,msbpre,[result\16] ' get data
high thcs ' start new data capture
THC=result>>5*/3200 ' for MAX6674 0-128 +/- 0.01 degC, up to 127.87
debug dec THC/100,".",dec2 THC,cr
pause 250 ' conversion time required between readings
' other conversion options
' for MAX6674 results +/- 0.125 up to 65.535 degrees C
' debug dec THC/1000,".",dec3 THC,cr
' for MAX6675 +/- 0.25 degC, up to 655.25
' debug dec THC/100,".",dec2 THC,cr
' for MAX6675 +/- 0.1 degC, up to 1023.7
' debug dec THC/10,".",dec1 THC,cr
' 0.1 degree C is probably the limit of meaningful resolution.
Now for the analog approach. The AD595 chip from Analog devices contains the necessary high gain amplifier and the cold junction compensation for type K thermocouples. For basic AD595, you attach a type K thermocouple to the inputs, and you get a voltage of 10mV per degree C at the output, which you then apply to an analog to digital converter.
I added extra offset circuitry to allow the measurement of temperatures below freezing, and to bring the signal up to 20mV per degree C, and to allow up to 4 thermocouples to share the expensive ($15) AD595 chip. And there is provision to trim the calibration. This is the EME Systems module, THC4.
The THC4 is connected to the data logger by a 5 wire cable. In addition to +6 volt power, Common, and signal lines, there are two thermocouple select lines. The A and B lines select one of the four thermocouple inputs:
The board is calibrated for type T (copper-constantan) thermocouples.
Uniform temperature of the circuit board at the connections is very important. Keep the module away from sources of heat and radiation. It is possible to use shielded thermocouple wire, by connecting the shield to common at the multiplexer and/or at the thermocouple junction.
The standard calibration is as follows:
(-25°C=0.0 volt), 0°C=0.5 volt, 50°C=1.5 volt, 100°C=2.5 volt
sensitivity=0.02 volts per °C
With the 12 bit converter, at a sensitivity of 1.25 millivolts per bit, the resolution is better than 0.1°C. Software can scale the output as desired. We usually calibrate the THC4 at 0.0°C and at 50°C, so as to cover the temperature range of biological interest with less than 0.5°C error even with the linear approximation. The response of type T thermocouples is quite nonlinear . Without compensation the error at the -25 and +100°C will be more than 1 degree when using the linear approximation. For more accuracy, one can look up temperatures as a function of voltage in a type T response chart, or use a polynomial algorithm to calculate the temperature from voltage. This is described in the THC4 documentation. Type K thermocouples also work with the THC4. Type K thermocouple are linear over a wider range.
Here is a BS2 routine (without linearity correction) to read the thermocouples on all 4 channels and print the values on the debug screen:
for ix=0 to 3
outC=outC & 0 | ix ' selects one of 4 couples
pause 10 ' settling time
gosub adread ' gets millivolts, 0--5120, not shown
degC=mVolts/2-250 ' converts mvolts to degrees C *10
debug ["Celsius:",rep "-"\degC.bit15,DEC abs degC/10,".",DEC1 abs degC]
The reference amplifier in the LM10CN provides a pseudo-ground for operation of the AD595 below freezing, with a single ended A/D converter. The reference it provides an offset of about 0.25 volts, or -25°C. This can be trimmed for other offsets, so long as it is greater than 0.2 volts. An alternative is to connect pin 4 directly to common, so the offset is zero, or 0 °C.
The gain of the LM10CN stage, and thus the temperature sensitivity, can be changed by the choice of feedback resistors. The LM10 can swing rail to rail at its outputs. The output of the AD595 is trimmed at Analog Devices for a sensitivity of ~10 millivolts per °C. The sensitivity can be decreased by putting the additional resistor in parallel with the internal feedback, from pin 5 to pin 9 of the AD595. A decreased sensitivity would be necessary in order to use the AD595 to measure very high temperatures with a 6 volt power supply. At 10mV/°C, the AD595 can only get up to about 3 or 4 volts, 300 or 400°C before the output amplifier saturates on a 6 volt power supply. But with a resistor from pin 9 to pin 5, the sensitivity can be reduced to, say, 2 mV per °C, and the output will not saturate until the temperature reaches more than 1500 °C (which is within range for a type K couple.)
Here are some tips to help avoid noise in the thermocouple junctions. Insulate the thermocouple junction so it will not be in direct electrical contact with the measurement point. This is espcially important if the measurement is to be taken in something like a lake or a large body of water, or in wet soil. That can act as an antenna or as a conductor for large ground loop currents that would easily swamp the tiny thermocouple signal. The thermocouples can be routed through a shield, and the shield grounded, to reduce noise pickup from the AC lines or radios, fans etc.
The resistors at the inputs set the common mode voltage equal to
circuit ground, and they also provide a ground path for noise
pickup. The common mode point for the thermocouple junctions can
alternatively be connected to the virtual ground or to any voltage
within the common mode range of the AD595. Doing so (if the rest
of the system allows it) can improve the noise rejection, as the
common mode point is nearer the midpoint of the supply rails. A
second multiplexer can be added to ground all of the thermocouples
except the one that is currently selected. That can help with
crosstalk that can potentially come in from floating thermocouples
in high noise environments.
multiplexer using op amps, a reference sensor, and a
In the following circuit, the multiplexer can select from
one of 4 thermocouples (amplified x249), or a reference
temperature sensor for cold junction compensation, or a voltage
reference that allows measurement below the reference
temperature. The selected signal in turn goes to an
analog-to-digital converter, where it is digitized, followed by
computation and table lookup to compute the actual temperature of
each thermocouple. The advantage of this scheme is
that the cold junction compenstation and the correction for
non-linearity are done in firmware, so that the circuit is not
limited to one particular type of thermocouple. Each
thermocouple type can have its own conversion table or
formula. In the BASIC Stamp or OWL2pe, it is easier to
work with a lookup table.