COFFEE-CTRL-A01

Coffee machine control, in two connected boards

An autonomous STM32 controller handles the coffee cycle and sensor interlocks. A separate ESP32-C3 board provides OLED information, local keys and Wi-Fi configuration.

3D CAD views of the STM32 main controller and ESP32-C3 interface boards
Main controller and UI board · CAD assembly views
STM32 + ESP32-C3Control + interface
3 × COM / NOCommand channels
12 VDCIsolated DC input
127×85 / 100×50 mmBoard dimensions

A controller for grind-and-drip coffee systems

COFFEE-CTRL-A01 separates appliance control from the user interface. The main board receives temperature, three water-level contacts and a jug-presence contact, then controls distinct heater, warming and grinder command circuits. The interface board communicates over a 3.3 V UART link.

START and STOP are physical contacts wired directly to the STM32. Wi-Fi does not provide a start command. A power cycle returns the controller to idle; a new local START press is required for a new cycle.

Where the architecture fits

Countertop grind-and-drip appliances

A local start sequence, separate grinder and heating commands, and jug/water contacts form the control layer for an atmospheric-pressure drip-coffee appliance.

Office and shared pantry stations

An OLED presents machine and sensor information. The dedicated local STOP path remains available without a network connection, while water and jug inputs govern the active cycle.

Appliance product integration

Separate main and UI boards allow the display, keys and antenna to be placed away from the control circuits. Connector tables, harness definitions and STEP files support electrical and mechanical integration.

Engineering and service workbenches

Three low-voltage indicator loads, serial diagnostics and offline NTC calibration tools help inspect wiring, command sequences and sensor conversion using the same documented interfaces.

Control and connectivity have distinct jobs

Main control board

STM32G030K6T6
127 × 85 mm · 2-layer FR-4, 1.6 mm

The STM32 owns the state machine, real ADC sampling, physical START/STOP, input interlocks, relay commands and watchdog. It runs the control loop independently of the display and Wi-Fi tasks.

Interface and Wi-Fi board

ESP32-C3-MINI-1-H4X
100 × 50 mm · 2-layer FR-4, 1.6 mm

The ESP32-C3 handles OLED pages, MENU/UP, buzzer indications, UART polling and physical-button Wi-Fi setup. START/STOP contacts pass through the board to the STM32 without connecting to ESP32 GPIO.

Inputs

NTC temperature
Three water levels
Jug presence
Protection chain
Physical START / STOP

Main controller

STM32G030K6T610 ms control loop · sensor interlocks · watchdog
3.3 V UART · 115200 8N1C1 / R1 / D1
ESP32-C3-MINI-1-H4XOLED · MENU / UP · Wi-Fi

Command interfaces

K1 · Main heat
COM / NO · SELV
K2 · Warming
COM / NO · SELV
K3 · Grinder
COM / NO · SELV

Isolated 12 VDC → MAIN 5 V → UI 5 V; each board derives its own 3.3 V logic supply. The board-to-board harness carries power, ground, UART TX/RX and the two physical key contacts.

Components, power and interfaces

Specified components

FunctionSpecified deviceDesign role
Autonomous controlST STM32G030K6T6Cortex-M0+, LQFP32; 32 KB Flash / 8 KB RAM
Wi-Fi and interfaceEspressif ESP32-C3-MINI-1-H4X4 MB Flash; antenna region extends beyond the UI PCB edge
MAIN power conversionRECOM R-78C5.0-1.0 + Microchip MCP1700T-3302E/TT12→5 V module, 1 A; separate 5→3.3 V supply for MAIN logic
UI power conversionDiodes AP63203WU-7 + Bourns SRN6045TA-4R7M5→3.3 V switching supply with 4.7 µH inductor
Three command channelsOmron G5LE-1 DC12 × 3 + AOS AO3400A × 3COM/NO dry contacts; low-side coil drivers, pull-downs and flyback diodes
Temperature inputTDK B57891S0103F00810 kΩ at 25°C, ±1%; B25/100 = 3950 K, ±1%; dry surface probe assembly
Display and soundWaveshare 2.42inch OLED Module + Same Sky CMI-1295IC-0585TWhite SSD1309 128×64 OLED, 3.3 V four-wire SPI; 5 V active buzzer
Reserved actuator circuitTI DRV8871DDAR12 V H-bridge and two end-stop inputs; both drive inputs remain low in the supplied firmware

Connector map

ConnectorSignals / supplyUse
MAIN J112 VDC / GNDExternal isolated DC supply
MAIN J2V12 / V12_SAFENormally closed low-voltage protection chain; coil supply return
MAIN J33.3 V REF / SWDIO / SWCLK / NRST / GNDLocal SWD programming; reference pin is not a power input
MAIN J4 ↔ UI J2015 V / GND / TX / RX / START / STOPSix-wire connection; 3.3 V UART, 115200 bit/s, 8N1
MAIN J5JUG / GNDJug contact closes to ground when present
MAIN J6WATER1 / WATER2 / WATER3 / GNDIndependent low / middle / high contacts
MAIN J7NTC / GND10 kΩ NTC to ground, 10 kΩ pull-up to 3.3 V; ADC_IN0
MAIN J8 / J9 / J10HEAT / WARM / MOTOR — COM + NOThree SELV dry-contact command interfaces
MAIN J11 / J12DOOR_A / DOOR_B; OPEN / GND / CLOSEDReserved door motor and two limit contacts
UI J202GND / 3.3 V / SCK / MOSI / CS / DC / RESETExternal OLED; adapter harness maps signals to the module’s different pin order
UI J203GND / 3.3 V REF / TX / RX / EN / BOOTUART0 programming and logs; 3.3 V TTL adapter
How the load interfaces connect
J8/J9/J10 are SELV command contacts for independent, current-limited DC circuits up to 24 VDC and 1 A. The PCB is powered by isolated 12 VDC; it does not deliver 230 V load power. A 230 V heater, warming plate or grinder requires a separate mains-rated switching and protection assembly, including suitable insulation, earthing and final thermal protection in the actual load circuit. Do not route that mains circuit through these PCB terminals.

Three commands, with sensor-driven permission

K1 · Main heating

The heating command uses temperature hysteresis during the timed BREW stage; grinder and warming commands remain off.

K2 · Independent warming

A dedicated dry-contact circuit separates warming from the main heater. The supplied firmware configuration leaves K2 off.

K3 · Grinding

The timed GRIND stage activates only the grinder command. The cycle then moves to BREW; no pump channel is assigned.

Temperature and calibration

ADC_IN0 measures the 10 kΩ NTC divider. The software checks open/short limits and sample age, then converts the ADC value with a lookup table. The download includes a 25°C/90°C offline calibration tool that accepts recorded ADC and reference temperatures and generates traceable conversion data without changing firmware or network settings.

Three water levels and jug presence

Water contacts close to ground at low, middle and high positions. Legal numeric masks are 0, 1, 3 and 7: empty, low, low+middle and all three. Empty water prevents start; inconsistent combinations latch a fault. Losing water or the jug during an active cycle switches off commands and latches the fault.

Protection-chain feedback

ADC_IN1 monitors V12_SAFE through a 47 kΩ / 10 kΩ divider. Opening the low-voltage NC protection chain removes relay-coil supply and latches a software fault; chain recovery does not restart the cycle. This chain does not remove DRV8871 motor power or open welded contacts, so final heat protection belongs in the separate load circuit.

Local stop and fault reset

STOP takes priority over START. With inputs safe, a new two-second local STOP hold clears a latched fault to idle; a further new START press is required. Holding START during power-up does not trigger a cycle. Invalid or stale samples and cycle time limits also turn commands off.

Use the output-locked MAIN image for wiring and sensor inspection. The SELV bench image runs a 5 s GRIND and at most 90 s BREW sequence with current-limited dummy loads, accepting a new physical START only when required inputs permit operation. Temperature conversion and thresholds are configured in the local engineering sources; the web interface does not change them.

OLED, Wi-Fi and UART flow

View locally

MENU and UP navigate five OLED pages: machine information, sensors, Wi-Fi, serial diagnostics and the setup password. Temperature and contact information come from MAIN diagnostic frames.

Exchange bounded serial frames

C1 carries STATUS or STOP; R1 returns the state, fault and H/W/G software command bits. MAIN sends D1 diagnostics every second with temperature, raw ADC0/ADC1, water mask, jug, protection chain and sample validity. CRC-8/ATM checks transmission errors; it is not authentication.

Keep information current

UI polls STATUS every 500 ms. After three seconds without a valid reply or diagnostic sample, the corresponding data is shown as offline or unknown. H/W/G values describe commands, not relay-contact or load-current feedback; a valid ADC sample is not an overall operating permission.

Open Wi-Fi setup at the appliance

Release MENU and UP, then hold both for three seconds to open a 180-second local setup window. A fresh 12-character WPA2 password appears on the OLED. Join the COFFEE-… access point and open 192.168.4.1 to enter a network’s SSID and password. Credentials are saved only after that network supplies an IP address.

Keep control at the main board

The setup page offers network configuration, read-only information and STOP. There is no network START, fault-clear or cycle-parameter command. AP and HTTP close when the setup window ends; normal boot does not reopen the setup AP.

FrameDirectionContents
C1UI → MAINSTATUS query or STOP request
R1MAIN → UIRequest sequence, result, state, fault, H/W/G software commands
D1MAIN → UITemperature, raw ADC0/ADC1, water mask, jug, protection chain, validity and mode; every 1 s

The parts around the boards

Power and sensing

Mean Well GST25A12-P1J 12 V supply; TDK dry NTC assembly; three RSF54Y100RC float switches; Littelfuse 59140-1-S-02-A reed sensor with 57140-000 magnet for jug presence.

Display and harnesses

The external 2.42-inch OLED uses a signal-mapped adapter harness. The package specifies board-to-board, sensor, protection-chain, display and programming wire connections with connector and terminal selections.

Mounting and 3D integration

The dry electronics enclosure is defined at 220×160×80 mm with separate main/UI mounts and an external OLED carrier. STEP, DXF and mounting drawings connect enclosure geometry to the boards’ mounting holes.

Programming and inspection tools

STLINK-V3MINIE with a STDC14-to-5-pin adapter serves MAIN; a 3.3 V USB-UART serves UI. The SIM3 enclosure provides three separate low-voltage indicator circuits. Serial CLI and calibration templates accompany the wiring and measurement guides.

Complete engineering files, in one package

Open the editable design, inspect the 3D assemblies, review the selected parts or rebuild the firmware. The package retains the original engineering filenames and includes file checksums.

Building a coffee appliance around this architecture?

Share your coffee process, supply voltage, load interfaces, enclosure dimensions and sensor placement. These define the control configuration, power assembly and mechanical integration work.

Send an engineering inquiry

3D CAD views of the STM32 main controller and ESP32-C3 interface boardsOpen full-resolution PNG