# Gaggia Classic Dual Boiler Arduino Controlled Project



## Gm7dha (Jun 17, 2018)

I recently found that the KitchenAid Artisan espresso machines used mainly Gaggia Classic parts inside and that they were dual boiler so I managed to pick one up from Ebay at £41 in a nice fetching "Medallion Silver" finish. It would be a great starting point for a project. I did have in mind re-casing the whole project but the KA casing is in fantastic condition and does look a lot better on the counter-top that it does in photographs.

Anyway, It all worked absolutely fine on testing and produced a decent espresso. The steam boiler I could hear a slight hiss from and upon inspection noticed a little weeping between the top/bottom boiler sections.

The plan is to completely strip, clean, re-seal and rebuild the boilers, 3 way solenoids, OPV etc.

Clean up the casing and framework.

Add all the Arduino gubbins.

Features/Mods:

1. I've already modified a V1/V2 Silvia wand by cutting and welding the "ball joint" section from the old wand onto the Silvia wand - So now it articulates!

2. Arduino controlled PID's with PT100 sensors and SSR's. I'll program the steam boiler to go into Idle mode after 5 mins of no activity and reduce temp to save the seals.

3. An SSR to PWM the pump so I can add pre-infusion and possible pressure profiling at a later date.

4. Volumetric flowmeter so I can switch between volumetric shots, time-based, or manual

5. Possibly add pressure sensors for boiler pressures (and brewhead pressure if I can figure out how)

6. Will add other features like On/off for service boiler, descale/backflush programs, steam boiler auto-refill etc

7. Remove the two useless temp gauges and replace them with OLED displays

8. Original switch gear will be replaced, possibly a d-pad/joystick type for scrolling through menus

Photos of the machine in it's various stages of disassembly below:

https://drive.google.com/open?id=1B3v_CZkXpclEsZ6LjCiI0q16ndA4oxRd

Any ideas of features that I've missed or would be a good addition please let me know. Any information of any kind would also be appreciated, always good to ehar other people's experiences of similar projects.

Cheers,

Kev.


----------



## Gm7dha (Jun 17, 2018)

Just starting to get things moving. Boilers etc all cleaned. Internal framework gritblasted ready for painting. Starting to see Arduino parts arrive and got the two displays working tonight:

https://drive.google.com/file/d/16_LEzZMOc41Zz6V9kupNwK9uIFFXcWvj/preview


----------



## Gm7dha (Jun 17, 2018)

2x PT100 RTD's up and running tonight showing temps on both displays. Just a trial, this is not how they will look once complete.

https://drive.google.com/file/d/18jDOJNYj4L5X3mV8QxBZGDPFQ3BMY5WP/preview


----------



## JojoS (Oct 1, 2014)

Interesting project but a misleading title. The KitchenAid espresso machine is not a Gaggia Classic. They have parts that are common but that is about it. Their reputation in terms of durability and reliability is just not the same. Good luck with the modifications.


----------



## Gm7dha (Jun 17, 2018)

All Gaggia made parts, even down to the castings.

The poor reliability is due to the targeted market's lack of knowledge on how to properly use the machines; exception being the poor switch gear and overall execution of the assembly! Shame really.

Looking forward to turning it into the machine it should have been


----------



## coffeechap (Apr 5, 2012)

JojoS said:


> Interesting project but a misleading title. The KitchenAid espresso machine is not a Gaggia Classic. They have parts that are common but that is about it. Their reputation in terms of durability and reliability is just not the same. Good luck with the modifications.


Boilers, thermostats, group, portafilters, baskets, steam wand parts all the same, it is basically a dual boiler classicwhat doesn't work and where the kitchen aid fails is on the steam boiler, as the seals fail quickly and if not replaced they leak and this is the quickest wrecker of the paint. In principle it has the makings of an ok machine just badly execute. Looking forward to seeing how this project comes along


----------



## Gm7dha (Jun 17, 2018)

I thought I had a reference to KitchenAid in the title, seems I never, so yes, a bit misleading! I do apologise! Changed it now (hopefully it updates properly).

I've got 2x new seal kits with the Silicone o-rings for the boilers. Hopefully that'll be better for the steam boiler. The steam boiler was leaking a bit but not badly, caught it before any damage was done to the castings/paint thankfully.

Received my 4x SSR board today, 1x to control the pump, 1x to control the boiler 3-way solenoid, and 1x to control the steam boiler 2-way solenoid... leaves one spare for something else if anything happens to crop up.

Also ordered an ultrasonic detector. Hopefully I'll be able to measure the water level in the water tank without any problems/spurious reflections from the tank walls throwing the readings off. If it works I'll have a percentage bar showing water level and a safety "lock-out" feature if water depletes to a certain level.


----------



## JojoS (Oct 1, 2014)

The steam boiler is the proverbial Achilles heel of the KitchenAid Artisan espresso machine. Have you considered replacing the steam boiler with a thermoblock like the Gaggia Twin? Not really sure which system will be more efficient. I was disuaded by the Gaggia manager here in Hong Kong from getting either of them and pushed me to get a 2012 Gaggia Classic. That was many years ago. No regrets.


----------



## Gm7dha (Jun 17, 2018)

Yeah i think the big problem with the steam boiler is that people would leave the unit powered on for a long time and also not refilling the boiler after steaming.

To hopefully resolve the steam boiler issues I'm going to implement an auto-refill feature and also have the PID reduce the temperature to around 95°C after the machine has been sitting idle for more than 5 minutes. I'll be replacing the oring that seals the top/bottom parts of the boiler with a silicone one as well.

I could use a 25A SSR and have the whole machine shut-off after say 30 minutes, or, just shut-off both boilers with existing SSR's

I don't think I'll have much problem with the steam boiler taking all that into account.


----------



## Gm7dha (Jun 17, 2018)

Got the PID code working for both RTD's/SSR's (Boilers), will need tuning once the machine is back together and running.

 [URL]https://drive.google.com/file/d/1q3cMKU0jzfg32g9XQdVj3EMrBYjL_fHS/preview [/URL]

Received my volumetric flowmeter today so I shall try get that up and running this weekend.


----------



## MrShades (Jul 29, 2009)

Gm7dha said:


> Got the PID code working for both RTD's/SSR's (Boilers), will need tuning once the machine is back together and running.
> 
> [URL]https://drive.google.com/file/d/1q3cMKU0jzfg32g9XQdVj3EMrBYjL_fHS/preview [/URL]
> 
> Received my volumetric flowmeter today so I shall try get that up and running this weekend.


If I were you I'd swap those SSR 10DAs for SSR 40DAs. The cheap Fotek SSRs are good, but vastly under-rated in terms of current capacity. I wouldn't use 10A ones!


----------



## ashcroc (Oct 28, 2016)

Gm7dha said:


> Yeah i think the big problem with the steam boiler is that people would leave the unit powered on for a long time and also not refilling the boiler after steaming.
> 
> To hopefully resolve the steam boiler issues I'm going to implement an auto-refill feature and also have the PID reduce the temperature to around 95°C after the machine has been sitting idle for more than 5 minutes. I'll be replacing the oring that seals the top/bottom parts of the boiler with a silicone one as well.
> 
> ...


Considering the steam boiler doesn't need to heat things like the group, could you not just have it switch off the elements then turn it on as & when required?


----------



## Gm7dha (Jun 17, 2018)

I may indeed upgrade for all they cost! I would have just taken them as face value. Thanks, MrShades. Saves me any future hassle. The boilers only draw 5.6A max I believe, but best to err on the safe side.

The reason I'm PID'ing the steam boiler is so I can have it idle at a lower temperature, thus, saving the seals etc and it means I can get it up to steam temp in no time rather than waiting if it was a mere on/off switching affair.

Flowmeter operational:

 [URL]https://drive.google.com/file/d/1PQ8ga4fN-DKCLqVz_X-Ek1kAReOucr1W/preview [/URL]


----------



## Gm7dha (Jun 17, 2018)

Made a prototype box for the OLED's today just to double check sizes and fitment etc. Needs a few adjustments but not too far out. Being where the displays are, I wanted them boxed and sealed to keep moisture out.

 [URL]https://drive.google.com/file/d/1u7x8Qpf3NmdS-E3RhQ5sdizoXPzvIJse/preview [/URL]

https://drive.google.com/file/d/1D8wf-QYO_hdZwFCZAeA70BGIVzoP7Bqw/preview

 [URL]https://drive.google.com/file/d/10n73-0DUIAk0dg59-Y2MlxzKmG_ffDur/preview [/URL]


----------



## Gm7dha (Jun 17, 2018)

Final display housing printed!

https://drive.google.com/file/d/11qjD1jQlBucXhG5lBm7hSbeTRKEGGVow/preview


----------



## Gm7dha (Jun 17, 2018)

Ultrasonic water level sensor working and semi-calibrated to deliver water level percentage. The position of the sensor is roughly where it will sit once installed. I tried it here to make sure there would be no erroneous readings from wall reflections etc. You'll notice the reading fluctuates a lot when pouring the water in, this will be due to the ripples/movement - when the machine is in operation the water won't move quite so "violently" so will be fine. I require a cone-bit drill bit to drill the two holes in the casing for the TX/RX modules, should arrive tomorrow and can hopefully be fully trialled in it's proper state then.

https://drive.google.com/file/d/1uYk0_DfSEHZfaISSvsQWvSxZklrqNfpN/preview

https://drive.google.com/file/d/1-axGSaOQ5s8VjWOyHaMiXlazSueBxdg9/preview


----------



## Gm7dha (Jun 17, 2018)

Well it was project day today and made good progress. Most of the top-end is built up proper. The bottom end is temporarily set up for testing before I mount a metal enclosure underneath to house most of the electronics.

A few more wires to plug into the Arduino and I can start testing. No menu's or "operations" set up yet in code - that'll take the most time of all in this project I think.

Anyway... getting on with it nicely!

 [URL]https://drive.google.com/file/d/17tgzIbOefFDbYCxbRyO5rwaVZS7FTnKK/preview [/URL]

 [URL]https://drive.google.com/file/d/1yNM8l2xczRd8u3ay7Pmo3Igq3oAyoZhe/preview [/URL]

 [URL]https://drive.google.com/file/d/1mpXTVq2qPiT4C5Ocj1wbmNkFSSBOIxpY/preview [/URL]


----------



## Gm7dha (Jun 17, 2018)

Well I managed to extract a drinkable Espresso yesterday with a simple switch to start/stop the process... Just to make sure it worked ok.

I did have to switch out the 10A relay for one of the 2A relays to trigger the pump. The 10A wouldn't latch for some reason. I tried another 10A and a 40A with no joy... Possibly something to do with holding currents or something? The pump only draws 200mA or so.

Anyway, I can foresee an issue with the flowmeter as it uses interrupts. I can use it within a 'while' loop but this means the PID will run away with itself for 30secs or so which is not good (unless I'm missing something as I've never used Arduino before).

I decided to buy 3 Nano's, 1x for PID, 1x Flowmeter, and the last one to swap out for the Mega eventually. My understanding is you can have Arduino's communicate with each other, this means the PID's and Flowmeter can continuously run without interruption and interrupting the main code/loop.

Perhaps a Raspberry Pi would have been a slightly better option but I believe they don't have TTL And would require bi-directional shift registers - all a bit too much for me at the moment!

On other news, I'm having to look into 1/8" BSP female fitting with either push-in or hose barbs to connect the flowmeter in-line. Also, my 'welded' steam wand decided to give up so I've ordered a Silvia V3 as it looks like it should just pop on!

Will keep the updates coming.


----------



## Lambo (Sep 5, 2018)

Wow, good project, seems to be coming on nicely. Will follow with interest


----------



## Gm7dha (Jun 17, 2018)

Thanks. I've recently had a struggle finding the correct fittings for the hose between the OPV and brew boiler. I need to install in the flowmeter between these two points, anyway, fittings are coming, hopefully they're the correct ones and I get get cracking on.

My minimal knowledge of Arduino/C++ led me to believe I'd possibly need more than one Arduino, however, having researched Finite State Machines, I should be able to keep it all in one Arduino. Code is about 70% complete at the moment.

Also, my V1/V2 steam arm decided to give up. I wasn't too confident with it anyway, trying to weld two dissimilar metals was never going to go well. Anyway, installed a V3 steam arm no problem.

Will hopefully have more photos and progression up soon!


----------



## technohippy29uk (Jan 9, 2017)

Gm7dha said:


> Thanks. I've recently had a struggle finding the correct fittings for the hose between the OPV and brew boiler. I need to install in the flowmeter between these two points, anyway, fittings are coming, hopefully they're the correct ones and I get get cracking on.
> 
> My minimal knowledge of Arduino/C++ led me to believe I'd possibly need more than one Arduino, however, having researched Finite State Machines, I should be able to keep it all in one Arduino. Code is about 70% complete at the moment.
> 
> ...


 Hi there! I am really interested in what you have achieved and possibly doing the same. I have bought 3 of the same machines, all with paint peeling off in various places and various stages of rust and decay due to leaking seals, etc. I plan to take them to a powdercoating specialist for a candy-apple gloss treatment, hopefully making them look better than new, and replace all the seals, etc. I would love to build a "dream machine" which I could sell, based on my beautiful casings, and a similar internal display, water gauge, SSRs, etc as what you are using.

Would be great if we could get in touch and share ideas!


----------



## RobbieTheTruth (Jun 4, 2019)

Gm7dha said:


> Thanks. I've recently had a struggle finding the correct fittings for the hose between the OPV and brew boiler. I need to install in the flowmeter between these two points, anyway, fittings are coming, hopefully they're the correct ones and I get get cracking on.
> 
> My minimal knowledge of Arduino/C++ led me to believe I'd possibly need more than one Arduino, however, having researched Finite State Machines, I should be able to keep it all in one Arduino. Code is about 70% complete at the moment.
> 
> ...


 Can I have the machine once it's finished?


----------



## RobbieTheTruth (Jun 4, 2019)

technohippy29uk said:


> Hi there! I am really interested in what you have achieved and possibly doing the same. I have bought 3 of the same machines, all with paint peeling off in various places and various stages of rust and decay due to leaking seals, etc. I plan to take them to a powdercoating specialist for a candy-apple gloss treatment, hopefully making them look better than new, and replace all the seals, etc. I would love to build a "dream machine" which I could sell, based on my beautiful casings, and a similar internal display, water gauge, SSRs, etc as what you are using.
> 
> Would be great if we could get in touch and share ideas!


 This is a superb idea!

If they can be picked up for about £50, and you can install PID, Pressure Gauge, upgraded steam wand, and stick a retro Gaggia logo on, it could be a really fun machine to make and sell!


----------



## RobbieTheTruth (Jun 4, 2019)

RobbieTheTruth said:


> This is a superb idea!
> 
> If they can be picked up for about £50, and you can install PID, Pressure Gauge, upgraded steam wand, and stick a retro Gaggia logo on, it could be a really fun machine to make and sell!


 Where are you upto with it?


----------



## technohippy29uk (Jan 9, 2017)

I am toying with the idea of building a robotics kit for a Kitchenaid Artisan Espresso and Gaggia Classic. I have already had success mounting a mechanical pressure gauge in the Gaggia Classic, and I dont think it would take much to mount a display and microcontroller in the same space. I dont have a 3d printer, but thinking if I did I would make up a case for such a kit. I have started on the same path as @Gm7dha, but I have chosen to use a Raspberry Pi Zero W. Why? They are multi-threaded and have lots of horsepower, they have built-in Wifi and Bluetooth, which could be useful if I wanted to build a mobile app, provide a web interface, etc, and they are available for 10 Quid!. I also bought:



Raspio Analog Zero, which I managed to get for a quid (error on eBay listing - normally about a tenner)


A pair of Fotek SSR-25DA SSRs, £2.69 each from eBay


A box of 5 Elegoo HC-SR04 ultrasonic sensors - £3.24 from eBay


Geekcreit Electronic Components Base Starter Kits With Breadboard Resistor Capacitor LED Jumper Cable For Arduino With Plastic Box Package - £9.35 from Banggood
A breadboard/components/wiring kit


A pair of 200PSI/14 bar 1/8NPT pressure sensors (0-4.5v) - £7.,82 each from eBay


A G1/4" Hall Effect Water Flow Sensor - £3.49 from eBay


A pair of 1.44" 128x128 Full Color OLED Display Modules - £5.34 each from eBay


A pair of 18B20 digital temperature sensors - 0.99p each from eBay


A 4 Channel 5V OMRON SSR Relay Relay Module for £7.50


A Nano V3.0 USB ATmega328P-AU Micro-Controller 16MHz 5V CH340G Board Arduino Kit - £3.62 from eBay


The Arduino is a just-in-case thing - it is 5V capable and can be programmed to provide secondary command and control from the Pi.

I am still waiting for bits to arrive, but so far I have the Pi and the Raspio working together and I have tested controlling the SSRs, ultrasonic sensor, some LEDs, the pressure senders, etc. Given the Pi and the Rasio Analog Zero run at 3.3V some of it requires dividing resistors. The 5V Arduino hasn't arrived yet (coming from China) but I am hoping this will allow me to hook up the 5V stuff directly to the Arduino and run it as a slave off the Pi via USB or I2C.

My ultimate goal is to have a self-contained box containing the electronics and OLED screen which is small enough to mount against a 40mm hole in the front of a Gaggia Classic, with a nice shiny glass bezel mounted to the outside, and a terminal block at the back to hook up to the SSRs, flow meter, temperature sensor, etc. The device should be field or remote upgradable by Bluetooth or wifi, and should allow remote control of your espresso machine via a mobile app. The pressure, shot size, temperature, etc, will all be fully controllable, and it will support multiple shot and steam modes. The Kitchenaid version would double-up most of the components to take advantage of the dual boilers. Potentially, it could also work with thermoblock machines such as the Baby Twin to control steam output independently of the main boiler.

Potential features:



Motion, proximity, or time-controlled heating and cooling


PWM control of the pump to provide precision pressure control. Dispense with the factory OPV and use direct feedback via the pressure transducer


Software PID temperature control


Precise shot size measurement using the flow sensor


At correct pressure and time, it can advise you if your puck is too loose or tight. It will advise you to increase or decrease your grind size to get a good 30s 1oz/30ml shot.


Control of the 3-way solenoid. This can allow precise pre-infusion control, automatic boiler pressurisation, etc


Pump pulsing whilst producing steam, steam pressure sensing, post-steam boiler-re-pressurisation


Recipe uploads!


External relay output for bean grinder control - turn on/off grinder to control amount of grinds


Bluetooth connection to external micro-scales to measure the amount of grinds in the portafilter and auto-stop your grinder!


Supplies management - using the known measurement of grind output, we can determine when your bag of beans will run out and warn you to buy more, or even do it for you using some form of e-commerce integration!


Descaling and back-flushing counter/reminders


Auto-backflush - turn on pump, open and close solenoid a few times


Anything else anyone thinks it should have?


Either it could go in a new circular hole in the case with a bezel (makes it easier to cut cleanly) or even completely replace the factory switch module with new module containing a power switch, a few buttons and a small screen.

If it works, I think it could be a good seller!


----------



## technohippy29uk (Jan 9, 2017)

Got a power coater guy who can do the casing for me, but I haven't found the time to go see him yet. See above re electronics....


----------



## RobbieTheTruth (Jun 4, 2019)

technohippy29uk said:


> I am toying with the idea of building a robotics kit for a Kitchenaid Artisan Espresso and Gaggia Classic. I have already had success mounting a mechanical pressure gauge in the Gaggia Classic, and I dont think it would take much to mount a display and microcontroller in the same space. I dont have a 3d printer, but thinking if I did I would make up a case for such a kit. I have started on the same path as @Gm7dha, but I have chosen to use a Raspberry Pi Zero W. Why? They are multi-threaded and have lots of horsepower, they have built-in Wifi and Bluetooth, which could be useful if I wanted to build a mobile app, provide a web interface, etc, and they are available for 10 Quid!. I also bought:
> 
> 
> 
> ...


 I love this.

Really like the idea of turning an unpopular machine (KitchenAid) into an amazing machine by changing a few of the internals and pimping it up!

Any pics?


----------



## technohippy29uk (Jan 9, 2017)

Not got very far yet, mostly experimenting with the parts on breadboard.

I think I am more interested in making a marketable kit for the Gaggia Classic actually. My thoughts are:



Replace the front switch module with a larger 3d-printed enclosure housing a colour OLED display (possibly touch screen) and the electronics


Add a pressure sensor, SSRs for motor, boiler and the solenoid valve


Add water flow meter


Wifi and/or bluetooth, web page and/or mobile apps


Compatible with Google Home, Alexa, etc


Very interested in who might buy such a kit, and how much you would be willing to pay to build the ultimate classic without having boxes hanging off it!


----------



## RobbieTheTruth (Jun 4, 2019)

technohippy29uk said:


> Not got very far yet, mostly experimenting with the parts on breadboard.
> 
> I think I am more interested in making a marketable kit for the Gaggia Classic actually. My thoughts are:
> 
> ...


 Just answered with the below on your other thread.

I think it's a bit OTT for most (even on here!) I would be interested in seeing such a machine though!

Personally, I'd buy up a few old used classics and modify them to 9 Bar, install a pressure gauge, install a Rancilio Wand, install a PID, put the brass shower head on. 3D print the thinner drip tray and essentially sell the 'perfect' starter machine.

Get a good rep for doing this and you'd likely become the 'go to' guy when people ask for a starter machine.

When I did my reading, it appeared the Gaggia Classic with 9 Bar and PID was the ideal machine, but there was none available at the 'for sale' section and there was no real go to guy. I reached out to GaggiaManualService and he couldn't help with PID.

I paid approx £340 for a Classic with PID, Pressure Gauge and Rancilio Wand.

I don't know your margins but I reckon people might pay £380-£400 for the 'ultimate' Gaggia Classic. I guess you'd make it work by buying broken machines for about £50-£70 on Gumtree etc as the base?


----------



## technohippy29uk (Jan 9, 2017)

Thanks @RobbieTheTruth. I have previously sold Classics repaired and modded with pressure gauge and Ranchilio wand on eBay for around £150, but I probably should have been more patient and asked for more money. Adding a PID is a great mod, but typically they come as an external box. My kit/mod would replace the internal switchbank, so would be completely internal. I have made some CAD drawings and I am about to order some 3D prints to see how the module will fit up. There are no switches as the device will be on "standby" once plugged in - the RPI will boot up and remain on. The screen will go blank until pressed, then you will have the option to "turn on" the machine. I have configured my RPi to boot from read-only MicroSD card to prevent corruption when it is unplugged from the wall, but was also considering using a capacitor solution to allow it to detect the loss of mains and shut down correctly. Watch this space...


----------



## Darkshin (Aug 8, 2019)

Cool stuff. I did all the mechanical mods to enable the best possible extractions & milk steaming and such without adding any electronics. Look like your additions would push it to the next level, kudos sir! I do think if you do all the mechanical upgrades as well then your electronics has less to micromanage. See link onto my build below. Currently assessing a new build in Black since it seems Kitchenaid is closing out their stock again, and black is always the color that I wanted. Figuring out a new mod on the updated design that replaced the OPV for a static pressure regulator to lower it down to 9 bars at the group head.

https://www.home-barista.com/repairs/what-kitchenaid-espresso-machine-should-have-been-t60751.html


----------



## Darkshin (Aug 8, 2019)

Seems I might be wrong on the closeout. The prices just shot back up to $699


----------

