ArduinoCoffeeMachine
Arduino PID controller for coffee machines
Install / Use
/learn @ilcardella/ArduinoCoffeeMachineREADME
Arduino Coffee Machine 
This project is a PID controller for a Gaggia Paros (or Gaggia Classic) coffee machine using Arduino and a few other components.
This Arduino based controller improves the stability of the water temperature of the coffee machine by controlling the boiler with a PID control loop feedback.
Software
This project is based on lib_coffee_machine which is a C++ library providing an abstraction of a generic coffee machine.
This project implements the library interfaces targeting an Arduino Nano platform and several sensors and displays.
Arduino libraries
This project depends on the following Arduino libraries:
Makefile
The Makefile at the project root directory provides targets to build the code and the documentation.
Build
You can build the code with different approaches:
- with the Arduino IDE opening the
CoffeeMachine.inosketch - with VSCode and the Arduino extension opening the
CoffeeMachine.inosketch - with
make buildusing Docker
Build with Docker
The code can be built inside a Docker container using docker-compose. The docker-compose.yml and the Dockerfile are in the docker directory. The docker-compose.yml depends on 2 environment variables that must be defined before starting the build:
- CORE: the Arduino core
- BOARD: the Arduino board to use
Refer to the arduino-cli documentation for the list of available cores and boards. The following is an example that builds the code for an Arduino Nano board:
$ cd /path/to/repo
$ CORE=avr BOARD=nano make build
The generated build files will be in the CoffeeMachine/build directory.
After building the Docker image the first time, you can then use the arduino-cli installed in the Docker image directly with:
$ cd /path/to/repo
$ docker run --rm -it -v $PWD:/build arduino-builder arduino-cli version
arduino-cli Version: 0.10.0 Commit: ec5c3ed
Hardware
Components
This is the list of components I used for the project:
- 1x Arduino Nano (any board type will do)
- 1x Solid State Relay 40A
- 2x Digital temperature sensors (e.g. TSic306)
- 1x I2C 128x64 OLED
- Wires and other supplies
Documentation
Read the project documentation at: https://arduinocoffeemachine.readthedocs.io
Or build it locally with:
$ cd /path/to/repo
$ make docs
Tools
The tools directory contains a Python script that can be used to read the Arduino
Serial messages and to plot the current water temperature on a graph. The goal
is to help the PID tuning process showing the realtime results.
$ cd tools
$ poetry install --no-dev
$ poetry run python temp_plotter.py
Acknowledgement
A big thanks goes to these two other projects that helped me a lot in the understanding of the electric schematics of the coffee machine and the components to use:
Related Skills
node-connect
340.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.2kCommit, push, and open a PR
