← Back to projects
iot · 2023 – 2025

Coffee Roaster

A complete coffee roasting system built from scratch. The project spans custom PCB design in KiCad, ESP32 firmware (C++ and MicroPython), and a React Native companion app for real-time thermal profile plotting.

Coffee Roaster

This project started as a way to roast my own coffee at home with precise control over the temperature curve. It grew into a complete hardware-and-software system designed end to end — a custom PCB, embedded firmware, and a mobile app plotting the roast in real time.

Hardware & PCB design

The electronics live on a custom double-layer board designed in KiCad (the render above is the actual board). It integrates everything the roaster needs:

  • Controller — an ESP32 DevKit V1 socketed onto the board, running the roaster firmware.
  • Thermal telemetry — a MAX6675 K-thermocouple digitizer over SPI reads bean temperature inside the drum, while an AHT20 on I2C tracks ambient conditions.
  • Galvanic isolationEL817 optocouplers separate the ESP32's control lines from the high-power switching side.
  • Actuator switchingTIP41 power transistors with flyback diodes drive the relays that control the AC heating elements and DC motors.
  • Display — a 16x2 character LCD driven through a PCF8574 I2C expander to keep GPIO usage minimal.
  • Power — a 12V input stepped down to 5V for relays and backlight and 3.3V for the microcontroller and sensors.

The schematic and both copper layers are in the gallery below.

Firmware & software

The original firmware was C++ on PlatformIO with OTA updates and secure remote access through Husarnet. I later rewrote the control loop in MicroPython for faster iteration during calibration, adding a lightweight Web API with Server-Sent Events to stream live temperature data.

A React Native companion app connects to the roaster over the local network, plots the live roasting profile, and lets me create, save, and load target thermal curves.

PCB — Interactive 3Ddrag to rotate · scroll to zoom
Loading 3D model…

Gallery