Ndipatri/robogaggia
About the project
This project mods a popular espresso machine, The Gaggia, to automate many of it's manual tasks. More importantly, when you're done, your espresso machine will look like Locutus of Borg!
Project info
Difficulty: Difficult
Platforms: Adafruit, Arduino, SparkFun
Estimated time: 5 hours
License: Apache License 2.0 (Apache-2.0)
Story
This project is a hardware-hack of the amazing Gaggia Pro
Although it's an amazing machine, the Gaggia requires a number of manual steps to get you from beans to a hot latte:
- You have to periodically pour water into the top of the Gaggia to refill the water reservoir. This can be an inconvenience if your Gaggia is under a kitchen cabinet.
- After you've loaded the portafilter with coffee grounds and put a cup under the group head, you have to wait until the brew heater achieves the correct temperature before you can click the 'brew' button.
- While brewing, you need to remember the weight of your coffee grounds so you know how much to brew. You need to either weigh your resulting coffee using an external scale or approximate the output by counting the seconds of your extraction.
- After brewing, you then have to manually switch the 'steam' button and wait for the heater to achieve the steam temperature.
- After steaming, if you want to brew again, you have to go through the process of extracting water to cool off the heater - the heater is always on with the stock Gaggia, so cooling off the heateater takes a while.
Other things to note about the stock Gaggia Pro:
- The thermostats which measure the brew and steam temperatures employ a simplistic 'Schmitt Trigger' control algorithm which means the target temperature can vary quite a bit from shot to shot.
- When brewing, the water pump operates at a fixed rate, so there is no 'pre-infusion' period where the portafilter is filled with low-pressure water before the high pressure water is used to extract the espresso shot.
In an attempt to mitigate the above Gaggia short comings, I've implemented the following features:
- Integrated scale that fits in the drip tray
- Dual PID temperature controllers
- Pre-Infusion / Flow control
- Auto-Fill water reservoir
- Auto-Shutoff
- Microcontroller-based automated brew process that eliminates the need for the Brew or Steam buttons.
- Cool-down feature to assist in cooling down the heater for brewing.
This project involves modifying a perfectly safe commercial espresso machine. These modifications absolutely make your espresso machine less safe. It involves both water and electricity. Please proceed at your own risk. This is a dangerous modification! If you don't do it right, people will die over a cup of coffee!
These instructions assume you are proficient in handling both DC and AC electrical components. If you are not, this is not the project for you, sorry!
Also, I know absolutely NOTHING about proper coffee. It's quite possible evetything I'm doing here is wrong, so don't yell at me. Anything I do know, I've learned by watching the awesome coffee videos from James Hoffman
Parts ListI will explain in detail how each of these are used. Here is a list of all major components needed for this modification and links to where you can acquire them. The brown parts in the above Robo Gaggia diagram are all 3D printed. I designed them using Fusion 360. Below, I've included links to the resulting STL (stereolythic) files which can be used on any 3D printer.
- 12 DC Power Supply Just buy something like this and smash it with a hammer to get to the fun parts. You can wire this up to the interal switched-AC power inside the Gaggia.
- DC-DC Buck Converter This is for converting the 12v to a reliable 5v with reasonable power.
- High Power Solid State Relay(SSR) (2) You drive these with 12vdc and they are able to turn on and off AC. You will use one of these to drive the Gaggia's water pump and solenoid valve and the other to drive the heating element. Even though the Gaggia has a 'brew' and 'steam' button. These represent two separeate thermostats; there is only one heating element. I mounted both of these relays on the inside of the Gaggia. I attached them to the housing using bolts.
- NPN Transistor and 10K resistors (4) We use these to isolate the Microntroller, which is actually turning things on and off at a logic level of 3.3V, from the 12v signal level needed to switch the SSRs.
- Low Power Reed Relay This is for switching the water solenoid valve for the water reservoir.
- Water Solenoid Valve. This has quick connectors for 1/4" water lines typically used for refridgerators. This particular item has blue lockrings for the quick connects. This valve is installed on the inside of the Gaggia using a harness I designed. Here are the STL files for this Solenoid Valve Harness, Solenoid Valve Hanger. You'll need to print two hangers and you will need to remove the 'water fill' spout that sits inside the rear of the Gaggia. You won't need it anymore!
- 1/4" flexible water line and fittings This is important for plumbing up the Gaggia to a nearby water source such as refrigerator.
- Particle Argon Microcontroller This is a Wifi-enabled Arduinio-based controller. You program this controller using the Visual Studio Code IDE with the Particle Workbench extension installed. I've included the roboGaggia.ino source file which can be used to program the Argon
- Long Quicc Cable (2) and Assorted Quicc Cables (1) SparkFun's Quiic Connectors are used to connect together many of the electronic components on this list. These cables carry the I2C communications bus protocol.
- 500g Mini Load Cell and Qwiic Scale Controller The load cell is contained within a 3D-printed Scale Enclosure. STL Files Scale Bottom, Scale Top, Scale Retainer Clip, Scale Lid
- 20x4 B&W LCD Display This covers the Gaggia's Brew and Steam buttons becuase they are no longer required. STL Files LCD Bottom, LCD Top, LCD Bezel. NOTE: You need to drill a hole in the LCD Bottom for the LCD cable. You'll see what I mean when you try to put it all together.
- Arcade Button and I2C Button Controller A single arcade-style button is used for all user interaction now with the Gaggia (well, other than the power switch). You will need to solder the switch from the Arcade button to the I2C button controller. I also bought this button, which is the normal switch that goes with this controller. I tested this button to see which contacts on the controller should be soldered to the Arcade button. Here are the STL Files Arcade Button Enclosure and Arcade Button Lid. In addition, this button enclosure is also where I put the Qwiic Scale Controller. Notice in the picture, the conduit from the scale leads into this enclosure.
- K-Type Thermocouple (2) and Thermocouple Controller (2) You will be replacing the Gaggia's stock thermostats with these thermocouples. They are M4 type screws. Robert Kujawa has a fine video on how to swap out these thermostats. Ignore most of the video as it describes how to install a commercially available PID, just uset the video to learn how to access those thermostats. The Argon Microcontroller and software that we will be using will implement both brew and steam PIDs.
- AC Dimmer Controller This is used to adjust the power delivered to the water pump in order to affect flow control. At this time, only two different power settings are used. One for pre-infusion and one for brewing.
- Thermal Fuse The Gaggia is protected by a thermal fuse. If the termperature inside the Gaggia exceeds 184C, this fuse blows and the Gaggia will stop working. It's good to have an extra one of these :-) This video by Sebastian Dehne will describe the technique you can use to replace a thermal fuse.
- Water Level Sensor This is used to measure the water level in the water reservoir. The associated 3D STL files include a Water Sensor Body, the Water Sensor Lid which seals the water sensor in the body, and the Water Sensor Clip which you can glue to the sensor body and then clip the whole sensor to the interior of the water reservoir. The software will ensure that the water never goes well below the sensor or above the sensor up to the 3D printed body. If the water goes above the 3D printed body it could burn out the sensor (the purchase comes with many extra sensors). In the last few seconds of the Video of RoboGaggia!, I show you where this sensor is placed inside the water reservoir.
These are other modifications & purchases I've made to my Gaggia which I've found useful:
- Bottomless Portafilter This is useful for observing how espresso is being extracted from your 'puck'
- High Quality Portafilter Basket
- Water Filter These are designed to be placed inside of your water reservoir.
- Silicon Group Head Gasket I found that the original Gaggia gasket would leak on occasion.
- Shower Disk for Group Head
- Backflush Basket and Cafeza Descaler
- Over Pressure Valve The Gaggia comes stock with a 12bar release valve. This means the pressure will attain 12bars inside of the heater before the valve spring will release pressure. This is appropriate if you are using the high-pressure basket that comes with the Gaggia, but if you are using a regular basket, you should dial it down to probably a 9bar spring. This is what I've done.
Ok, now that you have all the parts, I will tell you how to put them together! Sorry this isn't going to be a highly detailed guide. Everywhere there's a line, that means you use wire :-)
- Don't mind my little 'e b c' bug diagram at the bottom left. I've been an electric engineer for decades and I still forget :-)
- I used a ProtoBoard to build this circuit. Then I printed an enclosure for it and attached it to the back of the Gaggia so it's out of the way.
- I used [Wire Wrap] and zip ties to protect all of the wires running between the various components.
- The inside of the Gaggia gets very hot, so any wires that are inside of the Gaggia should have very good insulation or protection.
This diagram isn't 100% accurate as I've made slight modifications, but it gives you the general idea of the user workflow using Robo Gaggia.
The Particle Argon is a small microcontroller that combines WiFi and the Arduino platform. For this particular application, once the hardware modifications are made to Gaggia and it's assembled back on the kitchen counter, the WiFi feature is a great way to send updated software to the Gaggia. For example, depending on where exactly you install your water level sensor, you might need to adjust the 'minimum' and 'maximum' water level parameters in the firmware.
I would start by checking out this repo and building it using the Visual Studio Code IDE with the Particle Workbench extension installed. I've included the roboGaggia.ino source file which can be used to program the Argon. The accompanying lib directory in this repo contains all libraries you need to compile.
Please be aware that strange things can happen when using the Particle Console to control Robo Gaggia. The exposed functions through the web interface are meant for testing purposes only. For example, I expose the 'startDispensing()' method so you can click the button in console and make the Gaga dispense water. But this water will be cold and the 'water level sensor' won't be used so it's possible to run the Gaggia dry and possibly damage the water pump.
Wiring Changes for the GaggiaOk, so the existing Gaggia wiring is actually quite brilliant.
For an AMAZING explanation of how the Gaggia works, from an electrical perspective, please read this explanation from @comoricoffee.
The biggest change I made is I removed some stuff :-). I removed the 'Brew' and 'Steam' switches and I removed their associated 'lamps'. None of these are necessary with Rob Gaggia! As part of the simplified wiring, I removed the safety interconnect which disabled the water pump if the steam temperature is enabled. This is an important safety feature, but it is now implemented in software. The software will NOT brew (turn on the water pump) if the steam temperature has been achieved.
Here is a crude diagram of the changes I made (see where I added the two High Power Solid State Relay(SSR) and the AC Dimmer Controller
Leave your feedback...