Bean Mass Probe V2 – Basic Configuration

Some time ago I developed a bean mass probe for the Gene Cafe coffee roaster.  If you are familiar with  this roaster, you will know that adding a bean mass probe is a little tricky because of the way the drum rotates.  Basically, to make this work, you have to have a wireless temperature transmitter to get the data off the rotating drum and, additionally, you have to deal with the fact that the beans will not always be in contact with the thermocouple.

My first attempt at this worked pretty well using an Adafruit ProTrinket coupled with a Bluetooth board.  Recently, I developed the second generation of the bean mass probe using an ESP8266 micro controller (Adafruit Huzzah) that allows me to connect directly to the roaster using WiFi and MQTT.  With this I have now created a pretty slick Internet of Things Bean Mass Probe.

I’ve actually converted the entire RoastGenie system to IoT technology but that is a topic for another post.

The basic architecture of the system is shown in the figure below.  I host my own MQTT server (Mosquitto)  but I think you could easily use Adafruit IO as your MQTT broker.  I’ve not worked with this system but it looks like it has some nice features.   If you use Adafruit IO, I think you could access you live bean mass temperature data with a web browser instead of a traditional MQTT client (I use MQTT Spy). The real utility of having the bean mass probe use the MQTT protocol is that you can easily integrate the data into other systems (like the RoastGenie itself).

Architecture

The bean mass probe consists of the following components: Adafruit Huzzah micro controller, MAX18255 thermocouple amplifier, and a LiPo battery.  The schematic is below.

schematic

Note: A previous version of this schematic I posted had an error (the power lead to the thermocouple amplifier was shown incorrectly connected to 3Vo instead of Vin)

These components are attached to the Gene Cafe on the rotating plate on the inlet side of the roaster.  The connection between the drum and the TC amplifier is done using mini K thermocouple connectors from Omega engineering to facilitate easy removal of the roasting drum.  The LiPo battery is attached to the roaster with a pair of Neodymium magnets so it is very easy to remove and recharge.

IMG_1157

The thermocouple is installed in the drum as shown in this post.  This system works like a charm and is very tolerant to disruption in connections – unlike the Bluetooth version which would typically not reconnect if there was some problem (like a discharged battery).  I will try to get some additional details posted about software over the next several days — in the meantime, let me know if you have any questions.

13 thoughts on “Bean Mass Probe V2 – Basic Configuration”

  1. Thanks for your earlier response in your previous post.

    I have a few questions. What material did you use to mount everything to the Gene Cafe, except the battery, which is mounted via magnets? I assume some heat resistant silicone.
    LIPOs are very sensitive to heat and they can easily be damaged, which is dangerous. Did you shield it against heat? If yes, how?

    I plan to get the Gene Cafe next month, but I would like to put the bean mass probe together before that and I also want to do the software setup. I see that the yellow thingy (TC connector) is attached to the thermocouple and amplifier. Could you please share a link where I can buy it? How did you install the thermocouple sensors exactly?

    I liven in Europe and this is the first time I attempt to do this, I would like to make sure that I order the right products. The pics show which Adafruit items to get. I’m not sure about the TC connector though.

    I might have some future questions regarding setup and software, like bean mass temp calculation. If you have the time and patience it would be great to see a high level step by step of the software setup or at least the code you have used.

    Also, what is the major difference between this setup and the RoastGenie setup? I would rather to this once and do this right.

    Thank you very much for your help.

    Tamas

    1. Hi Tamas,

      Happy to help as much as I can. In answer to your questions:

      The bean mass probe shown here is just one part of the RoastGenie. The RoastGenie replaces all of the electronic controls for the Gene Cafe and allows you to collect, store and post the data from each roast. The bean mass probe handles the temperature measurements from the drum. As shown here, the bean mass probe can be used as a stand-alone device. You would just have to provide a means of reading and displaying the data it is sending. Getting the bean mass readings is one of the biggest benefits you can get — I would suggest that you start there. The other modifications can be made later if you want.

      For the bean mass probe, the thermocouple is inserted into the drum through a small hole I drilled in then end. The picture at the top of this link shows the thermocouple placement pretty well. You can use high temperature RTV to seal the hole and help secure the thermocouple to the drum. Sugru works even better (it does not peal away so easily) and seems to handle the heat just fine.

      I secured the electronics to the rotating end plate of the roaster with small machine screws. To do this, I placed the components, marked and drilled holes in the rotating end plate of the roaster and then used epoxy to secure nuts on the inside of the rotating end plate. You have to disassemble the roaster to do this. I also secured washers on the front side of the end plate with some epoxy to space the electronics off just a little.

      The magnet to hold the LiPo battery is also mounted to the end plate of the roaster using epoxy. I taped another magnet to the battery using aluminum tape. The temps on the plate are not all that high and the epoxy tolerates it fine (so far). Since the only contact between the battery and the roaster is through this small magnet, it does not heat up too much. The aluminum tape is very shiny so that help keep the radiant heat transfer from the drum to the battery low as well. I’ve been running this set up with the battery like this for about a year with no trouble but you are right to be careful with the heat.

      I will work on posting more software details as well as some step by step instructions — maybe over the weekend. Some of the software libraries I originally used to set up the bean mass probe have changed so I need to update some things a little bit.

      Are you new to roasting or have you been at this for a while? I was astounded at how good the coffee I roast really is. I started doing this about ten years ago and can’t imagine ever going back to purchased coffee.

      Evan

      1. Hi Evan,

        I am new to roasting, so far I’ve ordered the roasted beans and prepared them with the Australian made Portaspresso system. I was travelling a lot , so this the portable solution I choose. I realized that it is difficult to get the freshest roast at the right time and I also could save money on the long run (if I don’t try25 different roasters) roasting my own beans.

        This is why I would like to use a system where I can easily replicate my roasts. Gene Cafe is good enough. I’m reading a book, a long time back people made great roasts by smell, looks etc. I don’t think I need to spend thousands for home roasting, but a bean mass probe would be nice.

        Thanks for your answers. The future software instructions will be highly appreciated:)

        One thing I don’t understand, and it is probably because I don’t own the Gene Cafe yet. I want to put the temp probe together first, set it up, then I get the Roaster.

        So… in order to avoid twisting the temp probe wire, the whole system has to rotate together. You mentioned that Omega TC connector and you needed to facilitate the easy removal of the drum. This is what I don’t understand..why do you need to disconnect the thermocouple?

        Based on the pictures the electronics are on the outlet side, the TC is at the inlet, but everything moves together, right?

        Thanks and enjoy the weekend.

        1. I think I understand now. There is a rotating plate at the inlet side. Electronics, TC connector are attached to this plate. The TC has to be inside the drum, so this is why you need the connector.
          It is difficult without seeing the Gene Cafe, but I get it now.:)

  2. Thinking about the LIPO heat shield. Maybe wrapping the lipo in some lipo pouch material (the on people use when charging lipos, therefore protecting everything around the lipo in case of fire) or som Aluminum Heat Shield Tape.

  3. I’ve found the thermocouple connecor you are using based on the pic, then I carefully read your first post and comments again and I saw the link.
    If you can post some pics later on with the thermocouple position inside the drum and how do you mount it exactly, it would be appreciated. I would like to replicate the same mounting as yours.:)

    Thanks again for the help!

  4. Hello Evan,

    Just wanted to say that I’ve also implemented a variation of your solution, I was firmly inspired by it and have fully credited you 🙂

    I use an app on my iPad called Roastmaster, and I’ve started a discussion with the author of that app about feeding in from your bean mass probe setup directly into the Data Logger within Roastmaster – meaning hands free temperature recording.

    If you are interested, the post is here: https://rainfroginc.com/frogpad/index.php?topic=154.0

    I took a slightly different approach to the code implementation than you have. I’ve used an interrupt to trigger the data collection (although I have bought a tilt switch and will wire that in to physically trigger temperature collection when the probe is actually in the bean mass). I’m broadcasting the data to a proof-of-concept iOS app. Details:
    https://github.com/rswift/wifi-temperature-broadcast/
    https://github.com/rswift/iOS-WiFi-Temperature-Receiver/

    Thanks for the motivation. All the best – Robert…

  5. I should have mentioned, I found the cold junction compensation of the MAX31855 to be highly variable due to the significant mass of the termination block, so I removed it and soldered the thermocouple directly to the board… The problems vanished before the iron was back in the stand! The temperature reading from the chip now follows the junction and my readings are far more consistent…

    1. Thanks for the props Robert. I am pleased to hear that my work inspired you! I am looking forward to digging in to your project a little to see what I can learn. The Roastmaster application looks interesting – I have used a couple of different approaches for capturing/visualizing my roasting data. When it was all working it was nice but the whole setup was a bit finicky relying on a unch of bodged up scripts and I had trouble getting reliable operation. I am pretty happy with my bean mass probe so now maybe I can spend some time getting the data logging working again.

      I have noticed what I believe to be a temperature offset in my readings — thought this might be cold compensation issues but have never taken the time to investigate further. The readings have always been pretty consistent — as least as much as I could tell in the highly fluctuating environment.

      Best of luck to you.

      Evan

  6. Hello again Evan.

    Just wanted to let you know I’ve continued to tinker and expand on where I started. I’ve just updated Github with a new hardware capability. Details can be found here: https://github.com/rswift/wifi-temperature-broadcast

    In short, I found that the tilt switch I was using to trigger the probe reading wasn’t reliable. It was ok, but a bit hit and miss, I’d get a swing of 10-20°C depending on the exact timing. So I’ve binned that idea and implemented a magnet based hall effect sensor on the inlet side of the Gene Café. This has allowed me to position magnets (south pole to start reading, north pole to stop) then transmit a simple UDP message from one ESP8266 to another. So still using hardware to trigger, but just adding a network call in the middle.

    I’ve also had some discussions with Danny from Roastmaster (the iPad roasting app) and he’s done some good work there – essentially off the back of my work, which was off the back of yours.

    All the best – Robert…

    1. Hi Robert,

      I just spent some time this evening looking at all of the work that you and Danny have done — very impressive. I am pleased to provide the inspiration but certainly humbled by the talent you both bring. I had stumbled across Roastmaster some time ago and thought it provided a fantastic and flexible way to capture data but I also want to be able to integrate direct control of my roaster into the data collection application. From what I can tell the Roastmaster app requires the user to manually adjust the roaster controls to achieve the desired profile. I have fully replaced the controls in my roaster such that I can control heater, drum motor and fan through MQTT messages. With my limited software skills (and even more limited time) I have been making very very slow progress towards writing the software to leverage this remote control capability. If I were able to achieve direct control through Roastmaster I would have exactly the setup I had envisioned. In your conversations with Danny, did you ever discuss if Roastmaster could be extended to provide direct control capability?

      Thanks for sharing the info.

      Evan

  7. Hi Evan,

    I don’t know what the potential options for controlling a roaster from Roastmaster would be. But I cannot imagine it’d be very difficult to achieve, Roastmaster has trigger mechanisms already (for example, a time based notification to change the temperature) so it isn’t a great leap to imagine sending that control message over a network. I would imagine it’d need a slightly different approach to the temperature, purely because there is no significant impact if a temperature reading is missed, but failing to set a given fan speed or temperature would most likely lead to a duff roast – no ideal…

    My suggestion would be to visit the RM forum (https://rainfroginc.com/frogpad/index.php?board=8.0) and post a message over there, I’ve found Danny to be very accomodating.

    Danny has included various event types, whizz down to line 270 here: https://github.com/rainfroginc/Roastmaster_RDP_Probe_Host_For_SBCs/blob/master/Roastmaster_RDP_Probe_Host_SBC.ino and you’ll see the enum definitions. Given this is beta at the moment, I’d assume these may change, but it should give you an idea about what’s what.

    You asked about accuracy. I think I’m off by about 10°C which is probably similar to your 20°F? Roastmaster has an offset to set an adjustment if you need, I’ve not set that yet, but will probably do so when I’ve built up more data. One thing is clear in my setup, the temperature stabilises as it increases, I think the hot air skews the readings a little as things warm up. Certainly having the readings automatically appear somewhere means so much more time to focus on the colour, smell etc. so it has been great in that sense.

    It is great to tinker with things like this, especially with no time pressure to meet a deadline, I’ll continue to watch your progress and breaking into the controls of the Gene Café is next on the list. Well, after I’ve tweaked the performance of my magnet trigger, and finished the bike frame I’m making, and all the other things that distract me 🙂

    Cheers – Robert…

    1. Thanks for the pointers — I will see what I can learn. I sent an email to Danny last night and he already replied with some thoughts. It would be fantastic to integrate Roastmaster with my control scheme. I need to post the latest version of the bean mass probe — I packaged everything up in a tiny little printed enclosure that does not interfere so much with using the handle. Once I learned about high temperature PLA it has proven to be a nice solution.

      I should have known you were a biker from your coffee passion — I’d be interested to hear more about your bike frame project – drop me an email if you want. Biking is what I do when I am not roasting or … working 🙁

      Evan

Leave a Reply

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