ESP
32
resso Machine

Find and fork me on Github

Overview

The project covers somewhat advances features for an espresso machine temperature controller. The basic idea was to have reproducible "espresso results" due to temperature regulation and being able to fine-tune. Especially small machines have a low heat capacity and quality suffers a lot from different heat-up-times and high hysteresis in standard temperature switches. This fork was specifically developed for a Rancilio Silvia (v1) which are known to have fluctuations up to 20 degrees Celcius.

With this project you should be able to install a PID for about 30 Euro of material, some soldering, uploading the firmware, and installling the hardware.

Interface

Picture of the ESP32Machine webinterface home page Picture of the ESP32Machine webinterface configuration page

The homepage presents a simple temperature gauge, a power indicator, and the ability to turn the heater on or off. The configuration page contains all that is needed for setting the various parameters that control the temperature. It contains a graph that presents the last 10 minutes of data so you see what the impact is of your tuning. When the page is loaded it initiates its buffer with a few minutes of data from board. Setting the parameters us done using a username and password ( admin/silvia - currently values set at compilation time).

Most of the interaction with the ESP32Machine is done via an restful API. All parameters can be set or read through it. In addition there is an MQTT interface that is used to publish the machines's current status.

For makers there is the ability to extend functionality using a physical interface, consisting out of 3 control buttons and a LED or oLed display.

Buid Background

Software

This project refactored from the original ESPressIoT project by Roman Schmit which was originally written for an ESP3866 board with a TSIC sensor.

This fork ports that code to an ESP32 with a MAX31855 amplified K thermocouple. It has been refactored it to be more object oriented and graphically more appealing. It has some small optimisations to deal with measurement noise and ones that allow for marginally faster convergence. Overal the temperature stability is about 0.2 degrees centrigrade.

For development I used platformIO on Visual Studio Code MAX. The toolchain relies on having MinifyAll installed.

The code relies on the following libraries:

The webserver serves a local copy of Gauge.js but the web frontend will also download a remote copy of d3j version 4 from d3js.org.

Should you build this project with an oLed or Liquid led interface then additional library dependencies will be needed.

Before building you should look at include/ESPressoMachineDefaults.h where build time configuration changes should be made.

Updating

Please note that over time I have changed the pin assignement. Mainly to make debugging with an ESP32 possible.

Picture of an oLed based physical Interface

Hardware

For the hardware setup I followed the example from "Bnayalivne's Instructable page" I used a splitter to solder a USB charger to. And the whole circuit I installed in the space behind the frontplate, in a small 3d printed box.

Whilst the Fotek should be able to handle the 3.3 V output from the GPIO it failed doing so. The small circuit with the transistor, resistor, and the diode (against flowback) uses a GPIO to switch the output from the 5v voltage pin.

The schema below is the wiring schema including the connections for 3 control buttons and an oled interface. The pin layout is defined in include/ESPressoMachineDefaults.h

electric scheme

Acknowledgements

Roman Schmit, some of the code is a literal copy of his, some of it is butchered. All good idea's are his, the errors introduced are mine.

The webpages uses, borrows, or was inspired by the gauge.min.js library ; button.css by Ashley Watson-Nolan from htps://codepen.io/ashleynolan/pen/wBppKzt; the D3j library. It draws from many examples from the community such as Brendan Sudol's way to make a graph responsive and Renzo Mischianti's cookie based authentication webpage.

Another project that may be of your interest is Medlor's Bleeding Edge

Finally thanks to Angelo Moriondo, you all know why.