# Gene Cafe Modified with Bean Mass Probe



## Rob1

I've finally done it. Will upload pics shortly.

I haven't had a cup of coffee since last Friday (I had some delays getting this project done) and I can say it's worth it to have an accurate temp reading for the bean mass. Now I can estimate the temp within 5c (it might be consistently out by 5c or it might vary, further roasts are needed to test but if it's consistently out I'm happy







) without relying on the colour changes as indications.

I just need to find a way to log the data automatically from a bluetooth connection. I know a lot of roasters here have probes and I was wondering if any of you use software that can plot data from a COM port without a USB connection?


----------



## The Systemic Kid

Roastmaster software from  here  is really powerful.

Probes need to hooked up to something like  this  from ETI. The Bluetherm has an app which will allow for realtime temp reading on an iPad. Downside is info isn't stored as is the case with Roastmaster software so you can build your own roast log. Roastmaster also provides realtime roast profile, so you can watch as temp builds towards first crack.


----------



## Rob1

Thanks but I don't think that'll work.

I would have to try sending the data to my raspberrypi and then on to the iPad as iOS does not let me pair with the device I have now. The Bluetherm software might be capable of connecting to the current hardware but I think that's unlikely. Will have to do some further experimenting.


----------



## froggystyle

Which route did you go down in terms of getting the probes wires out, seen one that uses a plate with contacts...


----------



## Rob1

I mounted three tiny chips to the plate on the exit side using Sugru. An adafruit pro trinket communicates with a MAX31855 thermocouple amplifier, and a Bluefruit EZ Link sends data back to my computer (I can also program the Pro Trinket with this). The thermocouple goes in through a small hole I drilled on the inlet side of the roasting drum and sits behind the "fin" of the metal partition so it is out of the airflow. Multiple readings are taken every second with the lowest value being the Bean Mass. I got everything from here: http://roasthacker.com/?p=67 with the program code linked in the second comment.

He's just documented a wifi version with 3D printable harnesses for the chips and battery which clip on to the handle, but I'd already bought the parts for the bluetooth version so thought I'd give it a shot.


----------



## Rob1

http://cpc.farnell.com/adafruit-industries/1317/flora-li-po-battery/dp/MK00082 (£5.63)

Looks terrible but I made use of the wire I chopped off the thermocouple. It's quite rigid and I guess it offers some kind of insulation, though none is likely necessary. The tap is just to cover the ends of the wire as it's sharp and I stabbed myself more than once. The JST connector is obviously on a wire which is wrapped around the battery so the connection is as close to the edge of the battery as possible. This allows me to just plug it in to the Bluefruit EZ link (left, Below) and it floats nicely away from the end plate and drum. It gets a little warm but barely above body temperature.







http://cpc.farnell.com/adafruit-industries/1501/trinket-attiny85-microcontroller/dp/SC13312 (£6.02); http://www.ebay.co.uk/itm/161953232167?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT (£20.50); http://www.ebay.co.uk/itm/110901365666?_trksid=p2057872.m2749.l2649&var=410118777036&ssPageName=STRK%3AMEBIDX%3AIT (£2.50)

Excuse my terrible soldering. Originally I had pins installed in the pro trinket ports BUS, 5v, GND, 8, 6. Unfortunately I was wrong in thinking the BUS could be used as a I/O and thought I'd destroyed my Max31855 aplifier as I was getting no signal. I altered the program to use ports 8,6,5 but damaged port 8 (and possibly 6) when trying to remove the header pins and old solder so switched to ports 3,4,5. The wires snapped a couple of times due to torque and I'm hoping they hold now. I can either wait and see or put some glue/resin/sugru on them to take any tension.







http://cpc.farnell.com/labfacility/im-k-m-lcf/connector-mini-t-c-line-pair-type/dp/SN35948 (£5.95 but slightly cheaper to buy both separately, bizarrely. Search for "Thermocouple Connectors" and click the link that pops up to get a page with all available).

Just showing how the thermocouple connects to the amplifier. I'm happy to say the Sugru provides a great hold and grip for the lower connector, but it might be possible to let them hang loose so long as the wires aren't long enough to let them get snagged on anything.







http://www.modmypi.com/raspberry-pi/breakout-boards/adafruit/adafruit-thermocouple-amplifier-v2.0/?search=max31855 (£14.99); http://www.modmypi.com/raspberry-pi/breakout-boards/adafruit/adafruit-thermocouple-type-k-glass-braid-insulated/?search=max31855 (£7.99)

The glass braid frays easily and I was worried about it getting caught in the teeth of the rotating drum so I put some sugru around the worst of it to hold it back. In the original project linked in the above post the amplifier was attached to the drum which I imagine meant it got quite hot, but here it just gets a little warm (about 50c if that).









The probe pokes through a hole I drilled in the bottom. I first drilled on the outside of the drum inwards and then took out the metal partition and drilled out. I had to press down hard. Really hard, and blunted a new drill bit in the process (2x2.5mm for about £1.50 from Wilko).

You'll also need a charger for the battery http://cpc.farnell.com/adafruit-industries/1304/flora-tiny-usb-li-po-charger/dp/MK00080 (£5.15) and a soldering iron if you don't already have one https://www.amazon.co.uk/Weller-SP40NKUK-SP40N-Soldering-Iron/dp/B00NVKIL70/ref=sr_1_1?ie=UTF8&qid=1461605466&sr=8-1&keywords=weller+soldering+iron (approx £25)


----------



## Rob1

Guess where the hole was drilled

















How the roaster looks after the project.

Total Cost: £95.03

I got these parts during the ebay 20% off sale together with those I'd need to add electronic control to my grinder. There are much cheaper soldering irons available but I wanted one that wouldn't fall apart or fail after one or two sessions. I've included that into the cost above so the cost will be £70 if you already have a good iron...and Sugru however much that costs. I used 2 packs but might get a third to take some strain off the wire connections as mentioned.

V2 of this project has just been released and uses WiFi instead of Bluetooth. This works out even cheaper as you can forgo both the pro trinket and bluefruit ez link in favour of the Huzzah for £10.50 before postage (https://shop.pimoroni.com/products/adafruit-huzzah-esp8266-breakout?utm_medium=cpc&utm_source=googlepla&variant=4488091585&gclid=CjwKEAjwgPe4BRCB66GG8PO69QkSJAC4EhHhVSZgdo4lC-QEBMnGap1mVe_zp-XIVXcfBLl1PLgT2hoCJojw_wcB).

V2 details are here: http://roasthacker.com/?p=529


----------



## Rob1

As an update:

I've done two more roasts since (been busy) and the temperature readings do seem to be VERY accurate. The only anomaly produced is the ROR jumps up artificially on First Crack before settling down again -- IOW the readings become inaccurate at about 205c and then become accurate against from about 213c onwards with first crack rolling between 212-214c and ending on 219/220c.

First crack seems to begin consistently at about 209c but as I said it seems to get there too quickly considering the ROR going into 200c. I believe the energy released from the beans on first crack (at 205c) might be causing the probe to read higher until they've released a lot of energy and the readings settle down again at or after rolling. Can anybody with experience of using a bean mass probe comment on this -- is it something that is expected? If it is I could well be missing a couple of pops because I don't hear anything until the probe reads 209c-212c.

Anyway, I've been messing around all week with Python scripts, running things in various programs, modifying existing code, trying different methods of logging data etc. Today I made some real progress in that I formatted the information coming from the serial port in a really nice way that's easy to read. I cut the print outs down to once per second and removed the 0 padding on low temp readings (i.e "023" is now "23") because it seemed easier to handle that amount of data and openoffice calc wouldn't chart digits beginning with zero.

Then I came across this: http://homepage.ntlworld.com/green_bean/coffee/roastlogger/roastlogger.htm

And edited my code a little so it sends the data formatted in a way that it expects and voila! I've now got a charting, logging software with alarms and ROR calculation on the fly all in one. I've spent a few hours more than I intended mind and as it's 3:30 now I'm not testing it until tomorrow at the earliest.


----------



## Rob1

With Smoothing:









Without Smoothing:









Drop in temp around first crack could just be bad reading. By ear I wouldn't think it stalled.


----------



## r0bin

that's a great mod, congrats!

good idea to put the board away from the drum, i take note.

i have a gene too, wondering if i would take the plunge as well...

after three months, what is your feedback? (edit: 15 months now, err..)

Is it still up and runing? any improvements you see?

Do you recommend this mod? did it improve your roasts?


----------



## Rob1

@r0bin you might want to click the link to the project I copied and take a look at the second version. It would be cheaper than mine and apparently has some advantages. The entire project would allow you to control the roaster with a computer.

@DavecUK would you recommend the 230v heater mod? I managed to get hold of one the prodigit 2000MU energy monitors from a seller on eBay and my voltage is between 245-250v (which is consistent with my previous energy monitor). I'm finding a 20% Dev time produces integrated flavours but all a little muted. With the Ethiopian dry process I'm getting weak blueberry notes when roasted to the first pops of second crack with an unpleasant bitterness probably from the roast flavours...id be interested in reducing time between yellowing and first crack to reduce caremalisation. I'll likely be experimenting with a 15% Dev time with a final bean temp of 230c for my next roast.


----------



## DavecUK

Rob1 said:


> @DavecUK would you recommend the 230v heater mod? I managed to get hold of one the prodigit 2000MU energy monitors from a seller on eBay and my voltage is between 245-250v (which is consistent with my previous energy monitor). I'm finding a 20% Dev time produces integrated flavours but all a little muted. With the Ethiopian dry process I'm getting weak blueberry notes when roasted to the first pops of second crack with an unpleasant bitterness probably from the roast flavours...id be interested in reducing time between yellowing and first crack to reduce caremalisation. I'll likely be experimenting with a 15% Dev time with a final bean temp of 230c for my next roast.


If your voltage is always 245-250 then no, but in winter the voltage usually dips and so a 230V element can then come in handy. If you do fit one just remember a few rules, limit wattage to no more than 1000W in summer, as it gets colder e.g. 8C and lower you can overboost with 1100 to 1150W, cos air is colder so heating element will be OK.

If your roasting Ethiopian Harrar and want blueberry, you need to stay away from second crack, not enter first too fast and have a slightly longer overall roast...this emphasises the blueberry. I can roast in the Dalian in 13.5 minutes and not much blueberry, lengthen the roast to 15 or 15.5 minutes with the techniques I mentioned and for the same level of roast it's huge blueberry notes.


----------



## r0bin

@Rob1 thanks for this!

I saw his project initially, but i was worried about the battery being too close to the drum.

i prefer your mod, and i already have a trinket with lipo (i did a wireless scale for my Rocket & have few spares)

i have experienced issues with raspberry and Bluetooth BLE though, i hope ill fix them this time, otherwise it'll be a wifi mod...

by the way, do you use a computer to read the Bluetooth probe, or something else?


----------



## Rob1

@DavecUK thanks for that, saved me a bit of money there. I'm roasting a dry process Ethiopian Yirgacheffe which is supposed to have blueberry notes. I'm curious, would extending the roast bring out other berry-fruity flavours for other coffees as well or is this something you find is unique to the Harrar for some reason?

I've noticed Bella Barista have started selling a Sidamo with strawberry notes, if it's the same one as stocked by smallbatchroasting (both Guji) I'll be a little annoyed because they didn't list Strawberry as one of the notes when they cupped.


----------



## SageBEuser

@Rob1, I've been grateful for your posts on modifying the Gene Roaster and on your "Arduino boards" that send data to your PC. I have modded the Gene with a Kemo phase width modulation device (dimmer). All works well on the Gene.

My next step is data logging. You mentioned that you had a Thermocouple Amplifier coupled to a Feather Board and were sending data back to your PC by Bluetooth but I think you mentioned that a better way might be to use a later, ESP8266 with, say, a MAX31855 Thermocouple amplifier and send data back by WiFi. Did you ever migrate to this model? If so, what function/library did you use to stream the temperature readings to either a data file/or post to a webserver?

My MAX31855 communicates well with the ESP8266 and my readings list nicely on the Arduino IDE Serial Monitor. The ESP8266 successfully creates its own webserver which I can view via my home network, but I'm stuck now in finding a mechanism to either create a data file of readings to transmit over WiFI or to post the data readings to the webserver. This is not my field and I'm a the limits of my capabilities! If you have already managed this it would be helpful if you could give me a few pointers.


----------



## Rob1

@SageBEuser

I never went down the WiFI route. I might be at some point though. There might be some guides to follow from adafruit that will help you make sure you're sending data to the webserver, if you are it's just a matter of formatting it to display in the way you want.

This should help: https://github.com/evquink/BeanMassProbeV2/blob/master/AdafruitIO_BeanMassProbe_Clean.ino


----------



## SageBEuser

Thanks Rob1. The code looks interesting.


----------



## Rob1

I don't know what you can do with data over MQTT. I run an MQTT raspberry pi server, it might be possible to plot data published via MQTT with artisan somehow.


----------

