Tuning Rancilio Silvia

The Rancilio Silvia is a very good espresso machine. It is extremely robust and looks great. However, temperature control is relatively poor. Temperature can easily oscillate by 30 °C (see here) and individual shots therefore differ quite a bit in quality if one does not apply special techniques (e.g. "temperature surfing", see here). The reason for this poor performance is the large hysteresis of the mechanical thermostats that are used to turn the boiler heater on and off.

Many people have therefore modified their Rancilio Silvia and added a PID (Proportional, Integral and Derivative) controller. Links to their pages with step-by-step instructions and reports are at the end of this page. Almost all solutions include adding a commercial PID controller. While this is convenient and relatively simple to do, it is not a very flexible solution. Using a microprocessor that can be programmed allows for much more flexibility.

I wanted the following features:

  • PID-controlled temperature when pulling coffee
  • PID-controlled temperature when frothing milk
  • A shot timer
  • An automatic standby mode (heater off) when not used for longer time
  • Easily adjustable temperature set points
  • Audible beeps when temperature is reached and after 20 second of pulling espresso

The result of all the work:

A microprocessor control and a LC-display attached to a gooseneck (the gooseneck thing was inspired by this PID mod here). There is also a key (push-button) at the back of the display.

The modified Rancilio Silvia. Note the display mounted to the gooseneck in the back. There is also a red key (push button) behind the display.

Modes of operation and display

Here's a list of the display modes of the "new" Silvia. Note that the display is in German, but the meaning should be quite obvious (Kaffee = coffee, Dampf = steam, Betrieb = operation, Heizen = heating).
The LC-display is always organised in the same way. The right hand side shows actual temperature and set-point. The left shows the mode of operation plus extra information. This here shows the display during warm-up. "Kaffee" indicates that the temperature is set for pulling espresso.
Here the boiler reached the target temperature. It generally stabilises to a tenth of a ° Celsius.
The display when the steam switch is flipped. I use a relatively high temperature to get a lot of dry steam.
When pulling an espresso, a shot timer starts and a beep sounds after 20 seconds. One can see the temperature drop.
After 2 hrs, Silvia enters standby mode (heater turned off) and stays in "sleep" mode until a switch is flipped. The display indicates total up-time.
Temperature setup mode is entered by pressing the key at the back of the display for 5 seconds. The steam switch selects the temperature that is adjusted -- this is indicated by the square brackets [ ]. Depressing the key only shortly increases the temperature, while pressing it longer decreases the temperature by 1 °C.
I think standby mode is an important feature. Not only does it save energy, but household machines also are the most frequent source of fire (not that I wouldn't trust my wiring...).

A few words on temperature control

When the temperature drops, the PID controller almost immediately turns on the heater thanks to the derivative-component of the PID algorithm. This is not so important when pulling an espresso. The temperature at the group head is different from that in the boiler. While the boiler temperature drops during a shot, the group head is heating up and the two effects may even compensate. Finding the best temperature set-point is therefore a thing of trial and error and in theory also depends on the flow rate of the water (i.e., the size of the espresso).

Good temperature control helps a lot when frothing milk. There is no need for any tricks to keep the heater on because the heater goes to full power very quickly once the temperature starts dropping.


The Technical Details

Here follow the technical details. Note that this is not intended as a step by step instruction on how to do this. You really need some level of understanding of microcontrollers to do this. However, I hope that explaining the concept will help others to modify their Silvia in a similar way.

Silvia re-wired

I decided to completely re-wire Silvia, for two reasons: First, there would have been too many modifications needed. And second, I think that the original Silvia wiring is not optimal because the over-temperature protection switch does not turn off all components if it is triggered (see here for the original cabling).

Wiring diagram. Note that the components OPTO_SENSE and OPTO_TRIAC are placeholders indicating functions that are on the power interface board described below.

As you can see, the mains power (actually the phase) connects to the over-temperature fuse right after the main ON/OFF-switch. The electrical ingredients of Silvia consist essentially of (a) the solenoid valve, (b) the pump, and (c) the boiler's heating element and an indicator lamp. These components are controlled by the three switches located in the front panel of Silvia (designated BREW, WATER and STEAM in the schematic above). All switches are connected to mains power because they have a little indicator lamp that would not work otherwise. There are essentially four modes of operation:

ModePumpSolenoidTemperature
StandbyOFFOFFlow
PullingONONlow
Hot waterONOFFlow
SteamOFFOFFhigh

Pump and solenoid are controlled directly by the mechanical switches "BREW" and "WATER". The state of the solenoid and the steam switch are sensed using an opto-coupler (designated OPTO_SENSE1 and OPTO_SENSE2 in the diagram). The heating element and the associated indicator lamp are controlled by the microcontroller using an opto-triac (aka solid state relay).

The Power Supply and Power Interface

The printed circuit board. The green connector at the bottom delivers the 12V power for the microcontroller (no cable connected in photo).

The power supply part at the top of the schematic is standard and delivers ca. 12 volts.

The heater and lamp are controlled by an opto-triac, here an MOC3083M (this is the central part in any solid state relay). The MOC3083M is fine for 800 Volts so that it can be used both for 110VAC and 220VAC mains power (220VAC equals 630V peak-to-peak!)

The SENSE_1 and SENSE_2 inputs are connected to optocouplers. The low-pass filter on the low-voltage side (R6/C2 and R8/C6) buffers the time between the mains half-waves during which the optocoupler's LED is lit (once every 20 milliseconds at 50Hz). This works fine because the microcontroller has Schmitt-Trigger inputs at the respective port.

There is also a small piezo-buzzer so that the program can generate audible "beeps". All signals are connected to the microprocessor board via a ribbon cable (SV5).

pwr

The power interface schematic. Click for larger version.

Microcontroller Board

The microcontroller board.

The microcontroller board is one that I had designed for general use. I therefore contains some parts and features that are not necessairily required for the present purpouse. I used a PIC18F4523 because it includes a 10 bit AD-converter and has a lot of free ports. It does not require many peripherial components, has an internal oscillator, and can fully be programmed in C. It is available for ca. US$ 4.50 from Microchipdirect. However, many other PIC microcontrollers would do.

The temperature is sensed by a PT100 resistor that I glued onto Silvia's boiler. The PT100 is part of a bridge (R12, R13, R14 and PT100) that is fed with a stabilised 2.5V from a voltage reference (D9, a LM385-2.5). The signal from the bridge is amplified by the instrumental amplifier made from two OPAMPs. I used the quad OPAMP MCP604 from Microchip because of its 5V power supply and rail-to-rail operation at both inputs and outputs.

The quartz Q2, the RS232 interface at the top right, and most connectors on the schematic are not needed for the present purpouse. I did, however, assemble the RS232 interface for debugging purpouses.

The microcontroller schematic. Note that many parts are not needed for the present purpouse. Click for larger version.

The Software (Firmware)

The PIC controller was fully programmed in C using the open-source SDCC compiler. The source code can be downloaded here: silviatune.zip.

Some useful links:


Other PID links


Last edited: 31-03-2008 pn (silviatune@gmail.com)