Coffee Display

Prototyping an LED display that helps hobby baristas brew coffee with consistent quality.

# hardware prototyping
# raspberry pi
# webserver
# python

A low resolution led display showing the name and the recipe for the current coffee roast in front of a espresso machine

At Intervall I prototyped a low resolution LED display that makes coffee recipes accessible during brewing and uses live weight data from a bluetooth coffee scale to help me and my colleagues always match the recipe.

Multiple espresso cups stacked above each other with leftovers of coffee

We drink a lot of coffee and try out various coffee roasts.

At the Intervall Office me and my colleagues try out various roasts from different roasters every month. Every coffee roast is unique and in order to get the most out of every roast we do an initial tasting round: This involves brewing several cups of coffee with different settings in our equipment until we like the taste of the coffee.

Every Coffee Roast has a Unique Recipe.

A coffee roasts recipe is defined in the initial tasting round and aims to make the taste of a roast reproducible. It consists of four core parameters: Grind level, bean weight, brewing weight and extraction time. The value of these parameters are not only dependent on the roast itself but also on the specific setup we use in our office.

Coffee Roast Grind Level Bean Weight Brewing Weight Extraction Time
Gogogu 0.8 18.7g 40g 35s
Brésil 0.6 19.0g 38g 39s
Katana 1.0 19.0g 35g 26s

How can we easily access all of our recipes?

A coffee recipe wirtten onto a piece of paper which is stuck to the top of a espresso machine

Coffee Display Makes all Recipes Accessible.

Low resolution led display showing the current coffee recipe standing in front of a group of coffee bags

Stores All Coffee Recipes in One Place.

Graphic of a bag of coffees standing behind coffee display

Shows the Essential Recipe Parameters.

Graphic of coffee display in front of an espresso machine

Coffee Display Assists during Brewing.

Low resolution led display connected to a coffee scale under an espresso machine via bluetooth

Connects to Bluetooth Coffee Scales.

Graphic of a bag of coffees standing behind coffee display

Compares Live Data with Recipe Parameters.

Graphic of coffee display in front of an espresso machine

Coffee Display can be controlled Remotely.

Low resolution led display connected to a desktop and mobile phone via wifi. The desktop and mobile phone show the same interface to select which recipe should be displayed on Coffee Display.

Hosts a browser based interface that can be accessed from any device in the same network.

Graphic of Coffee Display connected to a smartphone via Wifi.

Allows to select which recipe should be shown on the Display.

Graphic of smartphone with the web app.

Coffee Display Enhances Every Step of Coffee Making.

Making coffee with an espresso machine usually consists of four steps: Weighing the beans, grinding the beans, preparing the portafilter basket and brewing the coffee. Coffee Display is a hands free assistant, running in the background. No manual interaction needed, letting the barista focus on the craftsmanship of making coffee.

[1] Weighing Coffee Beans

[1.1]
In idle mode Coffee Display shows the current recipe.

Graphic of a coffee scale with nothing placed on top and Coffee Display showing the current recipe.

[1.2]
As soon as an object is placed on the scale, the weight is analyzed to detect the kind of object. If the object is the dosing jar, the display switches to weighing mode and tares the scale.

Graphic of a coffee scale with a dosing jar is placed on top and Coffee Display showing the current recipe and the current weight measured by the scale.

[2] Grinding Coffee Beans

[2.1]
In weighing mode the scales measures the weight of the beans filled into the dosing. The current weight is shown on the display.

Graphic of the coffee scale measuring the bean weight while the display shows the current weight.

[2.2]
Once the barista has filled in all the beans and removes the dosing jar with the beans for grinding, the Coffee Display waits for 20 seconds before logging in the last measured weight. If the barista only removes the jar for a few seconds, e.g to remove any excess beans, the weight will not be logged in. Color coding indicates if the actual value is within range of the recipe.

Graphic of the scale detecting that the dosing jar is removed for longer than 20 seconds while the display logs in the last measured value and displays the weight.

[3] Preparing the Portafilter Basket

[3.1]
The barista fills the ground beans into the portafilter basket, distributes it equally and tampers it. During this step, no scale is needed, so there is no object placed on it.

Graphic of an empty scale while the display is showing the last logged in bean weight.

[4] Brewing Coffee

[4.1]
The barista mounts the portafilter basket in the espresso machine, puts the scale under the outlet and places any type of coffee cup on the scale. The weight is analyzed to detect the kind of object. If the object is a coffee vessel, the display switches to brewing mode, tares the scale and starts the timer.

Graphic of the scale under the outlet of an espresso machine detecting that two espresso cups are placed on top to then tare while the display starts the timer and shows the current extraction time and coffee weight.

[4.2]
The scale beeps on tare and indicates the barista to start the brewing process by activating the water flow. During brewing the display shows the live weight and timer value. The barista observes the values and decides when to manually stop the brewing process – ideally this is the case if the brewing weight and the extraction time value are within range of the target value.

Graphic of the scale under the outlet of an espresso machine measuring the weight of the coffee flowing into the cups placed on top while the display shows the current weight 33 g and time 29 seconds.

[4.3]
Coffee Display detects if the weight changes are minimal, indicating the brewing process has been ended. It then logs in the measured brewing weight and extraction time values. Color coding indicates if the actual values are within range of the recipe.

Graphic of the scale detecting minor weight changes as the coffee flow has stopped while the display logs in the final weight and time values: 43 g and 35 seconds.

Building the Hardware.

Initially I only wanted to use the LED matrix to display the current recipe. So for the first prototype a ESP32 microcontroller was sufficient to address the LED matrix. After a successful test the idea arose that I could connect the display to a bluetooth scale and readout its data. As this would require more computing power to analyze the weight data, I switched from the microcontroller to a Raspberry Pi 4. I used a GPIO Hat to connect the Pi to the LED matrix and supply both devices with power. Finally I enclosed everything in a 3D printed housing, using the design from KNIFA.

First Prototype using an ESP32 Microcontroller.

Low resolution led display with buggy display.
Low resolution led display showing the parameters of a coffee recipe.

Switching to Raspberry Pi.

Raspberry pi with a gpio pin hat and a wide cable.
Low resolution led display connected to a raspberry pi and showing the name and the parameters of a coffee recipe.

Combining all Parts in a 3D Printed Housing.

All parts of the display placed neatly next to each other on a table before being assembeled.

Writing the Code.

For the first prototype using the microcontroller I used a C library to address the matrix. When switching to Raspberry Pi I did initial tests using Rust to handle the bluetooth communication to the coffee scale. Later I switched to Python, as there were more libraries available and I already had more experience in this language.

For the bluetooth communication to our coffee scale (Acaia Lunar) I used a library from Luca Pinello which was a great basis. I wrote a main script that constantly analyses the weight data from the scale to detect different vessels placed on the scale which triggers the switch into the according operating mode. This script also controls the display to show the information based on the mode. It also reads out the JSON file containing the recipes and logs the data from each brewing session into a CSV. The main script is run by a shell script which is called each time the Pi is booted.

Dosing Vessel

Graphic of the dosing jar placed on the scale.

Coffee Vessels

Graphic of three scales with different kinds of coffee cups placed on top.

Designing and Implementing the Web Interface.

Up to this point it was only possible to select the active recipe through the command line or setting a variable within the script. To make this more convenient – as I'm an interaction designer after all – I wanted to make this more user friendly.

I setup a flask server hosting a website on the local network, which reads out the JSON containing all recipes and the selected recipe – the same database the main script is using. Users can see all details of the selected recipe, a list of all recipes from which they can choose one to switch to. They can also add new recipes through a form and edit existing ones. To run the main script and server simultaneously and allow communication between the two I added a higher level script.

Screenshot of web app on a mobile phone showing the currently selected coffee blend Volt Brésil
Screenshot of web app on a mobile phone showing a dialog do switch the coffee recipe to Volt Brésil
Screenshot of web app on a mobile phone showing a form to add a new recipe

Context

Team

Impulses