tutorialspinouttools
Sensors · ESP32-C3

MAX6675 on OLED: K-Type Thermocouple (High Temp)

Free ESP32 & Arduino tutorial · wiring, code & parts · gokul.builds

Overview & Wiring

What it is: The MAX6675 reads a K-type thermocouple, letting you measure from 0 to 1024 °C — far hotter than any silicon sensor. Perfect for kilns, reflow ovens, soldering, and engines. How it works: It's a read-only SPI device that does the thermocouple cold-junction compensation and outputs a 12-bit temperature. This sketch uses a bit-banged SPI on three ordinary GPIOs, so it doesn't clash with the OLED's I2C pins. Wiring: MAX6675 SO (data out) -> GPIO10 MAX6675 SCK (clock) -> GPIO6 MAX6675 CS (select) -> GPIO7 MAX6675 VCC -> 3V3 MAX6675 GND -> GND Thermocouple: + and - screw terminals on the module (yellow = +, red = -). OLED VCC=3V3, GND=GND, SDA=GPIO4, SCL=GPIO5 Libraries: "MAX6675 library" by Adafruit, plus "Adafruit SSD1306" and "Adafruit GFX Library". On screen / Serial: temperature in °C. Touch the thermocouple tip to something warm to see it climb. Gotchas: The MAX6675 needs at least ~250 ms between reads — don't poll faster. A reading that's stuck near 0 or wildly high usually means a reversed or open thermocouple. Keep the thermocouple wire away from mains for safety.

Circuit Diagram

MAX6675 on OLED: K-Type Thermocouple (High Temp) wiring diagram for ESP32-C3

Parts You Need

ESP32-C3 SuperMiniBuy →
0.96" SSD1306 OLEDBuy →

Source Code (Arduino / ESP32)

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <max6675.h>

Adafruit_SSD1306 display(128, 64, &Wire, -1);

int thermoSO = 10, thermoCS = 7, thermoSCK = 6;   // SPI pins
MAX6675 thermocouple(thermoSCK, thermoCS, thermoSO);

void setup() {
  Serial.begin(115200);
  Wire.begin(4, 5);
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  delay(500);                                 // let the MAX6675 settle
}

void loop() {
  float t = thermocouple.readCelsius();

  display.clearDisplay();
  display.setTextColor(SSD1306_WHITE);
  display.setTextSize(1);
  display.setCursor(0, 0);
  display.println("MAX6675 K-type");
  display.setTextSize(3);
  display.setCursor(0, 24);
  display.printf("%.1f", t);
  display.setTextSize(2);
  display.print(" C");
  display.display();

  Serial.printf("Temp: %.2f C\n", t);
  delay(500);                                 // MAX6675 minimum read gap
}
Browse all tutorials ESP32-C3 pinout Calculators