Skip to content
adnanakilPublic

About

A DIY smart moka pot: ESP32 touchscreen, in-boiler thermocouple, PID-controlled brewing with live pressure estimation. Built on ESPHome.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

MokaBot

A DIY smart moka pot: an electric moka pot rebuilt around an ESP32 touchscreen, a thermocouple drilled into the boiler, and a solid-state relay — giving you PID-controlled brewing, live water temperature and estimated pressure on a touchscreen, one-tap brewing, and automatic shutoff when the water runs out.

Built with ESPHome, so it's also a native Home Assistant device with OTA updates for free.

Inspired by Javier Tellols' MokaBot prototype (as featured in James Hoffmann's video) — this is an independent hobby build, not affiliated with that project.

MokaBot touchscreen in its printed case, showing 23.8 °C / 1.01 bar / OFF and START, STOP and TUNE buttons The thermocouple fitting sealed through the moka pot boiler wall, below the water line

What it does

  • PID temperature control of the boiler instead of a stove's all-or-nothing blast — brews sit at a steady ~101–102 °C plateau instead of scorching
  • True water temperature: the probe sits inside the boiler water through a sealed fitting, calibrated at the boiling point (reads 100.0 °C at a rolling boil, zero offset)
  • Live pressure estimation from water temperature via the Clausius–Clapeyron saturation curve — shown on screen in bar
  • Touchscreen UI: big temperature readout, pressure, status, and START / STOP / TUNE buttons
  • End-of-brew auto-stop: water temperature physically cannot exceed ~102 °C while water remains; the firmware cuts power the moment the reading passes 106.5 °C (boiler just ran dry), with an independent 115 °C hard cutoff behind it
  • WiFi / Home Assistant / OTA via ESPHome's native API

Hardware

Part Notes
Electric moka pot Kettle-base style; the SSR splices into its supply cord
Elecrow CrowPanel ESP32 HMI 3.5" (V2.2) ESP32-WROVER, 320×480 display, resistive touch, HY2.0-4P pigtail connectors
MAX6675 module + M6-thread K-type thermocouple The common "M6 screw" kit; the screw body becomes the boiler penetration
SSR-40DA solid-state relay DC 3–32 V input, AC output; driven directly from a GPIO
2× PTFE flat washers 18×6×2 mm The boiler seal — PTFE, not nylon (nylon creeps at brew temps)
2× stainless fender washers 1/4" × 3/4" Back the PTFE so the nut bears on steel
2× M6-1.0 stainless nuts, PTFE thread tape

The probe install (the fun part)

Drill a 1/4" (6.5 mm) hole low on the boiler side wall — below the minimum water line, centered on a flat facet, clear of the safety valve and of where the funnel sits. Deburr, wash thoroughly. Stack, outside → inside:

probe head → steel washer → PTFE washer → boiler wall → PTFE washer → steel washer → M6 nut

PTFE tape on the threads, hold the probe body while tightening the nut (or the wires twist off), snug plus a quarter turn. Leak-test cold (fill above the fitting, sit on a dry paper towel 30 min), then hot — the fitting must hold at a rolling boil. Re-snug gently after the first heat cycle; PTFE relaxes once.

Then calibrate: heat to a rolling boil and check the reading. At sea level it should plateau at ~100 °C; whatever offset you see is your correction (ours was zero).

Wiring (CrowPanel-specific)

Signal Pin Physical
MAX6675 SO IO19 "SPI" pigtail, MISO wire
MAX6675 SCK IO18 "SPI" pigtail, SCK wire
MAX6675 CS IO21 "SPI" pigtail, CS wire
MAX6675 VCC/GND 3.3V / GND "I2C" pigtail outer wires
SSR input + IO23 "SPI" pigtail, the spare MOSI wire
SSR input − GND joined with the MAX6675 ground outside the connector
Mains — live conductor cut, ends on SSR terminals 1/2, pot in series

Hard-won board gotchas (see mokabot.yaml comments):

  • The I2C pigtail's middle pins (IO32/IO25) do not carry GPIO signals on this board despite the silkscreen — don't use them for outputs.
  • Display (ST7796-compatible) and XPT2046 touch share one SPI bus (CLK 14 / MOSI 13 / MISO 12, CS 15 and 33). With MISO on the bus it runs full-duplex — keep the display at 20 MHz or it white-screens on boot.
  • Touch needs transform: mirror_y: true.
  • The panel has no reset line: a garbled init survives warm reboots; only a power cycle clears it. The firmware parks the display CS high at earliest boot to prevent it.
  • IO26 is the speaker amp, IO27 the backlight, IO35/IO39 input-only.

Firmware

pip install esphome
cp secrets.yaml.example secrets.yaml   # fill in your WiFi
esphome run mokabot.yaml               # first flash over USB, then OTA forever

diag.yaml + probe.h is a standalone GPIO pair-sweep diagnostic that finds which pins a MAX6675 actually responds on — invaluable when your wiring and the silkscreen disagree. Edit the candidate pin list before using it on a different board (it excludes flash pins, UART, and the SSR pin for this one).

Using it

Fill the boiler to just below the safety valve (same fill every time = repeatable brews), grind moka-fine, level basket, no tamping. Tap START. The pot heats, holds a steady brew plateau, and shuts itself off when the water's gone. Watch the pressure readout climb from 1.01 bar to ~1.1 as the coffee extracts.

TUNE runs the ESPHome PID autotuner. Do this with water only and a target below boiling (e.g. 96 °C) — during a real brew the bed back-pressure caps the water at ~102 °C, the target is never crossed, and the tuner can't converge; a boiling-clamped water-only run at 105 °C fails the same way.

Case

case/ has a parametric OpenSCAD enclosure (plus ready-to-print STLs) that houses the CrowPanel, SSR, and MAX6675. See case/README.md.

⚠️ Safety

This project splices a relay into mains wiring and drills a hole in a pressure vessel. Do not attempt unless you're comfortable with both. Never modify or block the safety valve — it's the one part of the pot that must stay stock. The firmware's cutoffs (106.5 °C brew stop, 115 °C hard cutoff) are convenience layers, not substitutes for the valve or for supervision. Mains can kill you; unplug before touching the wiring.

License

MIT

About

A DIY smart moka pot: ESP32 touchscreen, in-boiler thermocouple, PID-controlled brewing with live pressure estimation. Built on ESPHome.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages