Adding a DIY PID to the Gaggia Classic Pro

The Gaggia Classic is a very capable espresso machine that gets even better with a couple of improvements. Once the machine has been set to 9 bars of pressure (see bottom of article), the next big improvement is the addition of a PID. This gives the machine a whole new level of consistency, and gives you fine control over brew temperature. Here’s how to install a PID on the Gaggia Classic Pro.

There are several PID kits that are available for the Gaggia, the most popular ones are by Mr. Shades and Auber Instruments.

However, at the cost of convenience, these kits can be relatively expensive. On top of the original price tag, international shipping, taxes, duties and currency exchanges can make obtaining these kits time consuming and even more expensive.

I decided to go the do-it-yourself route, ordering the parts separately, at a fraction of the cost of the kits. I installed the PID so that there are no permanent modifications to the machine, and the Gaggia can be returned to factory condition at any time. Because there is very little information on how to install a PID on the latest generation of the New Classic (2018 and newer, also called the Gaggia Classic Pro in North America), here are instructions on to do this.

In a nutshell, the Gaggia Classic thermostat is replaced by the combination of the the thermocouple, the PID, and the solid state relay.

Before and after installation of the PID, simplified

The required parts are a PID controller, a solid state relay (SSR) preferably rated for 40 amps, a K-type thermocouple, a thermocouple adapter to connect the thermocouple to the Gaggia boiler, wire rated for mains voltages as well as some smaller gauge 12 volt wire, male and female quick disconnect connectors, spade connectors, and two piggyback spade connectors. Because the PID runs on mains voltages, an enclosure is required. Zip ties, heat shrink tubing, thermal paste, double sided tape, and a bolt and nut to attach the SSR are also required.

  • PID:PID kit I chose the REX-C100, which I ordered as an inexpensive kit with a thermocouple and a solid state relay. The REX-C100 PID is frequently used in espresso machines. It’s inexpensive and works well for this purpose. The kit ended up being cheaper to order than sourcing the parts separately. The 40 amp SSR that comes with the kit works well too. The problem with the kit that I ordered (and the problem with any PID kit, as far as I can tell) is that the included thermocouple is permanently attached to a threaded adapter that will not fit into the Gaggia’s threaded thermostat connector. To get around this, I had to order a separate thermocouple and adapter (see below).
  • K-type thermocouple:K-type bare thermocouple I ordered a separate K-type thermocouple, without an adapter. These are fairly inexpensive due to the demand from the 3D printing community. This one from Banggood fits into threaded adapters (see below), and is inexpensive.
  • Thermocouple adapter:M3 thermocouple adapter for Gaggia Classic the Gaggia boiler thermostats have M4 threads, so you need an adapter to connect the thermocouple to the boiler. Thankfully the 3D printing community uses all kinds of thermocouples and adapters, so these adapters can be relatively easily found. This thermocouple adapter works well.
  • Piggyback spade connectorTo avoid having to make any permanent modifications to the Gaggia, a couple of piggyback spade connectors will let you tap into the power cables without having to cut any wires.
  • There are very few enclosures that offer a perfect fit. A 1/16 extruded aluminium case offers the best fit and finish, but they are very hard to find. If you have access to a 3D printer, a case can be printed. Here are the STL files I adapted: enclosure, and lid.

Warning! This process involves working with potentially lethal mains-level voltages. Always work with the Classic unplugged. Do not undertake this procedure if you are not comfortable or uncertain.

Note: I fully tested the PID, SSR and thermocouple on the workbench before final installation. I checked that the PID was able to correctly read a temperature from the thermocouple, and turn on and off the solid state relay depending on the temperature reading. Because the wiring connections can vary between manufacturers, you should bench-test your setup before final assembly.

Here are the installation steps:

  1. Unplug the Gaggia Classic. This is VERY important! You will be working with potentially lethal mains voltages. Do not work with the Classic plugged in.
  2. Remove the portafilter and water tank.
  3. Remove the cover assembly and filler funnel by unscrewing the two small screws at the rear of the top. Pull the cover assembly off by pulling upwards, and disconnect the ground cables. Set the cover and screws aside.
  4. Pull off the steam knob and disconnect the steam wand. Although this is optional, it is difficult to access the power switch to tap power for the PID, and it is almost impossible to reach the thermostat without moving the boiler, and the boiler can’t be moved unless the steam wand is removed. To do this, loosen the nut connecting the steam wand to the steam control assembly. Pull the steam wand up and out of the Classic, and set it aside.
  5. Loosen the four bolts that hold down the boiler assembly. These are located around the shower screen. Once these bolts are removed, the boiler can be moved around without having to disconnect any hoses or wires.
  6. Tap the switched hot/load mains power: disconnect the lower left-hand (if facing the front of the machine) wire from the power switch. Plug in a mains-rated cable connected to a piggyback spade connector, and then plug the original switched mains cable into the piggyback. I hesitate to identify wires by their color, as the wire colors in the Gaggia seem to vary from year to year and from region to region. I strongly suggest checking which switch terminal switches the mains. Run this wire along the rest of the existing cables and out the back of the Classic, through one of the vent slots. Leave this cable longer than needed for now, it will be trimmed and terminated later.Switched mains power tap
  7. Tap the neutral mains: disconnect the lower wire from the mains connector at the back of the Classic. Double check that this is the neutral! Plug in a mains-rated wire connected to a piggyback spade connector, and then plug the original neutral cable into the piggyback. Again, as above, run this cable out the back, and leave it unterminated and longer than needed.Neutral mains tap
  8. Disconnect the two connectors from the brew thermostat, which is located on the bottom left-hand side of the boiler as you face the machine. This is probably the most difficult part of the installation. These connectors are hard to reach, and are on very tight. Using pliers to pull the connectors can pinch them on even more tightly, making them extremely difficult to remove. I found that carefully pushing the boiler up gives better access to the thermostat, either from above, or by reaching up from below. Be careful, the edges of the hole in the chassis are very sharp. Wear a glove when reaching in from below, otherwise bloodletting is likely.
  9. Pull the two wires that you removed from the thermostat up to the top of the machine, near the rest of the wires that run from the front to the back of the machine. These wires will be connected to the solid state relay later on, so they no longer need to be in the bottom of the machine.
  10. Remove the thermostat. It’s threaded on, and should not be very tight. Leave as much of the thermal grease in place as possible. Keep the thermostat, in case you want to return the Classic back to factory condition. Original Gaggia Classic thermostat
  11. Thread in the M4 thermocouple adapter in the place of the thermostat. Do not over-tighten the adapter, it only needs to be finger-tight. Thermocouple and adapter
  12. Slip some heat shrink tubing over the thermocouple, and ideally dip the thermocouple tip in some thermal grease, then insert the thermocouple into the adapter. Heat the shrink tubing. Thermocouple adapter assembly
  13. Thread the thermocouple wire through to the back of the machine, and out the same slot as was used for the other wires. If the thermocouple wire is too long, coil it up inside the machine, well away from the boiler or any uninsulated connections, using zip ties to hold the coil in place.
  14. Using two 5-8 cm pieces of properly-rated wire (15 amps for North America), make two connectors to connect the thermostat wires to the AC terminals of the solid state relay. One end of the wire should be a male disconnect connector, and the other end should be a spade connector. Tighten one end of your connector down to one of the solid state relay’s AC (~) terminals and plug the other end into one of the disconnected thermostat wires. Do the same with the other connector wire. It doesn’t matter which thermostat wire is connected to which of the AC terminals on the solid state relay. SSR and thermostat wires
  15. Run two 12 volt wires from the + and – terminals of the solid state relay and out the back of the Classic, again using the same slot.
  16. Attach the solid state relay to the inside back wall of the Classic, using a small bolt and nut. It should be placed as close to the left-hand side of the Classic as possible. Most assembly guides recommend using some thermal paste between the SSR and the Classic to ensure that any heat from the SSR is dumped to the chassis.
  17. Make sure that all the new and repositioned wires are cleanly routed away from the boiler and pump and any uninsulated connectors. A couple of zip ties come in handy here. You should now have two mains wires, two 12 volt wires, and the shielded thermocouple wire running out of the back of the Classic.
  18. Re-attach the boiler with the four bolts, re-attach the steam wand, push on the steam knob, and put the lid assembly back on, without forgetting to re-connect the two ground wires.
  19. Trim, terminate and connect the wires you routed out the back of the Classic to the PID. Depending on the enclosure, you may need to insert the PID into the housing first. The two mains wires connect to terminals 1 and 2 (starting counter-clockwise from top-left). It doesn’t matter which mains terminal is connected to hot and which one is connected to neutral. The 12 volt wires from the SSR connect to terminals 4 and 5. The thermocouple connects to terminals 6 and 7. Make sure the polarity for the SSR and thermocouple wires is correct, this is important. PID wiring
  20. Close the PID enclosure, and attach it to the side of the Classic. Double sided tape will work.
  21. You should be done! If the wiring was done correctly, the PID should power up when the Classic is turned on.

The REX-C100 should work out of the box, set for heating mode, with alarms disabled, and units set to Celsius. However, depending on the seller, some settings may need to be changed. Consult the instructions that came with your PID to make sure.

The default target temperature on the PID will almost certainly not be correct. For the Gaggia Classic, taking into account the temperature drop between the boiler and the group head (5-8 degrees C), the PID target temperature should be set to about 103 degrees C or 220 degrees F at sea level.

To set the target temperature, press the ‘Set’ button on the front of the panel. Then use the cursor keys to select the digits to increase and decrease.

Leave the Classic powered on for at least 15 minutes. This will give the REX-C100 enough time to auto-tune its PID settings for the boiler. When the temperature stabilizes to within 1 degree of the target temperature, the auto-tuning is complete.

Brew away!

Final note: before going down the PID route, the easiest modification to make, and the best starting point for Gaggia Classic modifications, is lowering the brew pressure. The Classic’s over-pressure valve (OPV) is set to 14 bars, which is a pressure better suited to the use of pressurized portafilters. For espresso, 9 bars is the generally preferred pressure. For the Classic Pro, this requires either shortening the spring in the OPV valve through trial and error, or ordering a spring kit from Mr. Shades.

20 thoughts on “Adding a DIY PID to the Gaggia Classic Pro”

  1. Hey Chris,
    Thanks heaps for the detailed instructions. I plan to do this shortly for my old gaggia classic. Would you be able to post starting values for the PID kit please?
    I’ve been reading up many different values for the P, I and D, and i’m not sure where to start.

    1. Hi Nish. I have not changed any of the P, I or D settings on my controller. The factory settings have been working well for me, aside from a ~5 degree C overshoot when it first reaches the target temperature. Once warmed up, the recovery time is quick and the swing is fairly minimal. Maybe I’m missing something?

      Nevertheless, I will take a look and see what values my controller is set to.

    2. Hey. You said here that the to get an M3 thread for the boiler. Everything else (Auber and Mr Shades) includes an M4 thread on their pt100.

      Is this a typo on your part or a mistake on their part? That is confusing.

      1. Hi Andrue. You are right, it’s an M4 thread, not M3. The listing shows both M3 and M4 options, and I typed the first one when I wrote the article. Thanks for the catch, I will correct the article.

          1. Hi Ray. Unfortunately, no, you can’t use the factory sensor. The GC comes from the factory with a simple thermostat that turns on at a certain pre-set temperature, and turns off at another pre-set temperature. It’s not a sensor, it doesn’t send any information, it just switches on an off, at setpoints that you can’t adjust. If you go for a PID, you need to use a thermocouple.

  2. Hey Chris, I’m wanting to put the pid into an extended 3d printed driptray. If you had to recommend a single display PID, which one would you steer me to? Thanks in advance, this was a huge help!

      1. Hi Miguel. The C-100 can accommodate only one sensor/SSR, so you would only set it for brew temperature. You can use the sensor reading on the PID display to know when to start steaming. The PID will be more or less bypassed when the steam switch is on, it will just stop trying to heat because the boiler will be over the PID’s target temperature.

        Otherwise, as I said in instructions above, to set the brew temperature, press the ‘Set’ button on the front of the panel. Then use the left/right buttons to select the digits to increase and decrease, and the up/down buttons to change the digits. It’s pretty straightforward.

  3. Hi , I followed the instructions but the PID starts up with some number and it doesn’t look normal , LCD just keep blinking some numbers the goes of for a few seconds the I get some numbers for half a second, it’so quick I can’t tell what is displaying, could I have got the power wiring wrong or if the cable are higher AWG would it causes issue?

    1. Hi Kez. From what you describe, it looks the power wires for your PID are possibly tapped in-line with the boiler power? This would explain the constant switching on and off. Try powering the PID directly from mains power, with just the thermocouple connected (disconnect the SSR). You should see a strange number when the PID first powers on, then after about 3-5 seconds it should switch to the temperature reading from the thermocouple. If the PID stays on when wired directly to mains power, you will need to figure out which power wire to tap into. It should be the power/mains line that comes out of the main power switch, but before the boiler.

    2. So the above instructions might not apply to the UK, I have the GC2019 but the live connection was the top right on the power switch when switched on, bottom left caused the PID to flicker and not work as expected, I fixed my issue but now the PID readout is 103 Dec but the water is 80 degrees, didn’t think it would be off by this much. Is there a way to calibrate the read out close to the water out temperature

      1. Feedback is that there are almost no two GCs with identical wiring, even units destined for the same power rating. Wire colors and positions seem to vary. Glad you got that sorted out.

        I would be surprised if your water is 80 degrees coming out of the boiler with the PID set to 103, but it’s possible, depending on the thermocouple you’re using. This video clearly shows how to program in an offset on the Rex C-100:

  4. Hi chris,

    I bought the same parts as you have reccomended in the article but have run into the issue that the thermocouple is too large to fit into the adapter (they’re approx the same OD). Did you have to alter your thermocouple at all to get it to fit into the adapter, like removing the cap on the end or something?

    1. Hi Evan. The PID I ordered came as a package with a solid state relay and a thermocouple, but that thermocouple had too big a diameter to with the Gaggia. The thermocouple that I ordered fit into the threaded adapter without any modifications. You could definitely drill out the adapter a bit to get the thermocouple to fit. Brass is soft and easy to drill, and all the adapter needs to do is provide a connection between the thermocouple and the boiler, so there would be no hard in doing this.

    1. Hi Eddie. That controller is an interesting find. You’re giving up one of the two temperature readouts, so you’ll probably only see the actual temperature, as opposed to the target temperature, and I guess you can switch between the two with a button press.

      It should work as a replacement for the C-100 and SSR, but because the SSR is built into the PID, so your wiring will be a bit different. This PID-SSR combination does away with the 12v connection, and uses three wires for the mains power and SSR, with one wire shared between mains and the SSR output. You would need to put the boiler heater element between the controller terminals 2 and 3. But I would definitely read the instructions that come with whatever you receive!

      1. Hi Eddie. I have re-read the specifications for this controller. The SSR is only rated for 5 amps. This won’t be enough for the boiler heating element. You need at least 20 amps. You would probably blow the fuse in this controller/SSR within seconds.

        I think this is why using a separate SSR and controller is the only way to go. At the amperages required to control the boiler heating element, you need an SSR that has enough mass and exposed metal to be able to attach it to a heat sink.

Leave a Reply

Your email address will not be published. Required fields are marked *