A thermocouple measures far hotter than any digital sensor — up to about 1000 °C with a K-type probe — and the MAX6675 module turns its tiny voltage into a number. On the Raspberry Pi Pico it reads cleanly over SPI1: SCK on GP10, SO on GP12, CS on GP13.
Power it from 3V3, screw the thermocouple into T+ and T−, and the script prints the temperature twice a second.
Wiring
| Raspberry Pi Pico | MAX6675 K-type thermocouple module | Wire | Notes |
|---|---|---|---|
| — | T+ | — | To K-type thermocouple + (non-magnetic leg) (not drawn) |
| — | T- | — | To K-type thermocouple − (magnetic leg) (not drawn) |
| GND | GND | black | |
| 3V3 | VCC | red | 3V3 is pin 36. SO then switches at 3.3 V. |
| GP10 | SCK | yellow | SPI1 SCK, physical pin 14. |
| GP13 | CS | orange | Physical pin 17. |
| GP12 | SO | blue | SPI1 RX, physical pin 16. |
3.0–5.5 V part, 3.3 V board. The MAX6675 runs from 3.0–5.5 V and its SO output follows VCC. Power it from 3.3 V on ESP32 and Pico, 5 V on Uno — then every pin matches your board.
Board quirks
- The MAX6675 is read-only: two bytes over SPI, temperature = bits 15–3 × 0.25 °C. Bit 2 set means the thermocouple is disconnected — the script reports it and lights the GP25 LED.
- Power it from 3V3, not VBUS: SO follows VCC, and the Pico’s pins are not 5 V tolerant.
- A conversion takes about 220 ms, so read no faster than every 250 ms or you just get the previous value.
- Uses for Indian workshops: tandoor or kiln temperature, soldering-iron checks, motor and transformer heating. Keep the electronics away from the heat — only the probe goes in.
Code
# MAX6675 + K-type thermocouple (0-1024 C) on a Raspberry Pi Pico (MicroPython, hardware SPI1).
# Wiring: VCC -> 3V3 (pin 36), GND -> GND, SCK -> GP10 (pin 14), SO -> GP12 (pin 16, SPI1 RX),
# CS -> GP13 (pin 17). Thermocouple + -> T+, - -> T-.
from machine import Pin, SPI
import time
spi = SPI(1, baudrate=1_000_000, polarity=0, phase=0, sck=Pin(10), mosi=Pin(11), miso=Pin(12))
cs = Pin(13, Pin.OUT, value=1)
led = Pin(25, Pin.OUT)
def read_c():
cs.value(0)
hi, lo = spi.read(2)
cs.value(1) # CS HIGH starts the next conversion (about 220 ms)
raw = (hi << 8) | lo
if raw & 0x04: # D2 set = thermocouple input open
return None
return (raw >> 3) * 0.25
print("MAX6675 on SPI1 (SCK GP10, SO GP12, CS GP13)")
time.sleep_ms(500)
while True:
t = read_c()
if t is None:
led.on()
print("No thermocouple - check the T+ / T- screws")
else:
led.off()
print("Thermocouple {:.2f} C".format(t))
time.sleep_ms(500) # never faster than 250 ms - it would return the old value# MAX6675 + K-type thermocouple (0-1024 C) on a Raspberry Pi Pico (MicroPython, hardware SPI1).
# Wiring: VCC -> 3V3 (pin 36), GND -> GND, SCK -> GP10 (pin 14), SO -> GP12 (pin 16, SPI1 RX),
# CS -> GP13 (pin 17). Thermocouple + -> T+, - -> T-.
from machine import Pin, SPI
import time
spi = SPI(1, baudrate=1_000_000, polarity=0, phase=0, sck=Pin(10), mosi=Pin(11), miso=Pin(12))
cs = Pin(13, Pin.OUT, value=1)
led = Pin(25, Pin.OUT)
def read_c():
cs.value(0)
hi, lo = spi.read(2)
cs.value(1) # CS HIGH starts the next conversion (about 220 ms)
raw = (hi << 8) | lo
if raw & 0x04: # D2 set = thermocouple input open
return None
return (raw >> 3) * 0.25
print("MAX6675 on SPI1 (SCK GP10, SO GP12, CS GP13)")
time.sleep_ms(500)
while True:
t = read_c()
if t is None:
led.on()
print("No thermocouple - check the T+ / T- screws")
else:
led.off()
print("Thermocouple {:.2f} C".format(t))
time.sleep_ms(500) # never faster than 250 ms - it would return the old valueExpected serial output
MAX6675 on SPI1 (SCK GP10, SO GP12, CS GP13)
Thermocouple 29.75 C
Thermocouple 186.50 C
No thermocouple - check the T+ / T- screwsMAX6675 on SPI1 (SCK GP10, SO GP12, CS GP13) Thermocouple 29.75 C Thermocouple 186.50 C No thermocouple - check the T+ / T- screws
Common errors
Temperature drops when you heat the probe
T+ and T− are swapped. The leg a magnet sticks to is T−.
Always “No thermocouple”
Loose screw terminals or a broken probe. Measure the probe with a multimeter: a few ohms is good, open circuit is broken.
Reads 0.00 C constantly
SO isn’t reaching GP12, or CS/SCK are swapped. Check the SPI1 pins.