# Rancilio Silvia V3 with Arduino controller



## PolarBearDave

Just thought I'd show my compact little coffee corner with the finally 'finished' (for how long?) Rancilio Silvia V3 with integrated homemade Arduino controller. I am aware this is comparable to a Vauxhall Nova with go faster strips and an MDF spoiler, but I enjoy making things as much as I do drinking the coffee. Would probably hesitate at hacking into anything much more expensive!

*General Mods:*

- Insulated boiler and grouphead (kit from PID Silvia plus Rad Flek reflective outer)

- Recessed screw showerscreen

- Pressure gauge (plumbed in by the pump outlet)

- Adjustable 'pressure' (more flow rate I think) using low load leading edge dimmer on pump

*Arduino controller with 16x2 character LCD screen:*

- PID controller

- 3 permanent temperature sensors (LM92 ICs rather than thermocouples)

- Boiler Top

- Grouphead Top

- Remote ambient (~30cm lead out of case)

- Home made thermofilter with 4th temperature sensor for calibration with PC logging on all channels (work-in-progress)

- Live calculation of the boiler temperature offset from brew temperature, based on remote ambient temperature

- Shot Timer & Memory

- Total and 'Trip' Shot Counter and Hours Machine On

- Water tank low water level warning

- Timed preinfusion period and pressure step down at end of shot


----------



## ronsil

Wow:good: that looks great. Has it made a big difference to the quality of shot you are producing?


----------



## PolarBearDave

I'm still a newbie but I have to say I rarely get shots that I can't drink. I'm still working on my ability to dial in the coffee dose, grind and temperature but the mods help to keep things consistent:

- PID helps with the stability on the temp. Once I've got my thermofilter up and running, I'm hoping to do some more investigation on that side.

- Being able to drop the flowrate at the start of the shot helps with soaking the puck and reduces channeling (ramp to 9 bar takes about 9 secs on the lowest setting).

- Having the group head temperature helps to see when the machine is fully heated up (or overheated after steaming).

- Other things like the auto shot timer and water level warning are just handy!


----------



## fatboyslim

Ridiculously awesome mod! I take my hat off to your electrical techno-wizardry.

Are you able to produce graphical representations of boiler temp, group temp during a shot? I'd love to see one.


----------



## PolarBearDave

Thanks! Will hopefully have a few interesting graphs by the end of the week. The thermofilter is the one thing that I've had issues with.

Just got a cheap triple basket, mounted an isolation valve through the bottom, along with the temp sensor. Filled it up with potting compound/epoxy but, schoolboy error, put too much in! Wouldn't lock in to the machine without hitting the shower screen.

Next try: I did it all again but found the thermal mass of all the epoxy has a big effect on the sensor readings. With it embedded in the resin block, although just under the surface, the sensor never got near the water temp measured by a thermocouple stuck up the valve.

So I've now cut the sensor out and mounted it protruding into the water flowpath. Just waiting for the epoxy to cure again before giving it a bash....


----------



## cjbailey1

PolarBearDave said:


> Just thought I'd show my compact little coffee corner with the finally 'finished' (for how long?) Rancilio Silvia V3 with integrated homemade Arduino controller.


How are you managing to keep the temperatures on the chips down within the stated range? I thought the arduino's were a max junction temperature of 85C which (under normal conditions) won't allow much beyond 60C I wouldn't have thought (dependant on how hard you are pushing it).


----------



## PolarBearDave

The internal case temperature is

As you say, the max temp for the Arduino is 85C, encapsulated power supply is 55C before it starts to derate (max 70C), & the LCD screen is 50C (but this sits half outside anyway). I've obviously mounted everything on the side away from the boiler.

The LM92 temp sensors have a max operating temp of 150C which is close to the boiler steaming temperature, but I don't make milk drinks very often anyway.

It's been running inside the case for a couple of weeks and has been rock solid - hopefully it will continue this way!!


----------



## cjbailey1

That's good to know. I've been considering it (although with a PIC or FPGA rather than an Arduino) but the measured temps I was getting were quite a bit too high after steaming. I guess I'll be investing in some insulation when I come to do it then, although that's unlikely to be this year as the house is taking up what little free time I have!!!


----------



## PolarBearDave

To be honest, I never really paid attention to the steaming case temperature - only normal espresso operation. I've only steamed a handful of times since I got the machine!

I was curious though so I tested the case temperatures this evening with about a 27C room ambient - blooming hot at the moment!

I left the machine on for 90 mins while I went to Tesco and it stabilised at 53C at the Arduino board (mounted on the RHS of the case, about level with the LCD in the photos).

I then put the steam switch on for 10mins, much more than you would need to steam anything. The temperature rose to about 63C before I flushed the boiler at the end. It probably would have continued to creep up a bit more if I had left it on for longer.

The case temperature during steaming is quite high, although this is a worst case scenario - now that I see this, for general robustness, I might investigate putting a cowling around the Arduino board and LCD modules with some high and low level holes to the external for natural ventilation. Thanks for putting me on to it!

The insulation on the boiler and steam pipe helps a bit, but I honestly don't think the kit from PID Silvia is the best. With the PID algorithm implemented in the programming, you can see what the I term reaches when the machine is stable i.e. what element output is required to offset the heat losses from the boiler. I haven't been very scientific about my observations, but I would say this has reduced by at most 10-15% - I thought it would be much more.

If I were doing it again, I would pay more attention to the R values of the insulation material - the kit has very heavy/high density rubber foam (I don't think any insulation value is quoted). I would imagine some kind of mineral fibre layer wrapped in a reflective outer would do better. If you can get the R values, then it should be a reasonably straightforward comparison.


----------



## Prata

PolarBearDave said:


> *Arduino controller with 16x2 character LCD screen:*
> 
> - PID controller
> 
> - 3 permanent temperature sensors (LM92 ICs rather than thermocouples)
> 
> - Boiler Top
> 
> - Grouphead Top
> 
> - Remote ambient (~30cm lead out of case)
> 
> - Home made thermofilter with 4th temperature sensor for calibration with PC logging on all channels (work-in-progress)
> 
> - Live calculation of the boiler temperature offset from brew temperature, based on remote ambient temperature
> 
> - Shot Timer & Memory
> 
> - Total and 'Trip' Shot Counter and Hours Machine On
> 
> - Water tank low water level warning
> 
> - Timed preinfusion period and pressure step down at end of shot


How did you mount the temperature sensor and make it waterproof/safe?


----------



## PolarBearDave

The LM92s are surface mount chips. I made some mini PCBs using plain copper clad board and a PCB design knocked up in Design Spark (free from RS Components) and printed to scale. I then stuck the design to the copper board and cut the track gaps with a dremel.

For the boiler top sensor, I left a lug at one end which I drilled a hole in for the existing screw between the two stock thermostats. I then covered the chip in thermal grease and screwed it on (including a spacer under the lug to stop it shorting were the cables attached to the PCB - you could also give them a thin coat of epoxy).

The grouphead sensor is simply held tight against the metal by the rubber foam insulation (cables pass out through a hole in this)

The ambient sensor just sits in free air at the far side of my grinder!

The thermofilter sensor was set in potting compound (http://uk.rs-online.com/web/p/products/552-668/) but I had to cut it out as discussed above. It's now just gooped in some Araldite which I had lying around which I think should be alright at the temperatures. Going to test it this evening. If it all melts out, I'll let you know!

In terms of safety, all the sensors are 3.3v so no major hazards.


----------



## Prata

Wow, I'm planning to do this with a Gaggia classic. Once I get my hands on it I'll see which area is the most suitable location for my one sensor, probably either boiler or grouphead. So there's no sensors in contact with the water? I assume you're taking the grouphead temperature and using it to adjust boiler power?


----------



## PolarBearDave

No sensors in contact with water (except for the thermofilter one which will hopefully measure the temperature of the water coming into the portafilter - only during calibration as it replaces the coffee basket!)

I use the sensor on the boiler for controlling the boiler heating element, as this is where the body of water is. The grouphead sensor is just to see if the grouphead is warmed up and stabilised in temperature (heat leaches across slowly from the boiler). This takes about 45mins on the Silvia while the boiler temperature takes only a couple of minutes to reach its setpoint.

It is in this steady state that the boiler temperature offset is calibrated (i.e. how much above the water temperature you want to hit the coffee must you set the boiler to deliver it - temperature is lost as the water goes from the boiler, through the group head, and out the shower screen). If the grouphead is colder (or hotter after steaming) than this equilibrium point, it will pull the temperature of the water coming through it in that direction.

I can't really see the benefits of trying to get a temperature sensor right into the boiler water, only the problems from trying to get it in there and sealed! The metal walls offer very little thermal resistance (i.e. temperature on the outside surface will be nearly identical to the internal surface). The thermal mass of the metal does mean there is a slight propagation delay of a change in temperature being shown on the outside, but this also serves to even out short term fluctuations you might get from the element pulsing.

The way I've set my controller up is for it to display a 'tick' when the boiler temperature has stabilised and stayed within 0.2C of the setpoint for 30 seconds. This way, everything is stable and the thermal mass of the walls doesn't affect anything.


----------



## PolarBearDave

It appears Araldite epoxy resin is not a great potting compound - my heath robinson thermofilter worked for about 45mins in the machine before the moisture got through the epoxy and to the chip.

What it did show when it was working was that you need a very small, quick response temperature sensor for this application - even with the chip relatively exposed to the water flow, it lagged significantly behind in the temperature reading. This is especially true if you want to see any kind of temperature profile during the shot, rather than just an exponential as it comes up to temperature.

Going to have to investigate interfacing a small thermocouple for this application - back to the drawing board!!


----------



## Prata

Ahh OK. My main concern was that I could imagine there being a significant delay in the temperature of the outer surface of the boiler reaching an equilibrium with the water inside, mainly because I haven't looked inside an espresso machine yet.

Is it correct that the starting temperature is the most significant factor in the quality of the shot? I.e. the PID controller only ensures a consistent boiler temperature for the start of a shot? If that's the case then should the boiler be fully powered on when the shot is being pulled, or is the response time quick enough that the heating element will kick in once it starts. The sudden flow of water through the boiler will surely cause a drop in temperature if the heating element is left off due to a lag in the final value of the temperature at the outer surface of the boiler.


----------



## PolarBearDave

I don't know enough to say what the important aspects of the temperature profile at the coffee are; however, I believe it is the stability through the duration of the shot.

Here's a graph of a shot I pulled this morning and logged (http://dl.dropbox.com/u/41046991/Silvia%20Shot.pdf) - rather a long one at 36 seconds. As you can see, the temperature sensor picks up the drop in the boiler temp pretty quick and kicks the heater in (full power after 2.5 seconds). But there is a delay before this heating input is seen back at the temperature sensor again (looks to be about 7-8 seconds on my setup). During this time, you can see the boiler temp dips well below the brew temp I'm hoping to get out (93.5C).

What you're relying on to maintain the steady temperature of the water coming out through this period in the thermal mass in the rest of the system (the bottom of the boiler and the group head). The incoming cold water connection is at the top of the boiler, right beside the temperature sensor, so this is picked up. However, the water going out is drawn down a small tube in the middle of the boiler, through the body of warm water at the bottom which I think also helps to stabilise it.

The main variable I'm missing in the graph is the temperature of the water going out, which is why I'm trying to make a thermofilter with a sensor in it that can measure this.


----------



## Prata

Thanks, that graph will prove useful when I try my own PID controller. I'll be interested to see the results when you get the thermofilter working. Best of luck!


----------



## w1lldabeast

Great setup! I'm looking at getting the v3 with PID + vario.

Have you ever tested the power usage? I'd love to know how much it uses whist warming up, pulling shots and just ticking over. Unfortunately I don't have the electrical know-how....


----------



## kklam

Wow, that looks like it was built at the factory.


----------



## sandykt

I have to say, you have done a very good job there. Well done.


----------



## alemarengo

Man, you should monetize your great mod!!!


----------



## pblittle

Very inspiring work. Great job. Time to get started on my Classic PID. Cheers.


----------



## medi01

Very impressive...

Is there a "how to" of some sorts?


----------



## hokie85ee

Wow - I'm late on this espresso machine modding topic - but was lead here by your impressive pics on google search! Very impressive. I want to repeat it!


----------



## dave1138

I have had the silvia with auber PID and vario grinder for a long time now and i've generally been pretty happy with it, as long as the roast is not too light! i remember when i first got it there was a routine on home barista i think for warming it up in 7 minutes. But now we are WFH with it connected to a smart plug it stays on 7.30 - 3pm - small price to pay to be able to walk up and make a coffee


----------



## phario

Hi!

Two somewhat random questions.

What's the advantage of the LM92 chip sensors compared to say, the TSIC306 sensors that I know people have used with Raspberry Pis?

And a really random one: how hard was it to carve out the slot for the LED screen on your machine?


----------

