How Do Thermocouples Work, and How Do You Implement Cold Junction Compensation?
Last updated 3 July 2026 · 10 min read
Direct Answer
A thermocouple generates a small voltage (the Seebeck effect) proportional to the temperature difference between its measurement junction and its connection point to the measuring circuit — it cannot measure absolute temperature on its own. Cold junction compensation (CJC) fixes this by independently measuring the temperature at the connection point (the 'cold junction') and adding the equivalent Seebeck voltage back in, recovering the true measurement-junction temperature. Type K (chromel-alumel, −200°C to +1350°C, ~41 µV/°C) is the general-purpose default; type J, T, and E cover narrower ranges or higher precision at lower temperatures. The two standard interface ICs are the MAX31855 (K-type only, built-in CJC and linearisation, SPI, no fault-type configurability) and the MAX31856 (selectable thermocouple type, configurable fault detection, higher resolution, SPI).
Detailed Explanation
Thermocouples are the most common industrial temperature sensor for wide-range and high-temperature measurement, but they work on a fundamentally different principle from the RTDs and thermistors already covered in this cluster — see PT100 and RTD fundamentals and thermistor basics for those resistance-based approaches. A thermocouple doesn't change resistance with temperature; it generates its own small voltage, and that voltage depends on a temperature difference, not an absolute temperature. Getting this right — specifically, implementing cold junction compensation — is the one detail that trips up almost every first-time thermocouple design. See the Temperature Sensors topic for the full set of temperature-sensing guides.
The Seebeck Effect
When two dissimilar metals are joined at one end and that junction is held at a different temperature from the other (open) ends, a small voltage appears across the open ends. This is the Seebeck effect, and it is the entire operating principle of a thermocouple. The voltage is approximately proportional to the temperature difference between the two junctions, with a proportionality constant (the Seebeck coefficient) that depends on the specific alloy pair.
Critically, a thermocouple only ever measures a temperature difference — the difference between its measurement junction (the "hot junction," at the point you actually want to measure) and whatever temperature its two open ends are at when they connect to your measuring circuit (the "cold junction," historically implemented as an ice bath held at a known 0°C). If you connect a thermocouple directly to a voltmeter and don't know the temperature of the voltmeter's input terminals, you cannot recover the hot-junction temperature from the voltage reading alone — the same voltage could mean many different hot-junction temperatures depending on what the cold junction was doing.
Why Cold Junction Compensation Is Mandatory
Cold junction compensation (CJC) solves this by independently measuring the actual temperature at the cold junction — the point where the thermocouple's alloy wires connect to the copper traces of your PCB — and mathematically adding back the Seebeck voltage that junction itself would be contributing, recovering the true hot-junction temperature.
In a modern embedded design, this is done with:
- A local temperature sensor (a diode, a small thermistor, or an on-die sensor) placed physically as close as possible to the actual thermocouple-to-copper connection point.
- A correction that converts the local cold-junction temperature into the equivalent Seebeck voltage for the specific thermocouple type in use, and adds it to the measured thermocouple voltage before converting the total to temperature.
Without CJC, a thermocouple reading is only valid if you happen to already know (and can guarantee) the cold junction's exact temperature — which is almost never true in a real embedded product, since the cold junction is wherever the sensor's wires meet the PCB, and that point's temperature drifts with ambient conditions and nearby heat sources.
Thermocouple Types Compared
Different alloy pairs give different temperature ranges, sensitivities, and environmental resistance. The letter designation (K, J, T, E, and others) is standardised by ANSI/NIST, not brand-specific.
| Type | Alloys (+/−) | Typical range | Approx. Seebeck coefficient | Notes |
|---|---|---|---|---|
| K | Chromel / Alumel | −200°C to +1350°C | ~41 µV/°C | General-purpose default; widest range; slightly non-linear at low temperatures |
| J | Iron / Constantan | −40°C to +750°C | ~52 µV/°C | Higher sensitivity than K; iron leg corrodes in humid/oxidising environments above ~500°C |
| T | Copper / Constantan | −200°C to +350°C | ~43 µV/°C | Best accuracy at sub-zero and near-ambient temperatures; common in refrigeration and cryogenics |
| E | Chromel / Constantan | −200°C to +900°C | ~68 µV/°C | Highest Seebeck coefficient of the common types; good for lower-noise-margin applications |
Reference voltage-vs-temperature tables for every standard type are published by NIST (ITS-90) and are the authoritative source for the polynomial coefficients used in precise linearisation.
Choosing a type: use K unless a specific requirement points elsewhere — it covers the widest range, is the cheapest and most widely available, and is well supported by every thermocouple interface IC. Use T for the best low-temperature accuracy (refrigeration, cryogenic, near-ambient precision work). Use J only where required by legacy equipment compatibility or when the wider temperature swings of K aren't needed, and be aware of the iron leg's oxidation limit in continuous high-temperature service.
Linearisation
The Seebeck voltage is not perfectly linear with temperature — the relationship is a polynomial that NIST publishes as reference coefficients (ITS-90) for each thermocouple type, typically as a 5th- to 9th-order polynomial fit across the sensor's rated range. A firmware implementation from raw voltage has two practical options:
- NIST polynomial: most accurate across the full range, but requires storing and evaluating a multi-term polynomial (and often two different polynomial sets for sub-zero vs above-zero ranges, since the physical response is not symmetric).
- IC-based linearisation: modern thermocouple interface ICs (below) perform this conversion internally in hardware/firmware and output temperature directly, removing the need to implement the NIST polynomial yourself for most designs.
For general embedded designs, using an interface IC with built-in linearisation is almost always the better trade-off than implementing the NIST polynomial in application firmware — the accuracy gain from a custom implementation rarely justifies the added firmware complexity and the risk of a coefficient transcription error.
MAX31855 vs MAX31856
Both are Analog Devices (formerly Maxim) SPI thermocouple-to-digital converter ICs with built-in cold junction compensation and linearisation, but they target different levels of design complexity.
| Feature | MAX31855 | MAX31856 |
|---|---|---|
| Thermocouple type | K only (fixed) | Selectable: B, E, J, K, N, R, S, T |
| Interface | SPI (read-only) | SPI (read/write registers) |
| Resolution | 0.25°C (14-bit) | 0.0078°C (19-bit) |
| Cold junction resolution | 0.0625°C | 0.015625°C |
| Fault detection | Open circuit, short to GND, short to VCC (3 fixed faults) | Configurable fault thresholds, open/overvoltage/undervoltage, plus continuous fault monitoring mode |
| 50/60 Hz noise rejection filter | Fixed | Configurable |
| Typical use | Simple, single-type, cost-sensitive designs | Multi-type support, higher accuracy, configurable fault handling |
MAX31855 is the simpler part: it is read-only over SPI (no configuration registers to write), fixed to type K, and returns both the linearised hot-junction temperature and the raw cold-junction temperature in a single 32-bit frame. This makes it the fastest IC to bring up when type K is all a design needs.
MAX31856 trades that simplicity for flexibility: it supports all eight standard thermocouple types via a configuration register, offers substantially higher resolution, and provides configurable fault detection (adjustable high/low temperature thresholds, continuous fault monitoring without needing to poll). Choose the MAX31856 when a product line needs to support more than one thermocouple type from the same PCB design, when resolution below 0.25°C matters, or when the fixed three-fault detection of the MAX31855 isn't sufficient for the application's fault-reporting requirements.
Basic MAX31855 read (SPI, 32-bit frame):
uint32_t raw = spi_read32(); // MSB first, 4 bytes
if (raw & 0x00010000) {
// Fault bit set — bits [2:0] identify open circuit / short to GND / short to VCC
uint8_t fault = raw & 0x00000007;
handle_fault(fault);
return;
}
int16_t hot_junction_raw = (raw >> 18) & 0x3FFF; // 14-bit signed, D[31:18]
float hot_junction_c = hot_junction_raw * 0.25f; // 0.25°C per LSB
int16_t cold_junction_raw = (raw >> 4) & 0x0FFF; // 12-bit signed, D[15:4]
float cold_junction_c = cold_junction_raw * 0.0625f; // 0.0625°C per LSB
The MAX31855 has already performed CJC and linearisation internally by the time this frame is read — hot_junction_c is the compensated, linearised result, ready to use directly.
Design Considerations
- Keep the cold junction thermally uniform. The interface IC's internal (or nearby external) CJC sensor must experience the same temperature as the actual point where the thermocouple wire meets the PCB copper. Route the thermocouple connector directly adjacent to the IC, avoid placing heat-generating components (regulators, high-current traces) near the connector, and consider a small copper pour under both the connector and the IC to even out any local gradient.
- Use genuine thermocouple extension wire for the full run. Splicing thermocouple-alloy wire to copper part-way through the cable run creates unintended junctions that introduce error unless those splice points are also held at a known, matched temperature. Extension wire (colour-coded per type, e.g. yellow/red for type K in the US colour code, or the equivalent IEC 60584-3 colour code used internationally) preserves the correct alloy pair all the way to the cold junction at the measuring electronics.
- Match filter settings to your local mains frequency. As with the MAX31865 RTD converter, thermocouple interface ICs typically include a 50/60 Hz digital filter; in Australia, configure for 50 Hz rejection to reject mains-frequency interference picked up by the (often long) thermocouple lead run.
- Budget for lower absolute accuracy than an RTD. Thermocouples are typically accurate to ±0.5–2°C even with a well-implemented CJC, versus ±0.1–0.3°C for a well-designed RTD circuit (see PT100 and RTD fundamentals) — choose a thermocouple for its wide range and ruggedness, not when RTD-level absolute accuracy is required.
- Zeus Design designs precision temperature measurement systems, including thermocouple, RTD, and thermistor sensor interfaces, for industrial and product applications.
Common Mistakes
- Omitting cold junction compensation entirely — connecting a thermocouple directly to an ADC input and treating the raw voltage as if it maps to absolute temperature. Without knowing (and compensating for) the cold junction's own temperature, the reading is only valid at whatever cold-junction temperature happened to exist when any calibration constant was derived, and drifts with ambient conditions from there.
- Wiring the wrong thermocouple type to an interface IC configured for a different type — the Seebeck coefficient differs meaningfully between types (a type J circuit reading type K voltages, for example, produces a systematic and non-obvious temperature error, not an open-circuit fault). Confirm the physical sensor's type marking matches the IC's configuration.
- Splicing thermocouple wire to copper wire before the cold junction — as covered in the FAQ above, this creates unintended junctions that introduce error unless the splice points are thermally matched, which is rarely guaranteed in practice. Run genuine extension wire the full distance.
- Placing the CJC sensor far from the actual physical cold junction — a CJC sensor on the far side of the PCB from the actual connector, or separated from it by a heat-generating component, measures a different temperature than the true cold junction experiences, silently degrading accuracy even though the circuit appears to be working normally.
- Not detecting an open thermocouple circuit — a broken thermocouple wire (common after mechanical stress or high-temperature-cycling fatigue) can float to a voltage that looks like a plausible (but wrong) reading rather than an obvious fault, depending on the input bias network. Use the interface IC's built-in open-circuit fault detection (available on both the MAX31855 and MAX31856) rather than relying on the reading looking "reasonable."
Frequently Asked Questions
- Can I extend a thermocouple with regular copper wire?
- No, not without introducing error. Any junction between dissimilar metals generates its own Seebeck voltage — splicing a thermocouple lead to copper wire creates two new unintended junctions (one at each splice point) that add their own thermoelectric error unless both splice points are held at the exact same temperature. The correct practice is to run genuine thermocouple-alloy extension wire (colour-coded and polarity-matched to the thermocouple type, e.g. type K extension wire) all the way from the sensor to the cold junction at the measuring instrument or IC. Only at that final cold junction — where the compensation IC or circuit measures the local temperature — is it correct to transition to copper.
- Why does my thermocouple reading drift when I touch the connector or the IC gets warm?
- This is a classic cold-junction-compensation symptom. The CJC sensor (a diode, thermistor, or on-die sensor inside the interface IC) must be thermally close to the actual physical cold junction — the point where the thermocouple's alloy wires connect to the PCB's copper traces. If the CJC sensor is far from that connection point, or a heat source (a nearby regulator, or your finger on the connector) creates a temperature gradient across the board, the CJC sensor reads a different temperature than the actual junction experiences, and the compensation is systematically wrong. Keep the thermocouple connector directly adjacent to the interface IC, avoid heat-generating components nearby, and add a local ground/copper pour to even out the temperature across the cold junction area.
- Do I need cold junction compensation if I only care about relative temperature change, not absolute temperature?
- It depends on whether the cold junction temperature itself is expected to stay constant. If the cold junction is held at a known fixed temperature (for example, an ice-point reference bath at 0°C, historically the standard laboratory technique the term 'cold junction' originates from), no additional compensation is needed because the offset is already known and constant. In virtually all embedded and industrial designs, the cold junction is at ambient PCB temperature, which varies with the environment and the board's own thermal behaviour — so compensation is required even if only relative changes matter, because the cold junction's own drift would otherwise appear as a false signal change.
References
Related Questions
What Is a Thermistor and How Do You Use One?
Covers NTC thermistor voltage divider circuits, Steinhart-Hart equation, self-heating error, ADC interface, and selection for temperature measurement.
How Do PT100 and RTD Temperature Sensors Work?
Covers PT100/PT1000 RTD sensors: 2-wire, 3-wire, and 4-wire connections, excitation current, Wheatstone bridge conditioning, and when to choose an RTD.
How Do You Use the MAX31865 RTD-to-Digital Converter with a PT100 Sensor?
Learn how to wire a PT100 RTD to the MAX31865, configure its SPI registers for 2-, 3-, or 4-wire connections, and convert the ADC reading to temperature.
How Do You Interface a Digital Temperature Sensor?
Covers DS18B20 (1-Wire, parasite power, multiple devices) and MCP9808 (I2C, alert pin) interfacing — circuit requirements and MCU firmware notes.
Sensor Signal Conditioning Basics
Covers signal conditioning for sensors: op-amp gain, offset, 4-20mA interface, anti-aliasing filter design, ADC input protection, and two-point calibration.
What Is SPI (Serial Peripheral Interface)?
SPI is a synchronous full-duplex serial bus for connecting microcontrollers to peripherals at high speed. Learn how SCLK, MOSI, MISO, and CS work.
Related Forum Discussions
MAX31865 reading fault bit on every conversion — VBIAS enabled but still faulting
Spent most of yesterday trying to get a MAX31865 talking to my STM32F4 and I'm stuck on the same problem no matter what I try: the fault bit
NTC thermistor temperature reading jumping ±4°C — ADC noise or something in the circuit?
I've got an NTC thermistor (10 kΩ at 25°C, standard B = 3950) in a voltage divider with a 10 kΩ fixed resistor, top rail 3.3 V, thermistor t