Back to Projects

8052 Oven Reflow Controller

Platform CV-8052 on DE10-Lite FPGA
Language 8052 Assembly
Team 6 members — SW Lead
Source GitHub ↗

Overview

A microcontroller-based reflow oven controller for a standard 1500 W toaster oven, built around the CV-8052 soft-core processor and programmed entirely in assembly language. The system measures oven temperature via a K-type thermocouple, regulates heating power through PWM-driven SSR control, provides dual user interaction (hardware keypad/LCD + UART PC GUI), and enforces safety constraints—all in real time, without an RTOS.

I designed the publish–subscribe software architecture using bit-addressable memory (BSEG) as a signal bus, wrote all core FSMs including the 7-stage reflow control workflow, and mid-project reviewed and rewrote 2,500+ lines of code to enforce the pub–sub pattern as new features were merged.


Architecture

The system was initially built with a sequential polling loop. As features grew—debouncing, buzzer control, FSM transitions, safety monitoring—the loop introduced latency and blocking. I refactored the entire codebase into a pub–sub architecture: modules publish event flags (temperature reached, time elapsed, state change), and other modules react independently. Timer interrupts generate periodic signals rather than executing control logic directly.

Before

Sequential Polling

Linear loop checking inputs one by one. Growing latency, blocking on LCD writes, poor fault isolation.

WDM: 2.65 / 5
After

Pub–Sub (BSEG)

Decoupled modules via bit-level flags. Deterministic timing, modular, scalable, easy to debug.

WDM: 4.35 / 5

Software System

Each functional unit executes once per main-loop iteration under cooperative scheduling—no blocking operations, no nested execution paths. The Control FSM drives the 8-state reflow workflow while 10+ modules (temperature sensing, SSR PWM, buzzer, UART, display, keypad, abort handler) communicate purely through shared bit signals.

Detailed software architecture diagram showing pub-sub signal flow between modules
Software architecture — modules communicate through a shared bit signal bus

Reflow FSM

The 8-state finite state machine governs the full reflow cycle: Idle → Configuration → Ramp to Soak → Soak → Ramp to Reflow → Reflow → Cooling → Done. Transitions are triggered by temperature thresholds or elapsed time. An abort signal from any active state forces immediate transition to cooling with a 10-beep alarm.

Finite state machine diagram with 8 states from Idle to Process Done
8-state control FSM with abort path to cooling

Hardware Design

Temperature Sensing

K-type thermocouple → OP07 differential amplifier (G ≈ 309) → LM4040 precision ADC reference. Rolling average filter reduces noise while maintaining response time. Accuracy: ±3 °C.

Power Control

SSR driven via NMOS low-side switch. PWM period: 1500 ms with ~1 W resolution. Full power on ramp, proportional control during soak to limit overshoot.

User Interface

4×4 matrix keypad + 6 push buttons with FSM-based debounce. LCD + 7-segment display for live feedback. Bidirectional UART at 57,600 baud for PC GUI control.

Safety

Auto-abort if oven fails to reach 50 °C within 60 s (thermocouple fault / heater failure). Manual stop independent of system reset. 10-beep alarm on fault.

Complete electrical schematic of the reflow oven controller
Full electrical schematic — thermocouple amplifier, SSR driver, keypad, LCD, UART, and cooling fan

Results

±2 °C Peak temp variation across 3 runs
±3 °C Measurement accuracy vs. reference
2,500+ Lines of assembly reviewed & refactored
8 FSM states in control workflow

8052 Assembly Cooperative Multitasking Pub-Sub Architecture FSM Design SSR PWM Control K-Type Thermocouple UART @ 57600 DE10-Lite FPGA OP07 Amplifier LM4040 Reference KiCad Python GUI