Hardware

What you need to build one

Discreet was designed on a Gaggia Classic Pro and suits most single boiler machines. Here are the parts and where each one connects.

Mains voltage. An espresso machine runs on mains power and has a boiler under pressure. Only wire one up if you're confident working with both, and always unplug the machine first. The machine's own thermal fuse and steam thermostat should stay in place.

Parts

PartWhat it does
ESP32 DevKit (ESP-WROOM-32)Runs everything: heater, pump, scale, web pageRequired
K-type thermocouple and MAX6675 boardReads the boiler temperatureRequired
Solid state relay (SSR)Switches the heater for PID controlRequired
Pump dimmer with zero-cross outputControls pump power for pressure profiling, and reads the brew switchRequired
Pressure sensor, 0 to 12 bar, 0 to 3.3 V outputCloses the pressure loopRequired
SD card module and card (FAT32, 32 GB or smaller)Holds the web page, settings and profilesRequired
BuzzerBeep codesRequired
HX711 board and load cellBrew by weight with no phone or scale neededOptional
Bluetooth scale (KP2048B protocol)Brew by weight; used first when connectedOptional
Relay module and solenoid valveReleases the pressure at the stop weightOptional
Waveshare ESP32-S3 Touch LCD 7BThe 7 inch touchscreenOptional

For brew by weight you need either the load cell or the Bluetooth scale. The machine uses the Bluetooth scale when it's connected, and the load cell otherwise.

Pin map

Every pin is set in one file, pins.h, so if a wire moves, that's the only thing to change.

FunctionGPIO
SD card CS / MOSI / MISO / SCK32 / 25 / 26 / 33
Heater SSR13
Dimmer zero-cross (also reads the brew switch) / output19 / 18
Thermocouple (MAX6675) CS / CLK / DO22 / 23 / 21
Pressure sensor (0 to 12 bar, 0 to 3.3 V)34
Buzzer4
Load cell (HX711) DT / SCK16 / 17
Pressure release relay (active low)27

Spare pins: 14 is free for output. 35, 36 and 39 are input only. Avoid the boot pins 0, 2, 5, 12 and 15.

Software versions

If you build the firmware yourself in the Arduino IDE, match these versions. The ready-made firmware file skips all of this: see the install guide.

ItemVersion
ESP32 board package (Espressif)2.0.17 (the dimmer library doesn't work with 3.x)
Partition schemeDefault 4MB with spiffs
ArduinoJson7.4.3
Dimmable Light for Arduino1.6.0
MAX6675 library (Adafruit)1.1.2
PID (Brett Beauregard)1.2.0
NimBLE-Arduino2.6.0
HX711 Arduino Library (Bogdan Necula)0.7.5

The exact library set is shared as a zip on the Discord. The source is in the Discreet_v2.0 repository.