Thermocouple and RTD Temperature Sensing for Makers: Type K, MAX31855, MAX31865, and Cold Junction Compensation
Most maker projects that need temperature get by with a cheap NTC thermistor or a DS18B20, and for anything under about 150°C those parts are the right call. But the moment a project needs to measure a reflow oven, a kiln, a forge, a laser tube chiller loop, or anything else that runs hot, cold, or needs real accuracy across a wide span, thermistors run out of range and RTDs and thermocouples take over. Both show up constantly in maker builds — PID-controlled toaster oven reflow rigs, 3D printer hotend research, kiln controllers, and bench test equipment — but the sensors themselves are more subtle than a thermistor, and getting the interface chip wrong is the single most common reason people get garbage readings. This guide covers how thermocouples and RTDs actually work, the interface ICs that make them usable with an ESP32 or Arduino, and where each one belongs.
Thermocouples vs. RTDs vs. Thermistors
These three sensor families solve the same problem — turn temperature into an electrical signal — in completely different ways, and the differences matter for which one you reach for.
SensorRangeAccuracyResponse TimeCostBest ForNTC Thermistor-40°C to ~150°C±1-2°C (uncalibrated)Fast$3D printer hotends, ambient sensingDS18B20 (digital)-55°C to 125°C±0.5°CSlow (750ms conversion)$Enclosure/ambient monitoring, water tempType K Thermocouple-200°C to 1350°C±2.2°C or 0.75%Fast$$Kilns, forges, reflow, exhaust gasPT100/PT1000 RTD-200°C to 850°C (practical: -50 to 500°C)±0.15-0.5°C (Class A/B)Moderate$$$Precision process control, lab equipmentA thermocouple is two dissimilar metal wires (Chromel and Alumel for Type K) joined at the tip. The junction generates a small voltage — on the order of 41 microvolts per degree Celsius for Type K — through the Seebeck effect. It's cheap, rugged, and can survive open flame, but the signal is tiny, nonlinear, and requires cold junction compensation to be meaningful at all.
An RTD (resistance temperature detector) is a precision resistor, almost always platinum, whose resistance changes predictably with temperature — 100 ohms at 0°C for a PT100, 1000 ohms for a PT1000. RTDs are far more linear and accurate than thermocouples but need a 3 or 4-wire connection to cancel out lead resistance, and they're slower to respond and more fragile.
The Cold Junction Problem
This trips up nearly everyone building their first thermocouple circuit. A thermocouple doesn't measure absolute temperature — it measures the temperature difference between the hot junction (the tip, at your kiln or reflow oven) and the cold junction (where the thermocouple wires connect to your copper measurement wires, typically right at the connector on your interface board). If you don't know the cold junction temperature, you can't convert the measured voltage into an actual reading, because the same voltage could mean different things depending on how hot the connector itself is.
This is why every practical thermocouple interface chip includes a second sensor — usually a small onboard temperature sensor near the terminal block — that measures the cold junction temperature and adds a compensating offset before converting to a final reading. Building this from raw op-amps and a lookup table is possible but is exactly the kind of thing you should let a dedicated chip handle.
MAX31855: The Standard Thermocouple-to-Digital Chip
The MAX31855 is the part nearly every maker thermocouple breakout is built around (Adafruit, SparkFun, and generic clones all use it). It handles cold junction compensation internally, linearizes the thermocouple curve, and outputs a ready-to-use temperature over SPI as a signed 14-bit value with 0.25°C resolution. It also does fault detection — open circuit, short to VCC, short to GND — which is worth checking on every read, because a thermocouple wire that's come loose will otherwise silently report a plausible-looking but wrong temperature.
- Interface: SPI (read-only, 4-wire: SCK, CS, SO, and GND/VCC)
- Update rate: ~9-10 conversions/second
- Variants: MAX31855K (Type K, most common), plus J/N/T/S/E variants for other thermocouple types
- Gotcha: use actual thermocouple wire (or at minimum, a thermocouple connector with the right alloy contacts) all the way to the board terminals — splicing in ordinary copper wire ahead of the interface chip re-introduces the cold junction problem at the splice point
MAX31865: RTD-to-Digital with Ratiometric Measurement
For PT100/PT1000 RTDs, the MAX31865 is the equivalent standard part. It drives a constant excitation current through the RTD and measures the resulting voltage ratiometrically against a precision reference resistor, which cancels out most sources of drift. It supports 2, 3, and 4-wire RTD configurations — 3-wire is the common sweet spot for maker projects, since it cancels lead resistance error without needing a full 4-wire Kelvin connection.
WiringLead Resistance ErrorComplexity2-wireFull lead resistance adds directly to reading (bad past a few feet of wire)Simplest3-wireCancelled via matched lead pairs, assuming both leads are equal length/gaugeStandard for most projects4-wireFully cancelled (Kelvin sensing)Lab-grade, rarely needed outside precision workOne setting that catches people off guard: the MAX31865 needs the reference resistor value (typically 430Ω for PT100, 4300Ω for PT1000) programmed correctly, and the RTD nominal resistance (100 or 1000) set to match — get either wrong and every reading will be linearly skewed but still look plausible, which makes the mistake hard to catch without a second reference thermometer.
Wiring and Firmware Notes
- Both chips are SPI devices and coexist cleanly on the same bus as other SPI peripherals (an SD card, a TFT display) as long as each has its own CS line — useful if you're already running a display-heavy ESP32 project.
- Keep thermocouple and RTD lead wires away from AC mains, SSR trigger wiring, and switching power supply traces. These are millivolt and sub-ohm-precision signals; a nearby relay coil or PWM-driven heater line will induce noticeable noise.
- For libraries: Adafruit's MAX31855 and MAX31865 Arduino libraries work fine on ESP32 and handle the raw register math for you, including fault bit decoding.
- Sample at a sane rate and apply a simple moving average or exponential filter in firmware — thermocouples especially are electrically noisy, and a PID loop fed raw single-sample readings will hunt and oscillate.
Which One for Which Project
- Reflow oven or toaster-oven PID build: Type K thermocouple with a MAX31855 — fast response and wide range matter more than 0.1°C precision here, and thermocouples handle the thermal cycling better long-term.
- Kiln, forge, or foundry monitoring: Type K thermocouple, ideally a probe rated for the full range you'll see, with MAX31855.
- Laser chiller loop or CNC spindle coolant monitoring: PT100 RTD with MAX31865 — you want stability and accuracy over a narrow range, not speed.
- 3D printer hotend or bed: stick with the built-in NTC thermistor and your printer's stock firmware tables — thermocouples and RTDs are overkill and mechanically awkward to mount in a hotend block.
Once you've got clean, fault-checked readings coming off either chip, the actual control loop — usually a PID controller driving a solid-state relay or a MOSFET — is the same problem regardless of which sensor is feeding it. Getting the sensing layer right first is what keeps that loop honest: a noisy or uncompensated temperature reading will make even a well-tuned PID controller hunt, overshoot, or nuisance-trip a limit switch on a kiln or reflow build.
Related Guides
- How to Program Addressable LED Strips: WS2812B Patterns, Effects, and Power Design
- I2C vs SPI vs UART: How to Choose and Use Serial Communication Protocols
- How to Use Sensors with Arduino and ESP32: Temperature, Distance, Load, Current, and Hall Effect
- How to Control Motors with Arduino and ESP32: Stepper, DC, and Servo Drivers
- ESP32: Setting Up for Arduino IDE
- Arduino vs ESP32: Which Should You Use? A Practical Comparison
- Getting Started with ESP32: GPIO, WiFi, and Your First Project
- I2C Wiring and Protocol Guide for Arduino, ESP32, and Raspberry Pi