Showing posts with label Coffee. Show all posts
Showing posts with label Coffee. Show all posts

February 25, 2021

Closed Loop Espresso Intro

Even before getting a lever espresso machine, I've been thinking about how I might design one if I were to do it from scratch.

This is the layout I've converged to:



The basic summary is:
- Electric motor driven pump pumps water through a heater.
- If the water at the output of the heater isn't up to temperature, the 3-way valve after the heater will cycle the water back through the tank.
- Once the water at the output of the heater is up to temperature, the valve switches and water is piped over to the group head and coffee.
- An extra "drain" valve between the group head and the drip tray relieves pressure after the shot is done.  Strictly this isn't necessary, but it serves a few purposes I'll get into later.

Critically with this setup, the whole tank of water doesn't have to get hot as it would in a boiler-based espresso machine.  I'm hoping to get the delay between powering the machine on and pulling the first shot down to a minute or less.  With a standard 15A mains outlet, it should be possible to real-time heat over 5 mL/s of water from room-temperature to espresso temperature, so main delay is in getting the thermal mass of the heater up to temperature.

The pump:

As far as I can tell, most "real" espresso machines use either vibratory pumps or rotary vane pumps.  From a pure performance perspective these don't seem like great solutions to me.  Vibratory pumps are noisy and hard to control (not saying you can't, Decent does pressure control with vibratory pump), and their main appeal is they're cheap and you can plug them straight into mains.  Rotary vane pumps are positive displacement (which is good for pressure control, roughly speaking), but tend to have large displacements - meaning for a given pressure, a lot of torque is needed at the input, since (ignoring losses) \(energy = torque*angle = pressure*displacement\).  Lots of torque = large motor or gear reduction.  However, the pumping power requirements for making espresso are tiny - on the order of a few watts of \(pressure*flow rate\) (9 Bar * 4 mL/s is 3.6 watts, and I think that's towards the upper end of espresso flow rates).  So a pump with a small displacement and a tiny motor (effectively getting "gear reduction" through the pump) makes more sense to me.  

Gear pumps were my first though.  What I wanted was "stainless steel body gear pump with PEEK gears", and it turns out that exactly this object exists and can be purchased on ebay for a few tens of dollars.  Even better, they all are magnetically coupled, so there are no shaft seals to leak.  A couple weeks later I had a Fluid-o-Tech MG304 pump.


Here's a shot of the inside.  The gears and bushings are CF-PEEK and the rest is stainless:


Here's a relevant plot from the datasheet.  The blue curve labeled "A" is for a 1 cP viscosity fluid, e.g. water.    Should be able to get over 200 psi at greater-than-espresso flow rates.  Since the pump displacement is so small, torques needed are in the ~.1 N-m or less range, which means I can use a tiny motor.


The main downside of gear pumps is leakage - which you can see in the pressure vs flow plot.  Gear pumps "seal" by having very close tolerances between the tooth tips and faces of the gears and the pump cavity, so some fluid leaks through these gaps.  For this pump it's very linear with pressure - at a constant input speed (which would be a constant flow if there were no leakage), output flow drops off linearly with pressure drop across the pump. 

The pump came with a low-end brushed maxon driving it.  I swapped that for a Moog BN23 Silencer motor I snagged from a Media Lab trash pile ~7 years ago.  One of its larger brethren was used to power the tiny lathe, and another by Dane for Robot Art.  A 3d-printed spacer adapts it to the pump.  Eventually this'll need to be replaced with a more temperature resistant part, since the water flowing through the pump will get fairly warm.

I modified a spare pendulum motor controller so I could plug in the pressure sensor.  Eventually I'll  have a separate micro for doing all the high-level control and use one of my usual motor drives with the built in encoder, but for now this was the easiest thing to hack together.  

This was my pressure control test bed -  the pump and motor, an automotive-style thread-in pressure sensor, a dial pressure gauge, and a needle valve as a variable load;


Testing closed-loop pressure control.  The pressure is plotted/setpoint set from the computer, and you can see the response to the needle valve opening and closing.  With this setup I can get around 10 Hz of closed-loop pressure bandwidth.


Some kind of interesting notes about the pressure control, looping back to the pressure relief valve.  One of the factors limiting the pressure control bandwidth is the compliance in the pump system.  A lot of this is from the magnetic coupling, which has a sinusoidal force-vs-displacement profile, with zero stiffness around zero displacement, and relatively low peak stiffness.  The other source of compliance is the fluid circuit - the bulk modulus of the fluid, the stiffness of the tubing and other stuff between the pump and the output, and much more importantly, the volume of air trapped in the system.  Without the relief valve, a big air bubble could get trapped in the top of the group head, above the puck of coffee, which would add a huge compliance.  To avoid this, the relief valve can be kept open until the group head is full of water, and then closed.

On to water heating:

The water heater is made from three 1/4" x 7" die heaters sandwiched between two thin aluminum plates, with a stainless tube snaking between the heaters.  My main goal was minimizing the thermal mass of the heater.  This design is kind of terrible, but it's functional enough to get me going.  The bend radius is super tight, and I did a few test bends that went well, but most of the bends in the final heater are awful.   Still, they didn't crack and still pass water, so good enough.



Two thick sheets of FR4 sandwich the whole assembly for insulation.  The machinist clamps are for extra pressure in the center.  Yeah, this design was bad.


For water temperature control, I have a platinum RTD in the flow of water, and a thermistor measuring the temperature of the heater.  I circulate water through the heating loop and back into the tank (in the picture above the metal pot...) until the the water temperature sensor has converged to the desired temperature, and then a 3-way valve is switch to pipe the hot water to the group head instead of back to the tank.  It takes around a minute to converge from room temperature to ~90C, and that's with a pretty terribly designed heater and a water temperature sensor with way too much thermal mass (I used a generic NPT threaded sensor so I could throw this together quickly).  So I think with some actual design I'll be able to get it even faster.

Similar to the heater, the group head was designed to be low thermal mass.  This is the opposite of how most espresso machines work, where the groups often have as much thermal mass as possible for "thermal stability"  But they're usually heated by water or steam from the boiler.  With the power of feedback control, low thermal mass, a group heater, and a group temperature sensor seems like the way to go.

I designed the group to work with a La Pavoni  portafilter, shower screen, and group seal, since I already had those lying around.  For the final version of all this (assuming there is a final version), I'll probably switch over to the standard 58mm portafilter size.

Here's the CAD and a cross section.  The typical wall thickness is 1.5-2mm.  I could definitely have gone harder with the light-weighting, but I wasn't in the mood for any analysis (this is pressurized to ~150 psi), so I just eyeballed it for now.  Next round of parts I'll probably be able to make it ~50% lighter. 


A screenshot of the CAM for making the top half of the group.  Thanks to the power of the 5-axis mill, it was only 2 setups, despite the holes pointed in every direction.



Video of the machining:


The finished parts assembled with seal and shower screen;




With the group head done, all it took was an afternoon of plumbing, sketchy wiring, and a tiny bit of firmware to read a few new temperature sensors and toggle valves.

Everything's just bolted to a strip of aluminum right now, and I stole the drip tray from the La Pavoni.


Here's the first test of the machine.  In my excitement I let it run for a little too long and the shot ended up over-extracted, but it turned out way better than I expected for a first try.  Pardon the wrench used as a handle for the group head - McMaster order with with a threaded handle was delayed.


For this test the group head wasn't heated, but I do have a 100W cartridge heater and thermistor for it, so the water flowing through it won't be cooled down.

While right now the machine is a huge heap on a benchtop, I think with some actual design it could be packaged to be very compact.  

December 9, 2020

La Pavoni Europiccola Lever Espresso Machine Restoration

I've had a La Pavoni Professional lever espresso machine for a couple years now, which I got on ebay and fixed up.  Getting it working turned out to be completely uneventful, so I never wrote up anything about it.  I recently restored a Europiccola for my sister, and this time around the restoration was much more involved.  It was in pretty rough shape when I got it - all the seals were shot, the sightglass was smashed, and the copper/brass plating was  peeling horribly.  But the heating element and electronics were in good shape, and core mechanical pieces worked.

I forgot to fully document the state I received it in, but here's what it looked like minus the grouphead:


All the seals needed replacing.  The trickiest of these was the seal in the top of the grouphead.  This seal is held in by a brass washer and a retaining retaining ring, which was made out of non-stainless steel.  It sits in a chamber full of steam, so I don't know what they were thinking there.  So the retaining ring was extremely rusted, so much so that the holes used for removing it with snap ring pliers were gone:


I was able to slowly chisel it loose and pry it out with a dental pick.  This is what was left of the original retaining ring (left), seal, and washer:


Here it is after installing a new seal, cleaning up the brass washer, and using a new stainless retaining ring.  Sorry for the blurry pictures:


This machine originally had a copper finish on the boiler and gold/brass finish on the grouphead and base, but both were discolored and peeling.  The finish on this  unit was strange -  on the outside, there was a clear varnish layer (the source of the peeling).  Under that, the boiler has an electroplated layer of actual copper, and the base has an electroplated brass layer.  Neither of those layers were in very good shape.  Where the copper/brass were wearing through, there were signs of a chrome coat beneath that. 

I took the boiler as far apart as I could before stripping the coating.  The sightglass attachment points are bolted through the boiler, with their nuts on the inside of the boiler, at a funny angle.  I'm sure there's a specialized wrench for removing these, but I didn't have that.  I used a 16mm wrench with a 12-point ratchet.  Because the opening at the base of the boiler is pretty small, the wrench couldn't be turned enough to click past one pawl of the ratchet.  To make progress, I had to turn the wrench a few degrees, remove the wrench, manually click the ratchet over two clicks, take up the backlash in the ratchet, put it back in, and turn the nut a few degrees.  And repeat several dozen times.  I couldn't get the wrench around the nuts holding on the pressure relief valve or steam wand, so I just gave up and left them on.


The original plated bolts holding that hold the grouphead on were a little rusty, so I got some new stainless steel bolts, turned the text off the caps, and gave them a polish:

A combination many rounds of paint stripper and scrubbing with a gentle polishing compound stripped off the varnish and electroplated layers, and revealed an almost pristine chrome coat on the boiler.  The base wasn't in quite as good shape, but a few cycles of scrubbing with scotch-brite and sanding with progressively finer sandpapers improved it.

Part way through stripping, the boiler had this really interesting crackle-texture:


The chrome on the base slowly being revealed:


The drip tray had a few deep rust pits in it.  I stripped the rust out of the pits, and sprayed a layer of clear high-temperature spray paint to over them hopefully keep them from eating all the way through the base.  Fun fact I learned in this process, some "high strength" toilet bowl cleaners are 5-10% hydrochloric acid, so it works really well for stripping rust or black oxide from steel.  

Here's what the pits looked like after a couple rounds cleaner:


I was amazed at the state of the chrome coat underneath all the gunk.  Going in, I was sure I would need to strip the parts all the way down and repaint them to make it look decent.  Lots of scrubbing later, here's what the boiler looked like:


Kind of interesting side note - I could have taken off all the copper with just paint stripper.  I noticed that when I wiped off the paint stripper residue, it was blue from oxidizing the copper.  Scrubbing was much faster though.  I used some glass stovetop cleaner, which is very gently abrasive and won't scratch the chrome.  Steel wool probably would have been much faster, but I didn't have any on hand.  Steel is softer than chrome, so I don't think it would have scratched the chrome.  

The base wasn't in quite as good shape as the boiler, but was able to get most of the blemishes out with scotch-brite and sandpaper.  In the end it doesn't look as nice as the glossy boiler, but the smooth brushed look is still much better than it started out.  Here it is going back together:

I stuck the logo back on with some 3M VHB foam tape:


The fully assembled machine:




Once it was back together I ran two rounds of Dezcal descaling solution through it, did two rounds of letting it sit full water with a couple spoonfuls of baking soda dissolved in,  and filled/boiled/flushed the water probably a dozen times to make sure dirt and all the chemicals I used were out of the system. 

Then it was ready to go.  Here's pulling a shot of Red Bird Espresso to test it out: