Espresso Temp

by rabbitcreek in Circuits > Microcontrollers

1108 Views, 7 Favorites, 0 Comments

Espresso Temp

IMG_6163 2.jpeg
expresso!

I don't want to wade into the infinite discussions that revolve around the making of an expresso drink...I have no qualifications to even start. But I thought you might be interested in a simple add-on to your morning coffee pull that will make it easier to make a better cup. Expresso machines have a lot of dials and buttons on them but the medium priced ones have "idiot" lights rather than an actual thermometer to tell you when the boiler is "up to snuff" ( a curious term that ascribes being sharp and competent with the use of a chemical stimulant...snuff not caffeine...). Some machines have a slow heating boiler and you have to give them a 1/2 hour to get them going. Mine, a Gaggia Classic is known for a fast heating boiler--usually 5 minutes will do. There is a light on the machine that seems to represent the heating element activation and while it doesn't have the precision of a PID controller it works ok. But there is nothing on the machine that actually tells you when your coffee temp reaches that plateau of around 195 F, which is generally considered the near optimal temp for pulling a shot. It is even hard to measure this temp because where exactly do you measure it? The water in the boiler? The Group Head? The temp of the pulled shot...? These will all vary. I used a small microcontroller that is perpetually sleeping and a tiny amplifier for a K type thermocouple that is carefully attached to the brew head. With one press when you turn on the machine, the bright LED enclosed ring will breath until the temperature reaches 190 when its steady glow indicates it's time to brew. The unit is stuck by magnets to the side of the machine and is easily attached to the brew head in seconds without need for surgically opening your machine. The rechargeable battery lasts for weeks and tons of coffee without need for extra plug-ins. The display is made of silicon so it is temperature resistant and the whole unit costs about $30.

Supplies

IMG_6002.jpeg
IMG_6065.jpeg

The size of the battery is up to you. The microcontroller I like currently is the new tiny Xiao ESP32 S3 even though the project is not connected to Wifi or Bluetooth. I used a Red NOOD but they come in a variety of colors. I got the button from Digikey.

  1. Thermocouple Type-K glass Braid $10 Adafruit
  2. Thermocouple Amp $15 Adafruit
  3. Seeed ESP32 S3 microcontroller $7--This unit is so good!
  4. Push Button $1
  5. Silicon Tubing 3/8 inch OD 300mm $1
  6. Flexible LED filament NOODS $4 Adafruit
  7. Supermagnet 15 mm x4 $1
  8. Silicon straw
  9. Litho Battery 1000 mah $3

3D Print Housing

expressoTempPicture.jpeg

The two 3D printed parts are the cover and the main box. They are printed in PLA-Matt finish. The box requires some degree of support. The cover contains the inlays for the 4 magnets that hold it to the side of the coffee machine. I am currently using a Bambu P1P printer which is superb. The box has preprinted holes for the heat sink nuts--2mm.

Wire It

IMG_6115.jpeg
IMG_6116.jpeg
IMG_6128.jpeg

I did not do a wiring diagram for this one but did include the pinout for the Xiao ESP32 S3 unit. The wiring is very simple and a custom board would make this project more compact and even easier to build. The basic wiring can be found at:https://learn.adafruit.com/thermocouple as it utilizes the amplifier. The DO is connected to D3, CS is connected to D4 and CLK is connected to D5. The NOOD strand is connected through a 30 ohm resistor to D2. The other side of the strand is connected to ground. The push button to activate and stop it is connected to D1 through ground and a 10k ohm resister to 3v to bring it high when you press on it. The battery is connected to the back of the ESP32 board through a slide switch that is left on all the time. This provides power to the microcontroller and allows the battery to be charged. The K thermocouple is attached to the screw mounts provided on the amplifier. You might have to shorten the wires before attaching it.

Building It

IMG_6209.jpeg
IMG_6228.jpeg
IMG_6208.jpeg
IMG_6229.jpeg
IMG_6113.jpeg
IMG_6114.jpeg
IMG_6131.jpeg
IMG_6149.jpeg
IMG_6144.jpeg
IMG_6141.jpeg

After printing the two halves of the case the heat nuts are placed in the printed holes. Two 2mm screws are used to hold the amplifier down. The Microcontroller is hot glued into its receptacle so that the USB-C head is centered in the opening. This is for charging and for programming. The push button is glued into the supplied hole in the case. Run the wire connections for the NOOD and the thermocouple out through the nipple opening in the case and through the silicon straw. The Silicon tube is cut to the same size as the NOOD strip--300mm and the NOOD strip is fed through it. This is sometimes difficult but adding a stiff wire feed may expedite this. You must complete the soldering of the NOOD strip after it exits the other end of the silicon tube. A Zip tie of appropriate size is fed down through the silicon tube with the NOOD strip to the outside. This will give additional heat protection and allows you to zip tie it to the correct dimension ring to tightly squeeze it on the the group head. The K thermocouple is fed out through the nipple and the silicon tube. Before securing the LED ring on the group head use heat resistant mylar tape to carefully bind the head of the thermocouple to the edge of the group head. (see photos) After it is secure adjust the zip tie band to hold the silicon tube in position over the taped thermocouple. All wiring is done from the back of the group head so as not to interfere with the operation of the unit. Glue the superMags to the inside of the cover. I ended up actually using four to hold it into position.

Program It

Screenshot 2023-10-04 at 6.13.38 PM.jpeg
Screenshot 2023-10-04 at 6.29.47 PM.jpeg

The program is really easy. It is basically the Adafruit Library and intro program for this K thermocouple and the amplifier. The first program (GraphTemp) allows you to see what your machine is doing when you turn it on. In graph 1 you can see that the temp rapidly climbs and levels out at about 200F. This was quite reproducible and took about 4 to 6 minutes. The light that indicates when the heater coil is on went on and off periodically but did not seem to cause unusual jumps or declines in the temp so it was kind of useless as a predictor of temp. The second graph show what happens when you produce a shot through the group head. It causes an immediate and prolonged decrease in group head temp and it takes about another 3 minutes to reach temp again. After you have looked at the plateau temp of your unit you need to program this into the second program as your set point that you are happy with. I used 190F and it goes in setTemp variable at the top. The setup section of the program sets up the "breathing" sequence for the LED chain and start for the K amplifier and the sleep cycle for the microcontroller. The loop function watches for the push button to turn off the unit when pushed and queries the thermocouple for when the temp rises over the set point. After 10 minutes it goes back to sleep but can be woken up multiple times. The sleep current requirements are pretty low for this unit and the LED does not draw that much current. You could expand the software to initially check the slope of the heating curve and choose its own set point on power up and have it save this value when it goes to sleep.

Using It

IMG_6177.jpeg
IMG_6175.jpeg
IMG_6290.jpeg

It's been a fun unit to play with and its honestly improved my barista skills quite a bit. I used to hit the on button and be drawing a shot as soon as the grinder finished but the wait-out really improves the quality especially with the second and third shots. The unit attaches with magnets and doesn't require any mechanical, glue or electrical connections and the silicon tube is very resistant (so far) to the heat and water spray that occasionally rains down on it. You can slip the whole unit off in seconds. It is not part of the IOT and doesn't have an app or internet connection. Of course being a ESP32 you could easily wank it up to the internet or your phone and play with the data all you want. But the inherent beauty of the unit is you just want to know when it's ready and get the coffee thing done. (There is a cute ESP32 with a tiny pinky-nail size screen if you want a readout at anytime...) And if the disco drink look isn't for you in the morning..a more subtle color of NOOD or less blinky fanfare is easily achieved.