Gage Langdon Next →
The Gaggia's shell open on a desk, surrounded by loose wiring, the relay module, and a soldering iron, mid-build, with the city out the window behind it.

Espresso

Putting a computer in our espresso machine

Gutting a Gaggia Classic's mechanical guts for a Blackpill microcontroller running Gaggiuino, then handing the whole thing over to Home Assistant every morning.

This page was drafted by Claude.

Our espresso machine is a Gaggia Classic Pro, about $600 out of the box, and it is a purely mechanical device. There’s no computer in it anywhere. A vibration pump pushes water through a fixed pressurestat, a bimetallic thermostat clicks the heater on and off around a rough temperature band, and that’s the entire control system: springs and metal, no sensors, no logic, no memory of what it did last time. It makes a fine shot if you already know what you’re doing and you’re willing to babysit it.

Gaggiuino is an open source project that rips that mechanical control loop out and replaces it with a microcontroller, a thermocouple, a pressure transducer, and a dimmer module wired between the pump and the wall. Instead of a thermostat guessing at temperature and a pressurestat guessing at pressure, you get real PID temp control, pressure profiling, and flow profiling, the same category of control you’d otherwise pay for in a machine that costs multiple thousands of dollars out of the box. Same $600 Gaggia on the outside, a completely different machine on the inside.

Why this is worth doing

A machine with actual shot profiling, meaning it can vary pressure and flow through the shot instead of just blasting a constant 9 bar, normally starts in the thousands of dollars. Gaggiuino gets you there for the cost of a handful of electronics parts and an afternoon of soldering. I ordered every part for this build from AliExpress for about $80 total.

The build

I’m using the Blackpill (STM32F411) as the microcontroller and the “Lego” build path rather than a custom PCB, meaning individual off-the-shelf modules wired together on stripboard instead of one purpose-made board. It’s more soldering and more wires, but it’s more forgiving to build and easier to debug one module at a time.

A tangle of wiring connecting a relay module, an AC dimmer module, and a Blackpill microcontroller, all mounted in a 3D-printed housing.
The "Lego" build: separate modules for the relay, dimmer, and microcontroller, wired together instead of soldered onto one board.

It’s supposed to be an evening of soldering. Mine took closer to 8 hours, and a good chunk of that was late-night debugging with the kitchen counter covered in loose wires and tubing. Chelsea was reasonably worried the mess wouldn’t come back together in time for coffee the next morning, which is a non-negotiable requirement at our house.

Shopping list

This is the Gaggiuino project’s own bill of materials for the STM32 Blackpill Lego build:

The full build guide, including exactly how each of these gets wired together, is in the Gaggiuino docs, and the firmware itself is on GitHub. Flashing the Blackpill itself takes seconds; the display gets its settings and shot graphs from a separate update over the microSD card.

The Gaggiuino firmware source open in an editor, next to the Nextion display showing an SD card update in progress.
Flashing the firmware over the ST-Link, then updating the display separately over microSD.

Everything above gets buttoned back into the Gaggia’s original shell, behind its original power, brew, and steam switches. From the outside it still looks like the same $600 machine. Everything that changed is on the inside.

The finished electronics housing installed inside the Gaggia's shell, with the machine's original power, brew, and steam switches visible on the front panel.
Shoving all the shit into the machine. No one will ever know.

The first test run, after all of that: pressure builds, the pump ramps through its profile, and the boiler holds temperature instead of cycling a thermostat on and off. That’s the whole point of the project working in front of me for the first time.

“Holy shit it works!?”

Integrating with our smart home

This isn’t a standalone gadget, it plugs into the same Home Assistant setup that runs the rest of the house. Gaggiuino exposes what it’s doing over the network, so Home Assistant can watch it and act on it the same way it watches everything else.

The plan for mornings: Home Assistant turns the machine on well before I’m actually awake, so by the time I’m pouring a shot the boiler is already at temperature and the portafilter’s metal has had time to warm and expand, along with the rest of the nerdy perks that only matter if you actually care about the shot. If I forget to turn it off, or I’m just not home to do it, it turns itself off after sitting on too long.

In practice the boiler doesn’t need the full runway to be usable. It settles into a stable temperature after 15 to 20 minutes, but a decent shot is pourable after about 5, just with a bit of temperature fluctuation still working itself out. It matters more for steaming: steaming pulls heat out of the boiler while it’s still fighting to hold temperature, so a boiler that hasn’t stabilized yet ends up with noticeably lower steam pressure right when you need it most.

It’s not just the morning schedule either. Home Assistant lets me warm the machine up or shut it off from anywhere in the house, or from my phone. Espresso machines take real time to get up to temperature, and it’s common for me to be in back-to-back Zoom meetings and want a coffee in the gap between them. I can click a button on my work laptop to boot the machine up mid-meeting, so it’s ready to pour a shot the moment I’m free.

From there the machine does the rest on its own. While I’m groggy and late for a meeting, I can start a shot and walk away: it auto-regulates temperature, pressure, flow, and time to pull the best shot it can, and stops itself the moment it hits the target volume, usually around 35 seconds, which is enough time for me to get my cup ready with vanilla or caramel syrup. It then auto-heats to steaming temperature and regulates the water pressure feeding the boiler to hold a much higher steam PSI than the machine could ever manage stock. Night and day difference.

What’s next

The Gaggia is cool, but I think we’ve surpassed it. We’d appreciate something more mechanically capable than what a modded Gaggia can ever be, Gaggiuino included. What I’d actually love is a Decent DE1. One day.

A latte with rosetta latte art, viewed from directly above on a marble countertop.
All of that, for this.