Skip to the content
PCBKitNew board
2 layers111.8 × 57.2 mmGaggia print, the printed circuit board in 3D

Gaggia print

rvt/espgaggia31

Automate your gaggia classic or other machine...

Size
111.8 × 57.2 mm
Copper layers
2
Thickness
1.6 mm
Parts
29
Nets
49
Pads
134
Tracks, vias
325, 12
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
2 Feb 2021
Updated
2 Jun 2026

Overview

Gaggia print is an open-source printed circuit board by rvt, from the rvt/espgaggia repository on GitHub, published under the MIT licence. It is a 2-layer board of 111.8 × 57.2 mm with 29 parts on 49 nets, routed with 325 tracks and 12 vias.

It is built around the HLK-PM01 and G3MB-202P DC5. Its parts include 11 connectors, 7 ICs, 2 resistors, 2 transistors and 1 capacitor. It belongs with the ESP32 boards of this library.

Main components

2

README

README.md

License: MIT

Design Goal

A make a gaggia coffee machine more smart and make it such that is would be easy to duplicate with least amouth of soldering.

Features

  • Control temperature of both stream and brew and set temperature with a touch display (Fuzzy Logic)
  • pre-infuse your coffee
  • Make recipes using a simple scripting language with menu's controle brew/preinfuse timings and temperatures
  • Standby + Remote turn on (Using MQTT and SIRI)
  • Deep sleep option (work in progress)
  • Stand by and power down options with a lower temperature to conserve energy.

How it looks like...

MainMenu ScreenSettings ScreenMounted on Gaggia

Word Of Warning

Please read this carefull!

If you are going to build this project you have to understand you will be working with dangerous voltages and high temperatures! Although I did my best to use standard components that I think are reliable, I cannot be held responsible for any damages to your machine, yourself or the surroundings in any way possible.

Compilation

bash
rvt$ pio run
Processing gaggia (platform: espressif32; framework: arduino; board: esp32dev)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (2.1.0) > Espressif ESP32 Dev Module
...
...
...
|-- <WiFi> 1.0
Building in debug mode
Retrieving maximum program size .pio/build/gaggia/firmware.elf
Checking size .pio/build/gaggia/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [===       ]  25.6% (used 84048 bytes from 327680 bytes)
Flash: [=======   ]  72.6% (used 1427385 bytes from 1966080 bytes)
============== [SUCCESS] Took 4.41 seconds ==============

To upload to your esp32 device run the following command (OSX):

text
platformio run --target uploadfs -e gaggia
platformio run --target upload -e gaggia

To update over Over The Air (OTA):

text
platformio run --target uploadfs -e gaggia --upload-port <IP or DOmain name of device>
platformio run --target upload -e gaggia --upload-port <IP or DOmain name of device>

For other compiler options check config.hpp and platformio.ini for other options.

Configuration

The device will use the know wifi network or it wil present itself as a WIFI accesspoint using a wifimanager. Just connect to that accesspoint and open a browser to configure WIFI andf MQTT. By default it will have some scripts to do some of it's work. Check the data directory that is almost self explanatory on how it works.

Scripting

Well, it's not really scripting because the scripting capabilities are very limited, only simple jumps and no math. See it like more like a PLC function where you can make decissions, jump or wait at various points within the process and controle the state of the machine

CommandTypeValuesExplanationExample
jumpStringlabel nameJump to a specific labeljump=foo;
skipThis=1;
label=foo;
Jump to label foo skiping the line skipThis
labelStringany stringA label jump can jump intoSee Jump
valvebool1 or 0Turn on the 3 way valvevalve=1;Turn on the 3 way valve
pumpbool1 or 0Turn on the pumppump=1;Turn on the pump
brewModebool1 or 0Setup the controller to read brew sensor temperature. Otherwise read temperature from steam sensorbrewMode=1;
brewTempfloat or valueRef0..160 or stringSet a desired temperature and enable brewMode, wait untill reached or abovebrewTemp=95;
brewTemp=fromConfig;
Set the brew temperature to 95 degrees. Or read the desired temperature from the fromConfig value in gaggiaCfg.conf
steamTempfloat or valueRef0..160 or stringSetup the controller to read steam sensor temperature. Otherwise read temperature from steam sensorsteamTemp=150;
setTempfloat or valueRef0..160 or stringSet a desired temperature, similar to brewTemp but do not waitsetTemp=95;
setTemp=fromConfig;
incTempfloat or valueRef-160..160Increase or decrease from current temperatureincTemp=-5;
incTemp=fromConfig;
countint or valueRef1..32000Loop a number of times (minimal 1 time)count=5,do5Times;
MessageString,StringShows a message box on the first screenMessage=Message,Title;Display a message 'message' with title 'Title'
MessageOffint0 or 1When 1 immediatly hdoe the message box. When 0 wait 5 seconds untill it's hiddenMessageOff=0;Hide the message box after 5 seconds.
loadStringany valid script filenameLoad a new scriptload=/foo.txt;Load a new script with filename foo.txt, / is mandatory
SteamButtonbool1 or 0Wait for the steam button to have a specific valueSteamButton=1;Wait untill the steam button is pressed
BrewButtonbool1 or 0Wait for the brew button to have a specific valueBrewButton=0;Wait untill the brew button is released
BrewOrSteamButtonbool,String,String,bool1 or 0,label,label,1 or 0Wait for the brew or steam button to have a specific valueBrewOrSteamButton=1,jumpBrew,jumpSteam,1;Wait untill Brew or Steam is set (first bool is set or unset) jump to brew or steam, when non is set wait (0) or continue 1
BrewAndSteamButtonbool1 or 0Wait for the brew and steam button to have a specific valueBrewAndSteamButton=1;Wait untill the brew and steam button are in a pressed state

Example of the Cappuccino script

Note, current scripting version does not support of adding comments, but they are added in the below script for clarity

Explanation of cappuccino.txt

text
pump=0; # Turn of pump (if it was on)
valve=0; # Turn of valve (if it was on)
SteamButton=1,steamIsOff; # If the steam button was set, continue to next line, otherwhsie jump to the steamIsOff label
Message=Turn off Steam,Cappuccino; # If steam was on, display message asking to turn off
SteamButton=0; # Wait here untill the steam button is in the off position
label=steamIsOff; # label that is skipped, or can bu jumped onto
Message=Press brew to start,Cappuccino; # Displat message with title
BrewButton=1; # Wait untill the brew button is pressed
Message=Wait for brew temperature; # Show message taht it is waiting untill brew temperaure is reached
brewTemp=defaultBrewTemp; # Set brewmode and temperature from configuration and wait untill temperature is reached
Message=Preinfusing...; # Display pre-infusing message
valve=1; # Turn on valve
wait=100; # wait 100ms
pump=1; # Turn on pump
wait=2000; # Wait 2 second
pump=0; # Turn of Pump
wait=5000; # Wait 5 seconds
Message=Brewing; # Display brewing
pump=1; # Turn on pump again
wait=30000; #Wait 30 seconds
pump=0; # Turn off pump
wait=100; # Wait 100ms
valve=0; # Turn off valve
Message=Done; # Display done message
wait=2500; # Wait 2500ms
MessageOff=1; #Hide message box
Script Limitations:
  • A script file can currently be a maximum of 768 bytes. (See platformio.ini)
  • Every line must be ended with an ;
  • Scripting is still under (slow) development, let me know if you use it and/or have ideas
  • See data directory for full working examples

MQTT Messages

Messages can be send as simple string (properties format) or as JSON.

json
{
    "tempBrew":49.50,
    "tempSteam":50.00,
    "setPoint":10.00,
    "boiler":0.00,
    "brewBut":0,
    "steamBut":0,
    "pump":0,
    "valve":0
}

Scripting

See data directory for examples (this is still work in progress, but it works right now well enough for me to beabke to publish, however they are subject to change.

Hardware and Connection

Note: For latest component set check the KiCAD schematic.

note: For the MAX31855K make sure you get the 'fancy' one, that is proper dialectric consensator, NOT the one with just two components

Connection diagram

For pins in platformio.ini

WARNING schematic needs further verification It's now verified and work's well after 6 months. See KIA Print for latest version.

images images

Hardware and functions Tested

  • TFT/Touch display (ILI9341)
  • Temperature sensors
  • Buttons
  • SSR
  • Temperature control
  • Scripting
  • Power save and powerdown
  • Update values over MQTT

Homebridge

JSON Configuration for homebrige so you can turn on and off the machine with SIRI. ID OF ESP32 is in the form of XXXXXXXX. Use a tool like http://mqtt-explorer.com to see the messages

json
 {
            "accessory": "mqttthing",
            "type": "outlet",
            "name": "Gaggia",
            "url": "<MQTT URL>",
            "username": "<mqtt username>",
            "password": "<mqtt password>",
            "integerValue": true,
            "confirmationPeriodms": 250,
            "onlineValue": "online",
            "offlineValue": "offline",
            "retryLimit": 2,
            "topics": {
                "getOnline": "gaggia/<ID OF ESP32>/lastwill",
                "getOn": {
                    "topic": "gaggia/<ID OF ESP32>/status",
                    "apply": "var m=JSON.parse(message); return m.setPoint>40;"
                },
                "setOn": {
                    "topic": "gaggia/<ID OF ESP32>/config",
                    "apply": "return message==1?'on=1':'on=0';"
                }
            }
        }

Parts

29
QtyValueFootprintReferences
4M3MountingHole:MountingHole_3.2mm_M3M3, M3, M3, M3
210KResistor_THT:R_Axial_DIN0411_L9.9mm_D3.6mm_P12.70mm_HorizontalR3, R4
22N2222Package_TO_SOT_THT:TO-18-3Q1, Q2
2G3MB-202P_DC5private_library:G3MC-201PLU4, U5
2MAX31855K_printprivate_library:QS2016039-MAX31855KU6, U7
2MAX31855K_printprivate_library:CJMCU-MAX31855KU1, U2
1220VTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ3
13V3Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ6
15VDConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ11
1Brew BtnTerminalBlock_Phoenix:TerminalBlock_Phoenix_PT-1,5-2-3.5-H_1x02_P3.50mm_HorizontalJ1
1CPCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC1
1DisplayConnector_PinHeader_2.54mm:PinHeader_1x14_P2.54mm_VerticalJ7
1ESP32-DEVKITC-32Dprivate_library:MODULE_ESP32-DEVKITC-32DU3
1FuseFuse:Fuseholder_Cylinder-5x20mm_Stelvio-Kontek_PTF78_Horizontal_OpenF1
1GNDDConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ4
1HLK-PM01Converter_ACDC:Converter_ACDC_HiLink_HLK-PMxxPS1
1Misc 1234Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ5
1PumpTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ9
1SSR BoilerTerminalBlock_Phoenix:TerminalBlock_Phoenix_PT-1,5-2-3.5-H_1x02_P3.50mm_HorizontalJ10
1Steam BtnTerminalBlock_Phoenix:TerminalBlock_Phoenix_PT-1,5-2-3.5-H_1x02_P3.50mm_HorizontalJ2
1ValveTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ8

Questions

How big is the Gaggia print PCB?

It measures 111.8 × 57.2 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Gaggia print use?

29 parts, built around the HLK-PM01 and G3MB-202P DC5. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Gaggia print KiCad files?

From the rvt/espgaggia repository on GitHub, at the commit this page was made from: the board is kicad/gaggia_print/gaggia_print.kicad_pcb and its schematic kicad/gaggia_print/gaggia_print.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Gaggia print design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers148.5 × 117.3 mmNew kicad, the printed circuit board in 3D

    New kicad

    rajeev2705/PROJECTS

    Welcome to my PCB projects repository! This space is dedicated to documenting my journey in designing, creating, and improving printed circuit boards (PCBs).

    79 parts
  • 2 layers121 × 68 mmFreeds sanchez, the printed circuit board in 3D

    Freeds sanchez

    pablozg/freeds

    Derivador de energía solar excedente creado por Pablo Zerón, Diseño PCB por Amcalo, Tester original por Aeizoon, Wiki por Zoilo Mora

    42 parts108
  • 2 layers129.9 × 63.6 mmTraeger rev 2.3.0.kicad pro, the printed circuit board in 3D

    Traeger rev 2.3.0.kicad pro

    jazzmonger/Traeger-PID-Controller

    Traeger Smoker/Grill Controller based on an

    45 parts36
  • 2 layers89.8 × 72.1 mmHestiaPiOneUniversal, the printed circuit board in 3D

    HestiaPiOneUniversal

    HestiaPi/hestia-touch-pcb-dev

    Testing release for the PCB files for HestiaPi Touch

    18 parts11GPL-3.0
  • 2 layers93 × 61 mmZero crossing detector, the printed circuit board in 3D

    Zero crossing detector

    cs2dsb/zcssr

    A PCB and software for a SSR controller that monitors mains AC zero crossings to determine when to turn the SSR on.

    98 parts10Apache-2.0
  • 2 layers99.1 × 58.4 mmHEAT, the printed circuit board in 3D

    HEAT

    milar111/HEAT

    An open-source STM32 SMD assembly station for precision soldering. Uses a custom Smart Pulse & Coast algorithm to drive 400W mains heaters via SSR. Features OLED UI, NTC feedback, and safety cooling.

    57 parts9
  • 2 layers75 × 75 mmHotPlateController, the printed circuit board in 3D

    HotPlateController

    stasiselectronics/HotPlateController

    A simple ESP32 connected controller for a SMD reflow hot plate

    47 parts9