Lumics / EspressiShotTimer

Espresso Shot Timer to measure the exact shot time for my pulled espresso shots with my portafilter coffee machine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EspressiShotTimer

Is a easy to build and install espresso shot timer for almost any portafilter coffee machine. I use it everyday with my Rocket Appartamento Espresso machine. It is great if you want to get repeatable espresso shots.

This project is build with PlatformIO, VSCode and the Arduino framework.

How it works

The pump in most espresso machines is basically just a motor which produces a magnetic field when it gets power. This can be measured with a reed sensor.

I wanted to use this effect as it is easy to add a reed sensor to most machines. You can easily glue/tape it to the pump and doesn't need much hardware adjustments or coffee machine knowledge. This makes it feasible for everybody to install this espresso shot timer at home. Furthermore, I decided to use an external 5V power supply, as I think it is too dangerous for most users to use the internal coffee machine electricity (230V can be dangerous!).

What you need

In the following you have a list of suggestions of parts you need to build this project. The total costs for all parts are around 20$.

  • Microcontroller with build in LED display: ESP32 TTGO T-Display Note: I used a special version of this ESP32 with display from Lilygo with pins to the left side. This board can be bought if you contact the seller directly and ask for a custom board. But I think the regular board is also just fine, but you have to change the housing and docking part a bit to connect.

  • Cable connector: PCB Screw Terminal

  • High temperature Reed sensor

  • Some Wires

  • Power supply with 3.3V, 1A. Don't worry about the connector, I just cut it off anyway.

  • A small PCB Prototype Board

  • 1k Ohm Resistor

  • 3D printed housing

Some Hardware impressions

This is the dock. It has a mini PCB with the two screw terminals and a connector for the ESP32. On the bottom side is a little hole to add a magnet so it better holds on my coffee machine. You can find the .stl file in the CAD folder of this project.

This is the custom ESP32 with display from Lilygo in a housing with the dock (buttons have no function at the moment)

That is how it looks attached to my coffee machine.

Wiring

The wiring is quite simple. I cut off the connector from the power cord of the 3.3V power supply. The red or white wire is the 3.3V (make sure you get a 3.3V power supply!). This needs to be connected with the 3.3V pin of the ESP32. The ground wires can then be connected as in the diagram below. The last part is to connect one part of the reed sensor with the ESP32 pin 33 to sample if it detected a strong enough magnetic field of a turned on pump. To make sure the PIN is not floating I added a 1k Ohm pull-up resistor from the PIN33 to the 3.3V power line.

The placement of the reed sensor on the pump takes some trial and error as the magnetic field might no be strong enough to trigger the reed sensor at all places on the pump. Below you can see my spot I found works best with my Rocket Espresso machine.

Code

To code is written for the Arduino framework with the PlatformIo IDE. I am not using any of the special capabilities (WIFI & Bluetooth) of the ESP32 at the moment.

What the code does

It samples the reed sensor and as soon as it detects a change it will start the counter. If the reed sensor is active for more than 15sec it counts this measurement as shot that is getting pulled. That means that the display will show the end count for one minute before the display goes back to sleep. This is implemented due to the fact that my machine from time to time activates to pump to refill the boiler (which takes about 7-9sec) and I don't want to count this as regular shot pulling with activating the display for more than one minute. This doesn't mean that the display is not counting the refilling of the boiler but it switches off the display to sleep immediately after the pump is turned off.

About

Espresso Shot Timer to measure the exact shot time for my pulled espresso shots with my portafilter coffee machine


Languages

Language:C++ 100.0%