
From Hidden Variables to (mostly) Deterministic Extraction
Six months ago, I purchased a Gaggia Classic Pro. My initial model of espresso production was functionally naive: input water, input heat, press button. I assumed a linear process where pressurized hot water would flow through a coffee bed, resulting in a nice espresso shot.
I quickly learned that espresso is not a linear process; it is a complex, multivariate optimization problem.
The first hurdle is the standard variable we all learn to manipulate: grind size. You have to iterate on this constantly to pull a shot that exists in the narrow window between "battery acid" and "ashtray."
The fundamental problem with a stock machine like the Gaggia Classic Pro is that grind size is not the only variable dictating the final cup. The final coffee taste—which is essentially just the specific distribution of molecules extracted from the solid coffee grounds into the liquid phase—depends heavily on "hidden variables" that the user cannot easily see or control on a stock machine.
The two most critical hidden variables are:
- Water Pressure Profile: Not just the maximum pressure, but how fast that pressure ramps up and sustains.
- Water Temperature Stability: The precise temperature of the water hitting the puck at second 1 versus second 25.
To improve the probability that these hidden variables remain consistent between shots, the Gaggia community has developed various "analogue" techniques to combat the machine's inherent randomness:
- Temperature Surfing: Manually timing the shot against the boiler's heating cycle thermostat click to try and catch the water at the peak of its thermal energy, attempting to mitigate the stock boiler's massive thermal hysteresis.
- "Poor Man's" Pre-infusion: Cracking the steam valve open slightly during the initial pump engagement to bleed off pressure, artificially creating a low-pressure pre-wetting phase before full 9-bar extraction.
- OPV Spring Mod: Physically replacing the spring in the Over-Pressure Valve to force the static output pressure down from the stock (often too high) 12 bars to the industry-standard 9 bars.
I struggled significantly with these techniques. They require a level of manual dexterity and timing that felt less like science and more like divination. Furthermore, the fact that I personally struggle to clearly distinguish between bitter versus sour flavor notes made this manual feedback loop even more frustrating. If my palate isn't a reliable sensor, I need my input variables to be absolute constants.
I decided that I needed to stop guessing. I needed to take these hidden variables and make them visible, quantifiable, and controllable.
Enter the Gaggiuino

The machine before disassembly

Starting the disassembly

Testing the Gaggiuno hardware

Fully disassembled
While surfing, I found the Gaggiuino project, an open-source modification for the Gaggia Classic (and other similar machines). It replaces the simplistic on/off pump control with a sophisticated digital interface that can monitor and control both pressure and temperature in real-time.
The core of the Gaggiuino system is an STM32 or ESP32-based microcontroller board paired with:
- A pressure transducer that provides live pressure readings (0-16 bar resolution).
- A thermocouple or PT100 probe for high-precision temperature measurement.
- Solid-state relays (SSRs) that control the pump and heating element via pulse-width modulation (PWM).
- An optional Nextion touchscreen display or OLED for real-time data visualization and profile selection.
- Scale integration for weight-based shot stopping.
Unlike the stock Gaggia, which operates the pump at a fixed voltage (and thus fixed pressure), the Gaggiuino can actively adjust pump power throughout the shot. This is called pressure profiling.
Similarly, instead of relying on a mechanical thermostat (which has a thermal hysteresis of several degrees Celsius), the Gaggiuino implements a PID controller for the heating element, keeping water temperature within ±0.1°C of the target setpoint.

Gaggiuno control display
The Gaggiuino update transforms espresso making from a stochastic attempt at aligning hidden variables into a repeatable scientific experiment.
Now, when I pull a shot, I can see:
- The exact pressure curve (in real-time).
- The exact water temperature at the group head.
- The flow rate (derived from pump duty cycle).
- The total shot weight (via integrated scale).
More importantly, I can control these variables. I can program a "bloom" profile that starts at 2 bars for 10 seconds, then ramps linearly to 9 bars over 5 seconds, then declines to 6 bars for the remainder of the shot. I can set the boiler to precisely 93.0°C and trust that it will hold that temperature within 0.1°C throughout the extraction process.
This removes the guessing. It removes the manual dexterity requirement. It removes the need for my subjective taste calibration to act as the sole feedback mechanism. If I change one variable and the shot tastes worse, I know exactly which variable I changed and by how much.
The Gaggiuino doesn't just make better espresso—it makes repeatable espresso. And in a process as sensitive as extraction chemistry, repeatability is everything.