Ulrich Lehner

Building a Better Gaggia Classic · Part 3

How the Gaggia Classic Works, Stock and with a GaggiMate

The 2004 Gaggia Classic part by part: water path, factory wiring, thermostat, over-pressure valve and solenoid valve in section, a fault-finding table, and what a GaggiMate Pro changes. With both diagrams as printable A4 PDFs.

Looking down into the open housing of the restored Gaggia Classic with its factory wiring, the top of the boiler with the two thermostats and their labelled spade connectors, the copper pipe to the steam valve knob on the right, the red pump at the top left and the four switch terminals at the bottom

How a 2004 Gaggia Classic works inside, as two sheets of seven panels: the stock machine, and the same machine with a GaggiMate Pro. Each panel is below with its key; the sheets are also printable on two A4 pages each.

This is Part 3 of the series, a reference for the first two: the machine is the one from the restoration (Part 1) and the GaggiMate conversion (Part 2).

Overview

Gaggia Classic (2004): How It WorksPDF · 182 kB · two A4 pagesDownloadGaggia Classic (2004) with GaggiMate Pro: How It WorksPDF · 214 kB · two A4 pagesDownload

Reading the drawings

All drawings on this page share one set of colours and symbols. A number in an amber circle is Gaggia's part number and means the same part in every drawing and table.

Legend: a blue arrow is water, a red dashed arrow a pressure release, a black line 230 V, an amber dotted line low voltage; a green box is a valve, an amber box electrics, a blue box a water-filled part, a grey box the body or the drain; a number in an amber circle is a Gaggia part number from wiring drawing SAE 0299
Simplified, not to scale.

Stock Classic

Factory state, after Gaggia's parts drawing ER0182 and wiring drawing SAE 0299. Pull the plug before any measurement.

Operating states

Which switches are on in each state of the machine, and what heater, pump, solenoid valve and lights then do. The numbers are the parts in the wiring: main switch 1, brew switch 9, steam switch 7, thermostats 4 and 5.

StateSwitches onHeaterPumpSolenoid valveLights
Heating upmainon until thermostat 4 opens (107 °C)offoff: boiler shut, group to drainpower on, ready off
Readymainswitched by 4, around 107 °Coffoffready on; off while the heater runs
Brewingmain, brewswitched by 4onon: boiler to group, drain shutready on and off with the heater
Shot endsmainswitched by 4offoff: group to drainas before
Steammain, steam; knob openon until thermostat 5 opens (145 °C)offoffready off while heating, then on
Hot water, refillmain, steam, brew; knob openas for steamonoff: pole b of the steam switch is openas for steam

Water path

Water path of the stock Gaggia Classic. The water tank feeds the Ulka vibration pump (10), which pushes through the over-pressure valve into the aluminium boiler; a dashed red line runs from the over-pressure valve back to the tank. On the boiler sit the coffee thermostat (4, opens at 107 °C), the steam thermostat (5, opens at 145 °C) and the thermal fuse (3, 184 °C); the heating element (6) is cast into the boiler. A copper standpipe takes the brew water from high up in the boiler down to the 3-way solenoid valve (8), which sends it to the brew group, the portafilter and the cup, and vents the group through a dashed red line into the drip tray. From the top of the boiler a line runs to the steam valve and the Pannarello steam wand
  • Brewing: tank, pump, over-pressure valve, boiler, standpipe, solenoid valve, group, puck, cup.
  • Heating up: with every valve shut the heated water expands; above its set pressure the over-pressure valve lets the excess back to the tank.

Wiring

Factory wiring diagram of the Gaggia Classic between live L and neutral N. Main switch 1 in the live; thermal fuse 3 (184 °C, one-shot) in the neutral. Between them in parallel: power light 2; the coffee thermostat 4 and the steam thermostat 5 in series with the heating element 6 (two elements in series, 1425 W), with ready light 11 across the thermostats; the steam switch 7 with pole a bridging thermostat 4 and pole b feeding the solenoid coil 8 (about 1200 ohms); the brew switch 9 feeding the Ulka pump 10 through a diode and, through pole b, the coil
  • Coffee position: 4 and 5 are in series and 4 opens first: about 107 °C. Steam position: pole a bridges 4, so 5 holds about 145 °C.
  • Pole b feeds the solenoid coil only in the coffee position. With steam on, the brew switch runs the pump alone: hot water from the wand.
  • Ready light 11 sits across the thermostats: dark while they are closed, lit when they open. After steaming it stays lit because the boiler is too hot; flush until it goes out, then wait until it comes on.
  • Pump 10: the diode passes every other half wave, so the piston strokes 50 times a second: the buzz.

This machine: two elements of about 22 Ω; at the socket the heater delivers about 1150 W, not the 1425 W of the type plate.

Thermostat

A snap-disc thermostat in section, twice, each on its brass base on the boiler. Left, cold: the bimetal disc bows down, the ceramic pin lets the spring arm press onto the fixed contact, and an amber arrow shows the current flowing through. Right, hot: the disc has snapped over and bows up, the pin lifts the spring arm, a gap opens and no current flows. Letters a to e mark terminals, contacts, ceramic pin, bimetal disc and brass base
  • (a) Terminals: to the wiring.
  • (b) Contacts: a spring arm pressed onto a fixed contact.
  • (c) Ceramic pin: passes the movement on, does not conduct.
  • (d) Bimetal disc: at its temperature it snaps over in one go.
  • (e) Brass base: screwed onto the boiler, brings the warmth to the disc.

Closed, current flows to the heater and the ready light stays dark; open, the heater is off and the light comes on. Some degrees cooler the disc snaps back, so the boiler never holds an exact temperature. A cold thermostat reads about 0 Ω.

Over-pressure valve

The over-pressure valve in section on top of the boiler, twice. Left, closed below the set pressure: from the top the hex adjuster, the spring and the piston with its seal sit on the seat; water from the pump enters from the side under the seat and flows down into the boiler. Right, open above the set pressure: the spring is compressed, the piston has lifted off the seat, and a dashed red arrow shows the excess leaving through the side port to the tank. Letters a to f mark adjuster, spring, piston, seat, inlet from the pump and the port back to the tank
  • (a) Adjuster: 5 mm hex; clockwise raises the set pressure.
  • (b) Spring: holds the piston on the seat.
  • (c) Piston: with a seal underneath.
  • (d) Seat: nothing gets past below the set pressure.
  • (e) From the pump: under the seat and on into the boiler.
  • (f) Back to the tank: opens above the set pressure.

It caps the pump's up to 15 bar and lets out the expansion of the shut boiler. Gaggia publishes no factory setting for the 2004 Classic (the later Classic Pro ships at about 12 bar, the Evo Pro at 9 bar).

This machine: 8.5 bar after the restoration, 12 bar since 18 October 2026.

3-way solenoid valve

The 3-way solenoid valve in section, twice. Left, coil off: the spring pushes the plunger down, its lower seal shuts the inlet from the boiler, and a dashed red line runs from the group port up through the exhaust bore in the fixed core to the drip tray. Right, coil on: the energised coil pulls the plunger up, its upper seal shuts the exhaust, and a blue line runs from the boiler inlet out through the group port. Letters a to h mark coil, fixed core, spring, plunger, inlet nozzle, inlet, group port and exhaust
  • (a) Coil (8): pulls the plunger up while it is on.
  • (b) Fixed core: with the exhaust bore.
  • (c) Spring: pushes the plunger down.
  • (d) Plunger: a seal at each end.
  • (e) Inlet nozzle: its rim is the seat of the lower seal.
  • (f) Inlet: from the boiler, through the standpipe.
  • (g) Group port: to the brew group.
  • (h) Exhaust: to the drip tray.

Coil off, the lower seal shuts the inlet and the group vents: the "pfft". Coil on, the upper seal shuts the exhaust and water flows to the group. A working valve clacks and then hums while the coil is on. With the coil off only the spring holds the lower seal against the boiler pressure; a dirty or worn seal lets boiler water through the valve into the drip tray.

This machine: boiler and water circuit are tight. Only the valve's lower seal does not shut completely, so a little water passes to the drip tray: 8.4 bar in the GaggiMate's pressure test with the valve closed, 13 bar against the blind filter.

Fault finding

SymptomLikely causeHow to checkSee
No power light, nothing worksThermal fuse 3 blown (boiler overheated)Fuse 0 Ω when intact; check cord, switch 1Wiring
Cold boiler, ready light onThermostat 4 or 5 stuck openCold thermostats read 0 ΩWiring, Thermostat
Cold boiler, ready light offHeating element openAbout 22 Ω per element; infinite to the bodyWiring
Pump runs, group stays drySteam switch on, or solenoid valve stuckSteam switch off; the coil should click and humWiring, Solenoid valve
Pump buzzes, no waterAir in the pump, or no water at the intakeFill the tank, open the knob, pump until the wand runsWater path
Drip tray fills while heatingSolenoid valve: lower seal does not shut fullyGaggia's 20-minute test; clean, renew the plungerSolenoid valve
Wet puck, portafilter dripsSolenoid exhaust blocked by scaleNo "pfft" after the shot; descale the valveSolenoid valve
Low pressure on a gaugeOver-pressure valve set low, or dirt on its seatAdjuster clockwise raises it; clean the seatOver-pressure valve
Burnt taste after steamingBoiler still near 145 °CFlush until the ready light goes out, then wait for itOperating states, Wiring

With a GaggiMate Pro

The GaggiMate Pro replaces both thermostats with a probe and a PID controller, switches the heater through a solid-state relay (SSR), and measures pressure and drives the pump. Valves, pump and boiler stay as at the factory; the switches only tell the controller what to do. Figures are firmware v1.10.0 defaults.

What the conversion changes, part by part
FunctionFactory (2004)With GaggiMate
Brew temperatureThermostat 4 switches the heater at 107 °CPID holds the set target
Steam temperatureThermostat 5 opens at 145 °CPID to 145 °C; thermostat 5 removed
Switches 7 and 9Carry 230 V to pump, valve and heaterLow-voltage inputs to the controller
Pump 10Full power while switch 9 is onPower from the profile, set per half wave
Solenoid valve 8On with switch 9, via pole b of switch 7Switched by the controller
PressureSet by the over-pressure valve aloneMeasured; the valve stays the upper limit
Overheat safetyThermal fuse 3Thermal fuse 3, kept

Operating states with GaggiMate

What starts each state now, and what the controller then does with heater, pump and solenoid valve.

StateStarted byHeaterPumpSolenoid valve
Standby15 min without inputoffoffoff: boiler shut
Heating, readytouching the display, or the brew switchPID holds target plus offsetoffoff: boiler shut, group to drain
Brewingbrew switch onPID; Kff adds heat while water flowsfollows the profile: pressure or flowon: boiler to group, drain shut
Shot endsend of the profile, or brew switch offPIDoffoff: group to drain
Steamsteam switch on; knob openPID to 145 °Cnear the target: 0.4 ml/s, up to 2 baroff
Hot waterWater on the display, then brew switch on; knob openPID to 80 °Cfull power, 2 min at mostoff

Water path with sensor

Water path of the Gaggia Classic with a GaggiMate Pro, the same as the stock one: tank, Ulka pump, over-pressure valve, aluminium boiler, standpipe, 3-way solenoid valve, brew group, portafilter, with the return to the tank, the exhaust to the drip tray and the steam valve with the wand. New are a pressure sensor at the pump outlet and a thermocouple in the hole of the coffee thermostat 4; the steam thermostat 5 is marked removed and the thermal fuse 3 stays. The solenoid valve is switched by the GaggiMate

New: a pressure sensor at the pump outlet and a thermocouple in the hole of thermostat 4. The steam thermostat is gone, the thermal fuse stays. With the valve closed the sensor also reads the boiler, so heating alone shows pressure (3.7 bar at 96 °C here).

Wiring around the controller

Block diagram of the wiring with the GaggiMate Pro controller in the middle: a 230 V supply that makes 5 V and 3.3 V for the board, the ESP32 that runs the PID, the profiles and the safety checks, a pump driver that lets half waves through or skips them, a valve switch for the solenoid coil, an SSR output and the sensor inputs. On the left in black, the 230 V side: mains with main switch 1 and fuse 3 in the neutral, the Ulka pump 10, the solenoid valve coil 8, and the SSR with the heater 6. On the right in amber dotted lines, the low-voltage side: brew switch 9, steam switch 7, the thermocouple in the hole of thermostat 4, the pressure sensor (0 to 5 V, at the pump outlet) and the display, powered by cable with its data by Bluetooth

Pump and solenoid coil hang on the controller; the heater runs through the external SSR. Brew and steam switch are low-voltage inputs. The display gets power by cable and data by Bluetooth.

Temperature loop

A thermostat is a switch: full power until the boiler is hot, then nothing, so the temperature swings by several degrees. The GaggiMate measures the boiler several times a second and gives the heater only as much power as it needs to reach the target and stay there.

The temperature control loop: target plus offset feeds the PID block with Kp, Ki and Kd, which drives the SSR (heater on for part of each second); an optional Kff block adds extra heat while water flows. The SSR switches the 1425 W heater, which warms the slow aluminium boiler; the thermocouple reads the boiler and feeds back into the PID
  • Target: the brew temperature set on the display.
  • Offset: the boiler wall runs hotter than the water at the puck, so the controller holds target plus offset (Classic preset 8 °C) and the display subtracts it again.
  • PID: reacts to the gap (Kp), to its history (Ki) and to its trend (Kd); the next section shows what each one does.
  • SSR: a solid-state relay; it switches the heater on for 0 to 1000 ms of every second.
  • Kff: adds heat in step with the pump flow while the valve is open; off once the boiler is 1 °C above target.
  • Steam and hot water: the same loop with other targets, 145 °C and 80 °C by default.

Tuning: Kp, Ki, Kd and Kff

Every second the controller decides how long the heater may run in the next second. It adds up four parts, each answering one question about the boiler, and each K says how much its answer counts:

  • Kp, the present: how far below the target is the boiler now?
  • Ki, the past: for how long has it been off?
  • Kd, the trend: how fast is the gap growing or closing?
  • Kff, ahead: how much cold water is flowing in right now?

The autotune measures the boiler and sets Kp, Ki and Kd; Kff is optional. The charts show what turning one value up or down does during a shot, simulated, so only the shapes matter: top the boiler temperature (dotted: the target), bottom the heater power.

Legend for the four charts: a grey line is the balanced setting, a red line the value turned up, a blue dashed line the value turned down

Kp: how far off now

Chart of a shot with three Kp settings. Higher Kp (red): the boiler temperature dips least, then swings above the target; the heater power peaks sharply. Lower Kp (blue dashed): the deepest dip and a slow, late rise past the target

The bigger the gap, the more heat, like pressing the accelerator harder the further a car is below the speed it should go. Higher: smaller dip, but the temperature swings. Lower: deep dip, slow rise.

Ki: for how long

Chart of a shot with three Ki settings. Higher Ki (red): after the dip the temperature rises well above the target and stays there for a long time. Lower Ki (blue dashed): a calm, slow return to the target

Adds up every gap so far. A gap that lasts keeps this part growing until the gap is gone, which removes a small offset that Kp alone leaves. Higher: overshoots, and stays too hot for long. Lower: calm, but slow to settle.

Kd: how fast it changes

Chart of a shot with three Kd settings. Higher Kd (red): a calmer temperature curve but a jittery heater power line. Lower Kd (blue dashed): the temperature overshoots the target more after the shot

Watches how fast the gap changes and brakes before the target is reached, like easing off the accelerator as the car nears its speed. Higher: calmer temperature, jumpy heater power. Lower: more overshoot.

Kff: what flows in

Chart of a shot with three Kff settings. Higher Kff (red): heater power jumps up the moment the shot starts and the temperature runs above the target during the shot. Kff 0 (blue dashed): heat only follows the dip, so the temperature drops during the shot

Does not wait for the boiler to cool: while the pump runs it adds the heat the incoming cold water will need. Higher: hotter during the shot. Lower or 0: the temperature dips during the shot.

More details: the numbers, the autotune and this machine

The sum. The four parts give the heater time for the next second in milliseconds, between 0 and 1000. Kp is that time per degree of gap: with Kp 36.5, a boiler 1 °C below target gets about 36 ms of heat per second, one 10 °C below about 365 ms. Ki multiplies the gaps added up over time, Kd the change of the gap per second, Kff the heat the measured pump flow carries away.

The autotune heats the boiler for a set time and measures how fast it warms and how long it takes to react, then computes Kp, Ki and Kd from that. On firmware v1.9.0 and later it sits in the web interface under Settings, Calibration: start it with the boiler below 50 °C, test duration 120 s by default. It asks for the heater wattage and suggests 1360 W; enter what the heater really delivers. The firmware also derives Kff from it: 1000 divided by the wattage (1360 W gives 0.735).

This machine. At the socket the heater delivers about 1150 W, not the 1425 W of the type plate (Kff from that would be about 0.87). Three autotune runs between 31 October and 9 November 2026 measured heating rates from 0.70 to 1.8 °C/s, so the results scatter; a fourth hit the lowest values the firmware allows (Kp 20, Kd 50) and is unusable. The recipe for this machine stays with the values of the first run, Kp 36.526, Ki 0.450, Kd 389.444, and Kff 0: with Kff on, a shot started more than 1 °C above target lost 4 to 5 °C, one started closer gained 2 to 7 °C. The setup assistant of firmware v1.10.0 sets its own Classic preset (58.397, 1.027, 249.055); check the values after an update.

Pressure loop

The pressure control loop: the profile phase sets a target pressure or flow for the pressure control, which runs 50 times a second and drives the pump driver; the driver skips half waves of the Ulka pump; the pump pushes against the puck, which resists the flow; the pressure sensor at the pump outlet feeds back into the pressure control; a pump model block estimates flow and volume
  • Pressure target: the controller sets the pump power so the sensor reading follows the profile.
  • Flow target: the controller holds the flow its pump model predicts, with a pressure limit.
  • Pump driver: lets each half wave of the mains through to the Ulka, or skips it.
  • Over-pressure valve: still caps the pressure; set it above the highest pressure of your profiles.
  • Estimates: flow and volume come from the pump model, not a flow meter; without a scale they are approximate.
  • Phases: each phase ends after a time, a pressure, a flow or a volume, whichever the profile sets. A weight target counts only with a Bluetooth scale.

Fault finding with GaggiMate

SymptomLikely causeWhat to do
Display: control inhibitedDisplay and controller on different firmwareUpdate the controller too
Heater and pump stop (error 5)No sign of life from the display for 20 sCheck the link; restart both
Pressure stuck near 14.5 barBlack wire of the pressure sensor looseReseat the sensor wiring
Pressure near 16 barRed and black sensor wires swappedSwap them back
Temperature climbs during the shotKff on, shot started near the targetKff 0, or start hotter
Autotune fails or hangsNot started from a cold machineStart it cold, as the guide says
Pressure test under 10 barSolenoid valve does not shut fully with the coil offWater at the exhaust? Clean the valve
No heat, SSR LED darkSSR signal cable, or no heat requestCheck the cable while heating up

Sources