Kiln and bath probes on an Arduino Uno
A K-type thermocouple on a MAX31855 for a kiln past 1000 C and a PT100 on a MAX31865 for the bath beside it, a tenth of a degree at a time. The whole build, an Arduino Uno and 2 more parts, runs here in your browser on the firmware below; open it in the editor to change the wiring or the code and run it again.
Teaching? Assign it to your class in one click.
Intermediate Runs in your browser. Free, and no account needed.
The parts retail for about $41. On Mokxi they're free.
Step by step, with the wiring and the common mistakes: Arduino MAX31855: K-Type Thermocouple Code
The code
The firmware exactly as the editor opens it. Change a line there and press Run: it compiles in the browser.
// Kiln and bath probes: a K-type thermocouple on a MAX31855 for the kiln,
// which runs to well over 1000 C, and a PT100 platinum probe on a MAX31865
// for the glaze bath beside it, where a tenth of a degree matters.
//
// MAX31865 CLK -> 13 SDO -> 12 SDI -> 11 CS -> 10
// MAX31855 CLK -> 7 CS -> 6 DO -> 5
//
// A thermocouple reaches far hotter than an RTD; an RTD is far more exact.
// The MAX31855 also reads its own board's temperature, the cold junction.
//
// Things to try. Drag the thermocouple slider past 1000 C and watch the
// sketch call the kiln ready. Drag the RTD slider.
#include <SPI.h>
#include "Adafruit_MAX31855.h"
#include <Adafruit_MAX31865.h>
Adafruit_MAX31855 kiln(7, 6, 5); // CLK, CS, DO
Adafruit_MAX31865 bath(10); // CS, on the SPI pins
void setup() {
Serial.begin(9600);
kiln.begin();
bath.begin(MAX31865_2WIRE);
Serial.println("Kiln and bath probes");
}
void loop() {
double k = kiln.readCelsius();
float b = bath.temperature(100.0, 430.0);
Serial.print("kiln ");
if (isnan(k)) {
Serial.print("fault");
} else {
Serial.print(k, 0);
Serial.print(" C");
}
Serial.print(" board ");
Serial.print(kiln.readInternal(), 1);
Serial.print(" C bath ");
Serial.print(b, 1);
Serial.println(" C");
if (!isnan(k) && k >= 1000) {
Serial.println("Kiln at temperature");
}
delay(500);
}
Parts list
5 parts, plus the jumper wires. They retail for about $41; on Mokxi they're free.
How it is wired
11 connections, pin by pin, read from the circuit itself. Each line is one set of pins joined together, by a jumper wire or a breadboard strip.
- Ground: Arduino Uno R3 pin GND; RTD converter, MAX31865 pin GND
- Arduino Uno R3 pin 13; RTD converter, MAX31865 pin CLK
- Arduino Uno R3 pin 12; RTD converter, MAX31865 pin SDO
- Arduino Uno R3 pin 11; RTD converter, MAX31865 pin SDI
- Arduino Uno R3 pin 10; RTD converter, MAX31865 pin CS
- Arduino Uno R3 pin 7; Thermocouple converter, MAX31855 pin CLK
- Arduino Uno R3 pin 6; Thermocouple converter, MAX31855 pin CS
- Arduino Uno R3 pin 5; Thermocouple converter, MAX31855 pin DO
- 5 V: RTD converter, MAX31865 pin VIN
- 5 V: Thermocouple converter, MAX31855 pin VCC
- Ground: Thermocouple converter, MAX31855 pin GND
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.