An ESP32-based reflow-oven controller with an on-device TFT UI, a WiFi access-point web interface, and per-phase PID tuning.
- Live K-type thermocouple reading via MAX6675 (250 ms update interval).
- Five-phase reflow state machine:
IDLE → PREHEAT → SOAK → REFLOWRAMP → REFLOW → COOLDOWN. - Phase-specific PID tuning (separate Kp/Ki/Kd for preheat, soak, and reflow).
- On-device TFT GUI powered by LVGL 7.
- Built-in WiFi access point with web UI for:
- Live monitoring (WebSocket-streamed chart, CSV download).
- Profile create / list / remove (persisted to SPIFFS).
- Passive-buzzer feedback (startup tone, phase changes, alarm).
- DS3231 RTC for a wall clock on the display.
- All web assets are served from the on-device SPIFFS partition.
- A prebuilt firmware binary is shipped in prebuilt/.
| Part | Notes |
|---|---|
| ESP32 dev board | Tested on az-delivery-devkit-v4; any ESP32 with enough GPIOs should work. |
| MAX6675 + K-type thermocouple | Reads oven-chamber temperature. |
| DS3231 RTC module | I²C wall clock. |
| TFT display | ILI-class panel driven by TFT_eSPI; see configexamples/ for a known-good config. |
| Solid-state relay (SSR) | Sized for your oven's mains current. Switched by GPIO 33. |
| Passive buzzer | GPIO 32. |
| Toaster oven | Anything with a resistive heating element. Mains wiring is dangerous — proceed only if you know what you're doing. |
Defined in include/periphery.h:
| Function | GPIO |
|---|---|
| MAX6675 DO | 26 |
| MAX6675 CS | 27 |
| MAX6675 CLK | 14 |
| MAX6675 VCC | 12 |
| SSR output | 33 |
| Buzzer | 32 |
The TFT pins are not set in this repo — configure them in TFT_eSPI/User_Setup.h (see configexamples/TFT_eSPI_USER_SETUP.h). The DS3231 uses the ESP32's default I²C pins.
Profiles are stored in data/profiles.json and served from SPIFFS. Schema:
{
"name": "leaded",
"soakRampRate": "2",
"soakTemperature": "150",
"soakDuration": "80",
"reflowRampRate": "2",
"reflowTemperature": "230",
"reflowDuration": "60"
}| Field | Unit | Meaning |
|---|---|---|
name |
— | Display name; must be unique. |
soakRampRate |
°C/s | Slope from ambient up to soakTemperature. |
soakTemperature |
°C | Plateau before reflow ramp. |
soakDuration |
s | Time held at soakTemperature. |
reflowRampRate |
°C/s | Slope from soak up to reflowTemperature. |
reflowTemperature |
°C | Peak temperature. |
reflowDuration |
s | Time held above reflow temperature. |
soakRampDuration and reflowRampDuration are derived at runtime from the ambient temperature measured at the start of the cycle (src/main.cpp:110-112) and from the rate/setpoint pair (src/profile.cpp:21) — you don't supply them.
Defaults are compiled in at include/pid_setup.h:
| Phase | Kp | Ki | Kd |
|---|---|---|---|
| Preheat | 100 | 0.025 | 20 |
| Soak | 300 | 0.05 | 250 |
| Reflow | 300 | 0.05 | 350 |
Sample time is 1000 ms. These are reasonable starting values — re-tune for your oven's thermal mass.
- Install VS Code and the PlatformIO extension.
- Clone this repo and open the folder in VS Code. PlatformIO will fetch the libraries listed in platformio.ini into
.pio/libdeps/az-delivery-devkit-v4/. - Replace
TFT_eSPI/User_Setup.hwith configexamples/TFT_eSPI_USER_SETUP.h (path:.pio/libdeps/az-delivery-devkit-v4/TFT_eSPI/User_Setup.h). - Replace
lvgl/lv_conf.hwith configexamples/lv_conf_ESP32_ILI_setup.h (path:.pio/libdeps/az-delivery-devkit-v4/lvgl/lv_conf.h). Make sureLV_USE_CANVAS 1is set. - Patch
lv_lib_qrcode/src/lv_qrcode.clines 49–52 per todo.txt (the LVGL 6/7lv_mem_assert/LV_ASSERT_MEMguard). - PlatformIO → Build → Upload to flash the firmware.
- PlatformIO → Project Tasks → Build Filesystem Image → Upload Filesystem Image to flash the SPIFFS partition. This step is mandatory — without the web assets in data/ the firmware will crash on boot.
- If your wiring differs, edit the GPIO defines in include/periphery.h and rebuild.
A prebuilt firmware image is available in prebuilt/firmware.bin:
esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash 0x10000 prebuilt/firmware.binThe SPIFFS image is not prebuilt — you still need to run the "Build Filesystem Image / Upload Filesystem Image" steps above from PlatformIO, or the controller will crash on first boot.
On power-up the controller starts a WiFi access point:
- SSID:
YARC - Password:
123456789
(Defined in src/yarcweb.cpp:3-4 — change them there before flashing if you want different credentials.)
The device IP is shown on the TFT (typically 192.168.4.1 in SoftAP mode). Connect to the AP and open the IP in a browser. Available routes:
| Route | Purpose |
|---|---|
/ |
Home — links to monitoring and profiles. |
/monitoring |
Live chart of target vs. measured temperature with CSV download. |
/profiles |
List existing profiles. |
/create-profile |
Form to add a new profile. |
A WebSocket at /ws streams time;target;current rows once per second while monitoring is active (src/main.cpp:60-61, src/yarcweb.cpp:27-29).
THERMOCOUPLE NOT CONNECTED OR DAMAGED!on the serial monitor / warning icon on the TFT — the firmware forcesCOOLDOWNwhenever the reading isNaNor exactly0.0(src/main.cpp:63-69). Check the MAX6675 wiring and that the thermocouple tip is intact.- Boot loop or panic on startup — the SPIFFS image isn't flashed. Run "Upload Filesystem Image".
- Black / garbled TFT —
TFT_eSPI/User_Setup.hwasn't replaced with the example, or driver/pins don't match your panel. - LVGL compile errors about
canvas—LV_USE_CANVASisn't enabled inlv_conf.h. - lv_lib_qrcode fails to compile — apply the patch from todo.txt.
- Integrate IotWebConf so the controller can join a local WiFi instead of running its own AP, reachable as
http://yarc.local/. - Track
maxProcessTemperatureacross a cycle (marked TODO at include/phase.h:23). - Move the GPIO defines out of include/periphery.h into include/pindefines.h (currently a stub).
Released under the MIT License. (TODO: add a top-level LICENSE file.)
This project stands on the shoulders of:
- LVGL — embedded graphics library.
- TFT_eSPI — TFT driver.
- AsyncTCP and ESPAsyncWebServer — non-blocking HTTP + WebSocket stack.
- RTClib — DS3231 driver.
- MAX6675 library — thermocouple driver.
- Tone32 — buzzer tones on ESP32.
- PID — Brett Beauregard's PID library.
- Plotter — serial plotter helper.
- lv_lib_qrcode — QR-code rendering for LVGL.
- ArduinoJson — JSON parser/serializer.
- Materialize CSS — web UI styling.
- Chart.js — live monitoring chart.
