PID Adventures

A couple of PID projects just finished:

A PID (proportional–integral–derivative) is a device that uses an algorithmic control loop feedback mechanism to maintain a set-point. They see a lot of application in industrial machines, and are quite popular for controlling temperature in various devices. The algorithm parameters are adjustable, allowing the device to learn how to efficiently maintain a set-point over time.

I have two devices that I wanted to implement accurate temperature control over. The first was my espresso machine, a Rancillio Sylvia. A single group, single boiler workhorse that has been providing me with decent espresso for over ten years. One of the few complaints for this machine is it’s lack of temperature control. Coffee is really temperature sensitive, and ideal extraction temperatures vary by both the bean origin and roast profile.

The stock Rancilio ships with a simple non-adjustable physical thermostat switch screwed to the top of the boiler. There is no way to adjust the boiler set-point or know the temperature of the water as it exits the brew head. So a PID is a very good solution for this problem. Many people have already solved this problem, and you can buy kits with all the bits and pieces to retrofit your machine. However, the kits are kind of pricey for what they provide and you can easily source the parts yourself. I managed to finish this build for around fifty bucks.


The prototype being tested on the bench.

Testing the low output voltage of the PID->SSR switch


The modification is pretty straight forward, however there is 60Hz line voltage in play, so caution is warranted. The circuit consists of the PID hooked to a Solid State Relay (SSR) and a K-Type thermocouple. The PID triggers the SSR (attached to the boiler) based on the reading from the thermocouple.

You can see the PID on the right side with all the wires running to it. The hardest part for me was deciding which thermocouple to use and where to place it. I ended up sinking the tip of the probe just under a screw in the top of the boiler. It’s surprisingly quite sensitive there and provides very efficient feedback.

The first test with water in the boiler:

Tuning the PID parameters


In the end the PID for the prototype (shown above) was to big and bulky, so I ordered a mini form-factor and 3d printed a small case for the final build.

1/32 DIN PID installed next to steam wand

Parts List

  • Morning Group Intelligent Programmable PID Temperature Controller 1/32 DIN LED Digital Display XMT7100 (Amazon)
  • 24V-380V 25A SSR-25 DA Solidstate Relay (Ebay)
  • K Type Thermocouple Probe (Ebay)
  • Wire + Connectors
  • Thermal Paste for the SSR interface to the chassis

The one thing I may change in the future is changing to a J-Type thermocouple. On my particular Sylvia they apparently offer better performance than a K-Type. YMMV.