-
Notifications
You must be signed in to change notification settings - Fork 1
PIDKiln hardware components
This is the essential component - the base of the whole controller. You can use either an ESP32-Wrover (with PSRAM) or an ESP32-Wroom (without PSRAM). Wrover is still recommended for reliability, but Wroom works fine.
The sketch is configured by default for Wroom (no PSRAM). To use a Wrover board, swap the MALLOC defines in ESP32Kiln.ino:
// If you have Wrover with PSRAM - uncomment these and comment out the Wroom lines
#define MALLOC ps_malloc
#define REALLOC ps_realloc
// if you have Wroom without PSRAM - use these (default)
//#define MALLOC malloc
//#define REALLOC reallocI've used two TTGO boards: the first because I had it, the second because it has an external antenna connector - useful if you plan to put the controller in a metal enclosure.
Both will work fine - and so will any other ESP32 board that has enough pins available (some boards dedicated to camera use or with onboard LCD don't expose all the necessary pins).
We use this breakout board to read from K-type thermocouples. I chose this chip because:
- it works with 3.3V logic,
- it can read temperature up to the K-type thermocouple limit of 1350°C,
- and uses SPI to communicate.

There are many shapes of this breakout board - they all work the same. Use a good quality thermocouple rated to 1350°C (ceramic or stainless steel housing). The low-temperature thermocouples bundled with cheap boards are not adequate.
Important: Add a 10-100nF capacitor in parallel with the thermocouple pins on the MAX31855 side. This is required for reliable readings - without it you will get frequent spurious errors.
Optionally, you can measure the kiln housing temperature with a second MAX31855 board. This serves as a safety check (insulation failure detection) and lets you monitor heat loss. A second board uses the same HSPI bus, just a different CS pin (GPIO 15).
The second board is optional. If you use it, the bundled low-temperature thermocouple is sufficient (typically rated to 350°C).
The primary relay is a DC-controlled SSR (Solid State Relay). SSRs switch fast and silently, without sparking. They use an optoisolated triac (AC) or transistor (DC) internally.
I've used a Fotek 40DA SSR:

This means: controlled with DC 3-32V, switches AC 24V-380V, rated 40A. Make sure your relay can be driven with 3.3V and draws less than 12mA on the control input (ESP32 pins safely deliver 12mA).
If buying from an unknown source (Chinese knock-offs from AliExpress etc.), buy an SSR rated for twice your heater's current - their real ratings are often much lower than advertised.
All SSRs get hot in use. Provide a proper heat sink.
If you have multiple heaters:
- Connect all heaters to a single SSR - as long as total current stays within the SSR's rating
- Wire multiple SSR control inputs to ESP GPIO 19 - watch the 12mA limit
- Enable a second SSR on GPIO 22 (uncomment
SSR2_RELAY_PINinESP32Kiln.h) - both fire simultaneously - Use a small transistor (2N3904) with a 330R gate resistor to buffer the ESP output
- Use a TXS0108E logic level converter module to control up to 8 SSR relays
As an optional safety measure, a mechanical relay is wired in series with the SSR. The EMR stays closed during the entire program run (not switching rapidly), so it doesn't wear out. If the SSR ever fails in the closed (on) state, you can still cut power by killing the EMR.

The SLA-05VDC-SL-C relay is rated for 30A (more than enough for a 3.5kW/230V kiln at ~15A). EMR relays need more current to operate (~185mA at 5V) - use an external 5V supply, not the ESP's 3.3V pin.
Optional but strongly recommended as a fallback if the web interface becomes unavailable.
You need a 128x64 dot matrix LCD. Any colour (blue, green, white) and pixel size works. Mine uses an ST7920 controller. The u8g2 library supports many other controllers - just update the driver definition in ESP32Kiln_LCD.ino:
#define LCD_RESET 4 // RST on LCD
#define LCD_CS 5 // RS on LCD
#define LCD_CLOCK 18 // E on LCD
#define LCD_DATA 23 // R/W on LCD
// Hardware SPI (faster, recommended):
U8G2_ST7920_128X64_F_HW_SPI u8g2(U8G2_R2, /* CS=*/ LCD_CS, /* reset=*/ LCD_RESET);
// Software SPI (if hardware SPI has issues at 5V):
//U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R2, /* clock=*/ LCD_CLOCK, /* data=*/ LCD_DATA, /* CS=*/ LCD_CS, /* reset=*/ LCD_RESET);
A simple encoder providing rotation direction and button press. All LCD menus are navigated with it.

Connect 3.3V (in place of 5V), GND, S1/S2 for rotation, and Key for button press.
An optional contactless current sensor. Visible in the web chart and logged to CSV. Could be used for heater failure detection in a future update.
To measure current flow, wrap the sensor coil around the mains wire. The sensor outputs a voltage proportional to current flow.

You need a 30A (or appropriate rating) sensor, two 10k resistors, and a 10uF capacitor. If your sensor outputs a voltage (+/-1V type with burden resistor), the voltage divider shifts the AC signal into the 0-3.3V range the ESP32 ADC can measure. If your sensor outputs current instead of voltage, add an appropriate burden resistor - see here.