Back to engineering projects
// PRJ_003 · Control Systems

Single-Brownie
Convection Oven.

A consumer air-fryer modified into a closed-loop, PID-controlled convection oven for single-portion baking. Twin K-type thermocouples, a MAX6675 SPI interface, a 100 W heater, and an Arduino-tuned PID loop deliver steady, even temperatures inside a custom 3D-printed chamber.

Project type
Thermal control prototype
Role
Hardware · Firmware & PID tuning
Core systems
Arduino · Thermocouples · Heater · PID
Focus
Closed-loop temperature control
The modified air-fryer with electronics and laptop on the bench
// Bench setup · live PID tuning
Heater
100 W 12 V · 10 A maximum
Sensors
2× K-type T/Cs MAX6675 SPI interface
Controller
Arduino Mega 2560 PID library · SSR drive
Chamber
Modified 4.2 qt air-fryer insulated · custom mounts
// 01 — Problem

Even heat is hard. So is staying there.

Brownies (and most baked goods) need a consistent, precise environment to come out evenly. Compact ovens are notorious for uneven heat, overshoot during preheat, and slow recovery after door opens. The brief: design a small, fan-assisted convection oven that uses closed-loop control to minimize steady-state error and temperature fluctuations.

Requirements

  • Low-voltage heater and fan; safe under continuous operation
  • 12 V, 10 A maximum bus power
  • Closed-loop control system required
  • Even heat distribution and noticeable target temperatures
  • Sufficient insulation to prevent heat loss in the chamber
  • Bonus objective: bake an actual cookie/brownie successfully

Approach

Start from a commodity air-fryer body for proven airflow and insulation. Strip the consumer electronics, wire in a custom heater + fan, and run the loop with an Arduino reading two thermocouples through MAX6675 SPI modules. Drive the heater via a solid-state relay using a slow PWM signal whose duty cycle is set by a tuned PID controller.

// 02 — Control Loop

Setpoint, error, PWM, repeat.

The Arduino samples the chamber temperature, computes the error against the target, and asks the PID library for a fresh control signal. That signal is converted into a PWM duty cycle and fed to a solid-state relay driving the heater. A second thermocouple monitors the heater itself for safety and mathematical-model checks.

Sensor read & calibration

Two bead-tip K-type thermocouples report through MAX6675 SPI modules. A calibration pass against a reference probe is applied per channel before the loop runs.

PID computes a control output

The Arduino PID library combines proportional, integral, and derivative terms to produce a 0-255 control signal. Tuning followed a manual + Ziegler-Nichols-style approach iterated on the bench.

SSR-drive PWM

A pinMode → analogWrite block on a dedicated control pin produces a slow PWM signal. The SSR switches the 100 W heater on and off in proportion to the duty cycle — efficient and silent, no contactor wear.

Convection mixing

A high-temperature fan circulates air around the chamber, equalizing the temperature field and improving heat transfer to the food. The second T/C verifies that internal air, not just the heater surface, is at setpoint.

Stable bake window

After preheat overshoot is contained by tuning, the system holds within a tight band around setpoint long enough to bake a single brownie consistently end-to-end.

// 03 — Build

Strip an air-fryer, rebuild from scratch.

Mechanical work

  • Disassemble the ULTREAN HF-8018LCD-C 4.2 qt air-fryer
  • Remove factory electronics; preserve the airflow geometry
  • Custom 3D-printed brackets for new heater, fan, and sensors
  • Reflective foil and re-insulation around the chamber walls
  • Reassembly with cable strain relief and clean routing

Electronics & firmware

  • Arduino Mega 2560 R3 as the controller
  • Two MAX6675 SPI modules amplify the K-type T/C signals
  • Solid-state relay drives the 100 W / 12 V heater
  • Slow-PWM heater control validated with a TestHeater sketch
  • PID library tuned manually with iterative bench observations
Arduino Mega 2560 PID control MAX6675 SPI K-type thermocouples SSR (solid-state relay) Slow PWM 3D printing Air-fryer chassis Sensor calibration
// 05 — Outcome

Steady temperature, real brownie.

The PID-controlled chamber held a stable temperature with significantly less overshoot than the un-modified appliance. Sensor calibration and tuning iterations made the difference between a chamber that hunted around setpoint and one that settled in cleanly. The bonus objective — actually baking a brownie — was achieved end-to-end.

What worked

  • Reusing the air-fryer chassis preserved tested airflow geometry
  • Slow-PWM SSR drive eliminated audible clicking and contactor wear
  • Two thermocouples gave a sanity check between heater and chamber air
  • Manual PID tuning beat the textbook starting values for the plant

What I'd change

  • Add a feed-forward term keyed to ambient temperature for cold starts
  • Move the user interface to a small OLED + encoder (no laptop tether)
  • Switch to a higher-wattage element to shorten preheat without losing stability