FluxBench.AIShared project · read-only

Kiln Temperature Monitor

ESP32 DevKit (WROOM-32)·Arduino C++·Updated Jul 27, 2026·by FluxBench TeamIncludes Lab + Schematic + PCB

A MAX6675 amplifier reads a K-type kiln thermocouple over SPI (SCK GPIO18, CS GPIO5, SO GPIO19) in real 0.25 °C steps. Every second the sketch samples the probe, tracks the peak temperature, renders both on an SSD1306 OLED (I2C on GPIO21/22) and lights a red alarm LED on GPIO4 whenever the kiln crosses 226 °C. The simulator drives the probe with a slow firing-curve drift around ~221 °C, so you can watch the readout climb, trip the alarm and fall back. Bundled Lab bench, schematic and routed PCB included.

sketch.ino
// Kiln Temperature Monitor — MAX6675 K-type thermocouple + OLED + alarm LED
//
// The MAX6675 reads a K-type thermocouple over SPI (SCK=18, CS=5, SO=19).
// Every second the sketch samples the probe, tracks the peak, shows both on
// an SSD1306 OLED and lights a red alarm LED on GPIO4 when the kiln crosses
// the over-temperature threshold.

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

#define TC_SCK 18
#define TC_CS   5
#define TC_SO  19
#define ALARM_PIN 4

MAX6675 thermocouple(TC_SCK, TC_CS, TC_SO);
Adafruit_SSD1306 display(128, 64, &Wire, -1);

const float ALARM_C = 226.0;
float peakC = 0;

void setup() {
  Serial.begin(115200);
  pinMode(ALARM_PIN, OUTPUT);
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.clearDisplay();
  display.display();
  Serial.println("Kiln monitor ready");
  delay(500); // let the MAX6675 settle after power-up
}

void loop() {
  float c = thermocouple.readCelsius();
  float f = thermocouple.readFahrenheit();
  if (c > peakC) peakC = c;
  bool alarm = c >= ALARM_C;
  digitalWrite(ALARM_PIN, alarm ? HIGH : LOW);

  Serial.print("Kiln ");
  Serial.print(c, 2);
  Serial.print(" C / ");
  Serial.print(f, 1);
  Serial.print(" F   peak ");
  Serial.print(peakC, 2);
  if (alarm) {
    Serial.println("  ** OVER TEMP **");
  } else {
    Serial.println("");
  }

  display.clearDisplay();
  display.setTextColor(SSD1306_WHITE);
  display.setTextSize(1);
  display.setCursor(0, 0);
  display.print("KILN MONITOR");
  display.setTextSize(2);
  display.setCursor(0, 16);
  display.print(c, 1);
  display.print(" C");
  display.setTextSize(1);
  display.setCursor(0, 40);
  display.print("Peak ");
  display.print(peakC, 1);
  display.print(" C");
  display.setCursor(0, 52);
  if (alarm) {
    display.print("ALARM: OVER 226 C");
  } else {
    display.print("Status: OK");
  }
  display.display();

  delay(1000);
}

Built with FluxBench.AI — the AI workbench for embedded projects.