# tin can air roaster!



## PhilDawes

I wrote this a while ago but I realised I never posted it here. I think it's a good starter design that can be incrementally turned into something really worthwhile.

http://phildawes.net/blog/2020/12/27/cheap-diy-air-roaster/


----------



## MediumRoastSteam

@PhilDawes - This is quite interesting.

Question for you: How did you manage to connect your probe to Artisan? What did you use in between? Or did you buy some sort of smart probe that is somewhat compatible? I was looking into adding a k-type probe to my bread maker but I'm getting stuck in options. I can buy the probes, but the only option I can find is something like this: https://thepihut.com/products/adafruit-analog-output-k-type-thermocouple-amplifier-ad8495-breakout?variant=27739615761&currency=GBP&utm_medium=product_sync&utm_source=google&utm_content=sag_organic&utm_campaign=sag_organic&gclid=Cj0KCQiApY6BBhCsARIsAOI_GjaQgme5pJnWxxug4ylcrmuNV7TqMuryxJlWCqPPH-RAcT0GORHjHUQaArEWEALw_wcB

Would be interested in knowing what you used.


----------



## PhilDawes

Hi @MediumRoastSteam

I started with an arduino and tc4+ breakout board, which is excellent but comparatively pricey and difficult to source. After a few months of that I managed to break the tc4+ and I went for a max31855 and then an adafruit max31856 (which I'd now recommend as it has a higher resolution than the 31855).

One thing about max 31855s - depending on the board some of them require 3.3v, so an arduino (5v) will overload it.

So my setup is now: Arduino uno with 2x max31856 + some v cheap k-type thermocouples. I use a 40A SSR (also cheap) to control the heatgun and use artisan's software PID, which is working pretty well for me - I'm getting pretty smooth ROR curves with minimal smoothing of the signal (smooth curves=2).

Although I don't have a tc4+ anymore, I still use the tc4 protocol to talk to artisan as it is simple to write code to and works well with artisan.

The 8495 looks easy to wire to an arduino (stick the analog pin into A0 and read that). The pihut page says sensing accuracy is +-2c which unfortunately doesn't sound adequate for controlling a heater with PID.

If I were to start again I think I'd still go with arduino + max31856. The nice thing about this setup is that if something breaks it's easy to replace.

Do you have any arduino experience? I can send you some code and help if you need. I am intending to write this up some time but I keep not quite getting round to it.


----------



## MediumRoastSteam

PhilDawes said:


> Do you have any arduino experience? I can send you some code and help if you need. I am intending to write this up some time but I keep not quite getting round to it.


 Hey there! Thanks for replying. I'm a software engineer and have been playing about with an Arduino Uno with my son - but sadly I don't have much time to dedicate to it, usually due to lack of ideas. So I was thinking of doing something like you did, but with a bradmaker. Just haven't had the time to carry on this week.

I've ordered some green beans last week, so will start back on this sometime when the beans arrive. I've started thinking about how to mod the bread maker, putting thermocouples - I have one attached to the pan, but I'm not sure how good an indication that is yet - so want to check that first. My toolbox is pretty basic, so I don't have even have the ability to drill a hole on the bread maker pan - it's old, so no issues there.

Even my hea gun is too basic for all of this as it only has med and high setting.

Of course, before I really deep dive into buying Dremel tool, new drills and heat guns etc I want to get the basics right. And, the good news is that, the thermocouple is the piece which can be reusable whatever I decide to do.

If you could send me the links of the thermocouples you bought (happy to see your code too) I'll buy it and will start taking a look at it all. This is definitely the sort of project I have in mind which will enable me to learn new things. Thank you! - Just drop me a PM at your earliest convenience. Again, thank you.


----------



## PhilDawes

These are the k-type thermocouples I bought: https://www.amazon.co.uk/gp/product/B082MGZYL7/

N.B. originally I took off the yellow plastic plugs to get the bare wires to connect to the terminal blocks of the breakout board, but actually these are really flimsy and it is much easier to leave the plug intact and find some other way to connect them. Crocodile clips can work ok. Recently I found that the plugs fit in those white cable connectors pretty well (e.g. https://www.amazon.co.uk/gp/product/B01NGU80LM/), (and then I connect to the board with regular wires)

I'll dig out the code later..


----------



## MediumRoastSteam

@PhilDawes - Fantastic! This is really good stuff! Thank you so much! - I just got the greens through the door! (I'm adding this to my favourites) 👍


----------



## Rob1

You can use Phidgets as an alternative to the TC4.


----------



## Achrys

Loving this post - and very tempted to start a build. I'm getting tired of the popcorn machine's small capacity - and my laziness to do it more frequently! (I need to move 'bits' around in the garage, and the smoke is irritating - even when opening the door and a window for through-draft). I'd do about 3 or 4 roasts on the blower (240-320g green - yielding 210-270g 'ish), before walking away due to it heating up too much. The results have been okay, although nothing compared to a decent machine costing serious money... (one day Rodders...).

I think that stability of the whole unit and the exhausting would be my focus - which if I can solve well with your above work (amazing btw), I can try and find it a more permanent space in the garage - and therefore eliminate the pain I go through now each time.

Great post.


----------



## PhilDawes

PhilDawes said:


> I'll dig out the code later..


 I've removed the SSR and fan controls, so hopefully is more straightfoward. Basically artisan connects over serial and says 'READ' and arduino replies with 4 temperature readings (only one of which we're using in this case).



> #include <Adafruit_MAX31856.h>
> 
> // Uses the TC4 protocol to talk to artisan-scope
> // Install the adafruit max31856 library (arduino ide menu tools->manage libraries)
> // connect max31856 pins to arduino: CS->10, CLK->13, DO->12 (+ vin, ground)
> // To test: open arduino ide tools->serial monitor (115200 baud) and type 'READ'
> // To connect to artisan: menu: config->device-> enable TC4. Ok. Select port, set Baud Rate=115200, Ok
> 
> // Protocol see https://github.com/greencardigan/TC4-shield/blob/master/applications/Artisan/aArtisan/trunk/src/aArtisan/commands.txt
> 
> // max31856 CS pin
> const int thermoBTCs = 10; // bean mass temp
> 
> // For hardware SPI, CLK is 13, DO is 12
> Adafruit_MAX31856 maxthermoBT = Adafruit_MAX31856(thermoBTCs);
> 
> double tempBT = 0.0;
> 
> //Parsing Serial Commands
> void handleSerialCommand(){
> 
> if (Serial.available()>0){
> String msg = Serial.readStringUntil('\n');
> 
> if (msg.indexOf("CHAN;")== 0){ //Ignore this Setting
> Serial.print("#OK");
> }
> else if (msg.indexOf("READ")==0){ //Send Temps
> Command_READ();
> }
> }
> }
> 
> //Send Data
> void Command_READ(){
> Serial.print(0); // ambient temp
> Serial.print(",");
> Serial.print(0); // tc chan 1
> Serial.print(",");
> Serial.print(tempBT); // tc chan 2
> Serial.print(",");
> Serial.print(0); // tc chan 3
> Serial.print(",");
> Serial.print(0); // tc chan 4
> Serial.println();
> }
> 
> void setup() {
> Serial.begin(115200);
> 
> if (!maxthermoBT.begin()) {
> Serial.println("Could not initialize BT thermocouple.");
> while (1) delay(10);
> }
> 
> maxthermoBT.setThermocoupleType(MAX31856_TCTYPE_K);
> 
> // TODO: maybe switch to a different mode, manually sampling to sync with artisan?
> maxthermoBT.setConversionMode(MAX31856_CONTINUOUS);
> }
> 
> void loop() {
> tempBT = maxthermoBT.readThermocoupleTemperature();
> handleSerialCommand();
> }


----------



## MediumRoastSteam

PhilDawes said:


> I've removed the SSR and fan controls, so hopefully is more straightfoward. Basically artisan connects over serial and says 'READ' and arduino replies with 4 temperature readings (only one of which we're using in this case).


 @PhilDawes - Thank you! Quick question. I'm not very familiar with Arduino in terms of connectivity. I only did very basic stuff.

How do you connect to your PC/Mac for Artisan? Mine has an USB port - I assume it was for powering up and PC/Arduino code transfers.

Are you saying that this is *also* how you connect to Artisan? Just via the USB port or do you need a special connector? Thanks!


----------



## PhilDawes

Rob1 said:


> You can use Phidgets as an alternative to the TC4.


 Oh yeah this is a v good point: I think the Phidget stuff looks a lot easier to hook up to artisan - there's no arduino code to build or connect.

Also the adafruit Max31856 I got from pihut came with the pin header and terminal block as separate pieces so I had to solder these on myself, so that's another blocker. (Does anybody know if you can get these pre-soldered from anywhere?)

If you do go the Phidget route it looks like you need the vint interface (about 28 quid) and the TMP1101_0 (about 40 quid, but you get 4 thermocouple connections with that).

https://www.robotshop.com/uk/phidget-vint4-input-thermocouple-interface.html
https://www.robotshop.com/uk/vint-hub-phidget.html

Unfortunately they look out of stock at the moment.

There's more on the artisan site https://artisan-scope.org/devices/phidgets/


----------



## PhilDawes

MediumRoastSteam said:


> @PhilDawes - Thank you! Quick question. I'm not very familiar with Arduino in terms of connectivity. I only did very basic stuff.
> 
> How do you connect to your PC/Mac for Artisan? Mine has an USB port - I assume it was for powering up and PC/Arduino code transfers.
> 
> Are you saying that this is *also* how you connect to Artisan? Just via the USB port or do you need a special connector? Thanks!


 Yeah this is how I connect to artisan - the usb port supplies the connection and powers the arduino.

There are arduino bluetooth and wifi interfaces you can get, but I'm fine just plugging my laptop in.


----------



## Dan Dyse

Guys ... you can use the Phidget 1048 instead. Just connect the couples to it, plug the Phidget into your PC/Mac and start Artisan.

I am doing so with my self-made roaster and it's working great. This seems to be an official UK dealer for Phidgets:

https://www.active-robots.com/1048-0-phidget-temperature-sensor-4-input.html

Cheers!


----------



## Rob1

I got my stuff from active robots but they're more expensive than robotshop. Robotshop seem to run out of stock or perpetually be in a state of awaiting new stock with their estimated availability date shifting back and forth.

@MediumRoastSteam I got my 3mm thermocouple from active robots. You can find them elsewhere but beware of the difference between grounded and ungrounded probes. Ungrounded are less prone to noise as the probe isn't in contact with the metal sheathe. You might be able to just use a bare thermocouple as I did in the gene.


----------



## Beeroclock

Phidgets 1048 is older tech now - would humbly suggest VINT hub and TMP 1101 - which is both cheaper and allows for adding all sorts of goodies down the line should one want to.

My only concern with these tin cans is what sort of toxins may or may not be released by the lining in those tins?

Cheers Phil


----------



## MediumRoastSteam

@Beeroclock - think the idea here is to use that as a proof of concept, and eventually replace with a Pyrex or equivalent heat proof glass cylinder.


----------



## Rob1

MediumRoastSteam said:


> @Beeroclock - think the idea here is to use that as a proof of concept, and eventually replace with a Pyrex or equivalent heat proof glass cylinder.


 Something like this https://www.amazon.co.uk/dp/B07XLK2D7P/?coliid=I32X0U0K1K6GDK&colid=1CC5SI8Y1QYJB&psc=1&ref_=lv_ov_lig_dp_it&th=1


----------



## MediumRoastSteam

@Rob1 @Beeroclock - I'm not sure if borosilicate would be good enough for the temperatures here. In any case, in the article by there's a section "Finally, some upgrades:" which take exactly about the improvements over the initial presumably PoC version. 👍


----------



## Rob1

Ha. He links to the same thing as me in his post. Interesting coincidence. I found it when I was looking for something to splice into my ducting so I could see the smoke and moisture.

You could easily get a sheet of steel shim, roll it to the right diameter, weld the seam, and make cuts so the airflow is like a cyclone. I'm not a fan of the way he heats it up with a gun just directly under the beans. It probably works fine but I'd think the heat/air could be distributed around the chamber better.

You could have a separate cyclone fan sucking air through the system with a heating element around the steel shim....but you'd have to calculate the required airflow. That way you'd have a separate chaff collection point too.

You might not have to weld it actually, high temp rtv sealant and some brackets would do.


----------



## PhilDawes

MediumRoastSteam said:


> @Rob1 @Beeroclock - I'm not sure if borosilicate would be good enough for the temperatures here. In any case, in the article by there's a section "Finally, some upgrades:" which take exactly about the improvements over the initial presumably PoC version. 👍


 Actually I've had no problems with my cheap borosilicate glass tube over probably ~100 roasts.

Also in this post on homeroasters, greencardigan seemed to be having success with a standard glass tube which surprised me. Maybe because the glass doesn't heat or cool particularly rapidly maybe makes it ok?


----------



## PhilDawes

Rob1 said:


> I'm not a fan of the way he heats it up with a gun just directly under the beans. It probably works fine but I'd think the heat/air could be distributed around the chamber better.


 Yeah I'm always looking for ways to improve airflow! Welding is a bit beyond me though.

At the moment I use a kind of ramp above the gun which directs the air at an angle up one side of the chamber, and the beans flow up one side and down the other.

This is an old picture, but kind of illustrates what's going on










I also now have some of the mesh covered in the basket so that the returning beans don't receive direct air. That seems to work better than blasting air up the middle to create a fountain. Also gives a way to adjust the flow vs pressure.

The other requirement is that I need an air-flow free place in the chamber to put the bean probe because I'm using a PID. If the probe is anywhere near the air stream I get really noisy inputs.


----------



## PhilDawes

Beeroclock said:


> My only concern with these tin cans is what sort of toxins may or may not be released by the lining in those tins?


 Yeah that's probably a very valid concern! If you look carefully at the first video in my post you can see some of the glue getting tacky and beans sticking to it.

I found that you can still buy cans without any obvious lining: peach cans from asda seem ok. Definitely some experimentation required though


----------



## MediumRoastSteam

PhilDawes said:


> Actually I've had no problems with my cheap borosilicate glass tube over probably ~100 roasts.
> 
> Also in this post on homeroasters, greencardigan seemed to be having success with a standard glass tube which surprised me. Maybe because the glass doesn't heat or cool particularly rapidly maybe makes it ok?


 I just read about here, that the maximum temp before any fractures is 165C.

https://en.wikipedia.org/wiki/Borosilicate_glass

But if it works - and you just confirmed it does, then that's great!


----------



## Rob1

MediumRoastSteam said:


> I just read about here, that the maximum temp before any fractures is 165C.
> 
> https://en.wikipedia.org/wiki/Borosilicate_glass
> 
> But if it works - and you just confirmed it does, then that's great!


 That's the temp differential as in thermal shock resistance e.g. if you fill it with oil and heat it to 165c and then put the glass on ice it'll break. The max temp is can withstand is much higher.


----------



## MediumRoastSteam

@PhilDawes - million dollar question: in comparison to the coffee you get roasted by pros, how do you compare your own roasts against theirs? What coffee do you like? Medium light or dark roast? This is giving me a lot to think about. I definitely want to roast again, but undecided on what. I find there isn't a lot out there for the home market. Had a Gene Cafe, haven't got on with it, dating a Behmor but I'm not 100% sure about it, and the breadmaker roasting is hit and miss, and I melted the lid! 😂🤭


----------



## PhilDawes

MediumRoastSteam said:


> @PhilDawes - million dollar question: in comparison to the coffee you get roasted by pros, how do you compare your own roasts against theirs? What coffee do you like? Medium light or dark roast?


 I like light to medium roasts. When I get a new coffee I roast a 150g batch to a default profile and take 10g samples after first crack every 30 seconds (or so, usually ~5% development intervals). Cupping them I almost always prefer the either the 1:30 or 2:00 sample. Usually once the grassyness and some of the acidity has gone but the character of that particular coffee is still there, before any real roasty flavours have kicked in.

I don't have any experience with non-diy home roasters, but looking at the Behmors I'm not sure if it is possible to take samples - if not I'd consider something else because taking samples along the roast and comparing is such a perk of roasting for me. Doing this and thinking hard about what is going on has definitely improved my palate and enjoyment of the process.

Is it as good as the pros? That's difficult for me to answer because I'm aware that my palate is improving and I've become more critical. If you'd have asked me early on I would have said 'just as good as anything I've tasted', but now I'm not so sure I was in a good position to judge. I haven't bought roasted coffee from a really decent roaster for a while, so I need to do that again and compare to what I roast now that I've got a bit of experience.

I certainly enjoy what I roast, but then I also roast what I enjoy so it's somewhat self fulfilling.


----------



## MediumRoastSteam

@PhilDawes - Have you ever considered NOT modifying the heat gun, and, instead, have a kind of "junction" where the blower is below the nozzle of the heat gun so it blows the hot air from it upwards (as opposed to blow the heat from the heating element - appreciate what you have now is more efficient, no doubt, but was just wondering).


----------



## PhilDawes

MediumRoastSteam said:


> @PhilDawes - Have you ever considered NOT modifying the heat gun, and, instead, have a kind of "junction" where the blower is below the nozzle of the heat gun so it blows the hot air from it upwards (as opposed to blow the heat from the heating element - appreciate what you have now is more efficient, no doubt, but was just wondering).


 I've thought about it briefly - I wish I'd thought of it before building my existing setup as I'd be interested to know how well it could work. My suspicion is that it might not get enough heat to the beans - the heater element power is the limiting factor in my current setup.

Did you have any thoughts about what to use for the junction? Are there standard gas pipe parts that have this format?

I do remember seeing a picture of a homebrew fluid bed roaster where there were 3 heatguns that each blew hot air into a pipe at right angles from the main blower. I was surprised then that there wasn't a lot of backpressure blowing heat back into the heatguns but iirc the owner was adamant that it was working well. I'll see if I can find it again later


----------



## PhilDawes

Here it is:










https://homeroasters.org/forum/viewthread.php?thread_id=5168


----------



## MediumRoastSteam

PhilDawes said:


> Did you have any thoughts about what to use for the junction? Are there standard gas pipe parts that have this format?


 Thank you. I've ordered the blower yesterday as per your blog post. I already have a heat gun, but it's a very simple one, with full power and half power switch. I was thinking of heading to B&Q at the weekend for some inspiration. I was thinking some gas/copper pipe with a 45 degree junction somehow.

I thought about buying the Behmor, but, confidently, you posted this thread and completely de-railed my plans! In a good way.

So I'm prepared to give this a go, slowly and surely. Will start simple, try a few things and then keep incrementing it, specially around the electronics.

Question for you: What did you use for the mesh? Did you just buy something or just destroyed a tea strainer?


----------



## PhilDawes

MediumRoastSteam said:


> Question for you: What did you use for the mesh? Did you just buy something or just destroyed a tea strainer?


 Originally I had a sieve. Then I bought some sheets https://www.amazon.co.uk/gp/product/B077KZJPD8/ (a tenner - you can probably get them cheaper).


----------



## PhilDawes

FWIW here's an artisan graph of a roast I did this evening. This is a new bean (to me) so I took some samples at 10%, 15%, 20% development after FC and then finished at 25%. I use these samples as a starting point to decide how I'm going to roast the rest of the batch.

I take each sample by moving the ducting hose to one side and dangling a little mesh basket into the chamber to collect about 10g of beans. Unfortunately the change in airflow around the bean probe from having the basket next to it creates some spikey BT readings which confuses the artisan PID, so I disable that before sampling and just coast, adjusting the heater manually. (this is why the blue BT line stops tracking the template curve after about 8m30)

I now have an additional temp probe at the top of the roasting chamber (XT - exit temp, the red line), which is convenient because it makes it obvious at what point I dangled the basket in so I don't need to record this at the time. I then subsequently mark these events and correlate them with later cupping.









(For the record: bean temp smoothing is '2', ROR is 5 seconds. I find having BT smoothing at '1' or no smoothing creates a little too much noise for the PID and it tends to jiggle the heater up and down along it's climbing path rather than just slowly increasing it)

Not sure what the point of this post is really, but I did mention automation and taking samples earlier as a perk of this sort of fluid bed roaster design so I thought I'd elaborate on that a bit.


----------



## MediumRoastSteam

@PhilDawes - looks good. I got the blower today - it's smaller than I thought I'd be, which is great - and now I'm thinking how to put things together. I deliberately just don't want to copy your design verbatim. I want to learn new things and hopefully I can make a few modifications - otherwise what's the fun?

this is really good, the type of project I've been looking for years. Thanks for inspiring me.

Edit: I keep thinking of an alternative of not needing to modify the heat gun. However, logically, what you did is certainly the most efficient way possible.


----------



## MediumRoastSteam

PhilDawes said:


> I do remember seeing a picture of a homebrew fluid bed roaster where there were 3 heatguns that each blew hot air into a pipe at right angles from the main blower. I was surprised then that there wasn't a lot of backpressure blowing heat back into the heatguns but iirc the owner was adamant that it was working well.


 I've been playing with a PoC project this weekend but failed miserably. I thought I could have a way of having the blower and the heat gun just slotted in somewhere but, as you said, the back pressure is an issue and it does blow hot air back into the heat gun. Presumably in the picture you showed above maybe the back pressure is reduced due to the fact there are, er.... three heat guns, so it's spread out more.

I also had a look ad modding my heat gun yesterday, but the one I have is a cheap one with two settings only. I took everything apart, but the electrics does feel a bit intimidating, to me at least. I think this project might not be for me after all.

This has been a great read, very insightful. 👍


----------



## PhilDawes

Hi @MediumRoastSteam,

Ah that's a shame. Totally understandable though! I would love to find a way to build a fluid bed roaster but leave the heatgun intact. I don't have a good way though and I think you'd need to butcher it to get it working. It wouldn't be usable as a heatgun afterwards.

FWIW the lack of variable dial isn't a show stopper, the one used to build my current main roaster was one of these low/high ones. Basically something additional is needed to control the power going to the heating element. (and you would need something separate anyway if you wanted to control from artisan).

I have one of these for manual voltage control: https://www.amazon.co.uk/gp/product/B01LXLU3SD/ (a triac dimmer) which I've attached a plug and socket to for convenience/safety. It works really well and I've used it for lots of things, but obviously this is mains electricity and a cheap part so you need to be really really careful and take lots of precautions.










(Big clive has a youtube video where he takes one apart 



 . I enjoy watching his cheap part teardown videos)

So anyway, I think at a minimum you'd need to take the gun apart, cut the two wires to the fan, remove the fan, and connect the two wires together. Then you'd need to find a way to blow air through the barrel - probably cutting a hole in the back of the heatgun and sticking the blower nozzle in like I did.

Just as an aside: If you were controlling a heating element from artisan (via arduino or phidget) you'd typically be using an SSR (solid state relay) which just turns the power on and off - no voltage changing. You'd control the heat by pulsing on and off a couple of times a second, with time 'on' corresponding to the heat level. This sounds really primitive but works surprisingly well - the ET temp probe is unable to pick up the fluctuations at on/off a couple of times a second.

I have an older post where I removed the heat element from my gun http://phildawes.net/blog/2020/09/09/diy-air-coffee-roaster/

(I know you said this project isn't for you, but I can't resist talking about this stuff!)


----------



## MediumRoastSteam

PhilDawes said:


> (I know you said this project isn't for you, but I can't resist talking about this stuff!)


 Haha! No worries. I'm familiar with that Triac dimmer. I actually did a Gene Cafe Roaster "dimmer mod" modification using exactly that.

https://www.coffeeforums.co.uk/topic/37836-gene-cafe-cbr-101-dimmer-mod-mediumroaststeam-take-on-it/?tab=comments&do=embed&comment=532177&embedComment=532177&embedDo=findComment#comment-532177

Interesting what you say about pulsating heat rather than controlling the voltage. The whole point of the Gene mod was to make that more stable and controllable. Although... It was a dummy on/off heating element controller without any form of PID controlling or following a curve.

One thing I tested though when trying to figure out air flow related things based on your concept, is that you don't really need to have the blower immediately underneath the heat gun. Instead, you could just attach a hoover hose of something like that to the blower and to the back of the heat gun, thus avoiding the need to try to keep the blower upright in a stable position. There was enough pressure to lift 300g of green beans and keeping them aloft, and the fan was not even at full speed - far from it!

I'll keep this project in mind though. It's so simple and cost effective (providing one is comfortable with the modifications).

Enjoy your roasts, and keep us posted. 👍


----------



## Rob1

MediumRoastSteam said:


> Interesting what you say about pulsating heat rather than controlling the voltage. The whole point of the Gene mod was to make that more stable and controllable. Although... It was a dummy on/off heating element controller without any form of PID controlling or following a curve.


 The Gene naturally switches so slowly the temp drops by about 3-5c and it cycles like that. The issue with it running at full power was the temperature gradient in the drum meant the beans falling close to the heat source would get burned so the ones furthest away would keep roasting. By rapidly turning on and off a few times a second the heating element woudln't reach the same high temps as if it was powered all the time so it's similar to using a dimmer. The best way would be to use a proportional control (either burst fire or phase angle) rather than a standard zero crossing or random turn-on ones. I'm thinking of going ahead with my implementation of a zero-crossing ssr for the Amazon but concerned about the rapid heating on and off and lifespan of the heating element.


----------



## ajohn

The Gene makes a pretty decent job of stirring the beans providing too much isn't put into them. I'm a little at odds about comments on here about using them especially mains voltage. It's a pretty trivial matter to set an rms voltage with a simple triac controller and meters to measure it aren't that expensive these days. The confusion around the UK being 230v and heaters rated as such is more of a bonus than a problem really.

Another aspect is visual results. The best I have seen involved preheating. The person turned up on here who did that and was immediately shot down in flames and disappeared. Another insurmountable problem ?


----------



## MediumRoastSteam

@PhilDawes - I decided to give this a go again. Finds out the wiring on my heat gun is different from yours, and the those two wires which power the fan you mention do not need to be joined in order to close the circuit - not on mine at least. The heating element works independent from the fan it seems. And that was my confusion. Now I get he circuit, I made the change and all is fine.

question: do you notice the blower noticeably decreases power when the heating element of the heat gun is switched on? Did you do anything to sort that out or you just accept that's what it is?


----------



## PhilDawes

Hi @MediumRoastSteam

I hadn't noticed that - though I guess it makes sense given that it's drawing 2kw. Now that you mention it I'm surprised I haven't noticed, e.g. I do notice that my niche grinder noticeably changes sound when I turn the kettle on.

Maybe it's because I start the heating element off quite low (the artisan software PID strobes it rapidly on and off) and incrementally increase while the blower decreases over the first phase of the roast.


----------



## Rob1

ajohn said:


> Another aspect is visual results. The best I have seen involved preheating. The person turned up on here who did that and was immediately shot down in flames and disappeared. Another insurmountable problem ?


 Not that this is relevant to a tin can roaster thread....posted in the wrong thread perhaps? I suspect you're being somewhat dramatic with 'shot down in flames'. Good visual results might coincide with pre-heating, but pre-heating won't do anything for evenness. Plenty of people roast back to back and pre-heat for the first batch so they have consistency in timings from one roast to next. The first roast might be 30 seconds to a minute slower, even with quite a high preheat to 220c or so. Pre-heating does very little but speed up the early (sub 150c bt) part of the roast, with temperature differences recorded in the bean mass decreasing over time through the roast.


----------



## MediumRoastSteam

@PhilDawes - Right... I've finally managed to get somewhere acceptable with this 















Video:






From the very beginning, I wasn't happy as there was a lot of air leakage where the blower enters my heat gun, which has now been resolved. One just needs to be creative to see what one can do. A few trips to B&Q and some thinking over a few days, with lots of trial and error eventually solved the issue.

Also, instead of having the blower underneath the heatgun, I have connected a 40mm compression flexible pipe to the heather, and then piped all the way into the heat gun. The heatgun rests on a piece of MDF on top of a box, so it's perfectly fine and stable.

The test was successful. The roasted beans don't look great, but that wasn't the point. I pretty much went full wack with the heat gun, and it got to approx. 200C when I ended the roast. Because the blower is quite loud, I could not hear first crack, at all! Next time I'll do this fully outside, but today it was a little windy.

My heatgun is very primitive. Next step is to have some control on the heat gun temperature, as at the moment it's full on, half way or off. Halfway is not hot enough. It simply cannot sustain the temperatures required for a coffee roaster. I also need a better temp probe.

Once again @PhilDawes - thanks for this. Very inspirational. 👍


----------



## MediumRoastSteam

Upgrades...

I have added a voltage regulator, so now I can control the roast much, much better, as opposed to full blast and off. This is a lot of fun. I have no idea of what a good profile is. I'm playing with 130g at the moment, but noticing beans getting scorched.

@PhilDawes - if you have any suggestions for starters, I'm all ears!


----------



## PhilDawes

Congrats - this looks great! I like what you've done with the compression fitting pipe. I currently have a fairly long vacuum hose between my blower and the heatgun barrel which has the advantage of letting me move the blower away from the chamber to make it easier to hear first crack.

First crack tends to happen above 200c on my roaster - maybe 205c (especially if measuring exhaust temp, which is higher than bean probe temp at the start but registers lower by the time the beans reach first crack). It depends a lot on the temperature probe and where it is located.

What sort of scorching are you getting - is it tipping or are the beans actually getting charred?
https://www.home-barista.com/roasting/coffee-roasting-defects-pictorial-t13587.html

I find the variety of bean affects likelihood of tipping a lot: e.g. I have some nicaraguan naturals that seem to tip if I as much as breath on them (and I have to really draw out the roast), whereas I've some brazilian beans that are happy to be rushed through the whole thing in 7 minutes just past first crack. I think growing altitude is a big factor. I've heard Rob Hoos say tipping is usually a result of roasting faster than the particular bean can take.

(Personally I've found Rob Hoos to be a good source of actionable roasting advice - in youtube interviews he seems a lot less hung up on precise RoR curves and the 'sciency' over-precise woo that seems to accompany other roasting experts).

One thing that might help is to increase the distance between the heatgun element and the beans. I added a small tube to mine to add an extra 5cm space to promote air mixing before it reaches the chamber (the tube was actually a thin metal spice container with the end sawn off, and some small silicone gaskets to keep it air tight). I had previously found that the inbound air temp readings were inconsistent if I moved the inlet temperature probe around, so this was an attempt to remedy that.

With that said, I would really recommend trying to get artisan connected so roasts can be tracked in a consistent way. That was probably the single biggest thing contributing to improved flavour in the cup for me.


----------



## MediumRoastSteam

@PhilDawes - thank you. Yeah. Artisan is in my list. Initially I'll just try to get it tracking, but I want to control the roast myself. I hope it's possible. I've got an old laptop and will get that setup over next week.

With regards to heat gun distance... On mine, currently, the mesh is on the next tin. So, there's a space of one tin between the source of heat and the heat gun. That's approx 8cm I think. It also allows the mesh to be properly secured in between two tins rather than just relying on grip/friction from the grooves of the tin against the mesh.

I have also drilled a small hole at the top of the roast chamber, about 2cm down. I simply slot the probe in. Temperature wise it seems consistent with what you say, and FC happening at around 204C. Tried it 4 times yesterday 🙂

Tipping vs scorching... I think it's scorching. I'll get a picture.

My thoughts exactly with regards to keeping the blower away from the heat source. I thought initially I couldn't hear first crack, but, it's because it never got there. 🙂 - And I found I could hear first crack, but the blower is so loud that I'm not sure it's good for my ears. I've got some 40mm pipe and I'm thinking of keeping that at the bottom of the shed and try to dampen the noise, whist keeping the roasting chamber close to the door to vent out smoke and chaff. Ideally though, when I tame this hole thing and understand how it works, I'm just keep everything indoors and vent the smoke and chaff out. Just wondering whether you can hear first crack with the top of the roasting chamber venting out like that?

edit: pictures

Two bowls: Ethiopian done yesterday. I tried to follow a profile of decreasing RoR. doesn't look a very even roast to me, nothing like your stuff there @PhilDawes. Both Ethiopian beans, washed natural.

One bowl: my first ever roast. No dimmer, nothing. Just full power. They haven't reached first crack I don't think, but maybe was just about to. Either that or I couldn't hear anything. That's a Colombian washed natural too.


----------



## MediumRoastSteam

Also @PhilDawes - for Artisan and Arduino... Would this do the trick?

https://shop.pimoroni.com/products/adafruit-analog-output-k-type-thermocouple-amplifier-ad8495-breakout?variant=658813525&currency=GBP&utm_source=google&utm_medium=cpc&utm_campaign=google+shopping?utm_source=google&utm_medium=surfaces&utm_campaign=shopping&gclid=CjwKCAjwgZuDBhBTEiwAXNofRCUk2jxrdgp5m9ZLrh2Yf8A26GifcFkE0bUUnc-ukIC6YekZftbbzRoCgMwQAvD_BwE

Any suggestion for a good thermocouple?

I was thinking this? https://shop.pimoroni.com/products/thermocouple-type-k-glass-braid-insulated-k


----------



## PhilDawes

Hi @MediumRoastSteam

I think the 8495 you linked will be easy to use with arduino using an analog pin. I don't know if it'll be accurate enough if you want to drive a PID off of it.
(This pihut page says accuracy is +-2c https://thepihut.com/products/adafruit-analog-output-k-type-thermocouple-amplifier-ad8495-breakout?variant=27739615761 )

Although I guess it might still be consistent enough to drive PID even if it isn't really accurate - e.g. the absolute temp might not be correct, but maybe it's linear and precise and gives stable readings: I've not tried it so I don't know, sorry.

I've been using max31856 s, which are excellent and very precise, but a bit more complicated to hook up than your linked analog 8495 amplifier.
https://shop.pimoroni.com/products/adafruit-universal-thermocouple-amplifier-max31856-breakout

That ktype thermocouple is probably excellent. I've been using cheapo ones from amazon https://www.amazon.co.uk/gp/product/B082MGZYL7/ which work really well but the cheap cable outer tends to fray if it gets bent around a lot


----------



## PhilDawes

(Not wanting to put you off because I have no experience with it. It might be worth getting the 8495 even if it turns out not to be precise enough to drive PID: you could still use it for measuring the heat temp going into the chamber even if you later get a different board for the bean temp probe. The more temperature probes the better!)


----------



## MediumRoastSteam

PhilDawes said:


> I've been using max31856 s, which are excellent and very precise, but a bit more complicated to hook up than your linked analog 8495 amplifier.


 why is it more difficult? In which sense?


----------



## PhilDawes

MediumRoastSteam said:


> why is it more difficult? In which sense?


 Instead of a single analog signal, the max31856 converts to digital on the board and uses the SPI (serial peripheral interface) protocol to communicate with arduino. What that means in practice is that you need to hook up 3 digital pins (clock, data out and select) instead of the one analog, and you probably want to use the adafruit max31856 arduino library to read temperature instead of just reading the analog pin and multiplying by a number.

(If you have more than one 31856 they share clock and data out pins, and the select pin is used to control which one to read. I've accumulated 3 so far in my setup!)


----------



## MediumRoastSteam

PhilDawes said:


> Instead of a single analog signal, the max31856 converts to digital on the board and uses the SPI (serial peripheral interface) protocol to communicate with arduino. What that means in practice is that you need to hook up 3 digital pins (clock, data out and select) instead of the one analog, and you probably want to use the adafruit max31856 arduino library to read temperature instead of just reading the analog pin and multiplying by a number.
> 
> (If you have more than one 31856 they share clock and data out pins, and the select pin is used to control which one to read. I've accumulated 3 so far in my setup!)


 Hmmm. OK. Good to know. Definitely more challenging, but it it's the best one on the long run, I might as well go for that.

On your blog, you mention you only bother with the ET, and that one probe on the exhaust is good enough. Is this no longer the case? 😉


----------



## PhilDawes

MediumRoastSteam said:


> On your blog, you mention you only bother with the ET, and that one probe on the exhaust is good enough. Is this no longer the case? 😉


 I think I said something like just measuring exhaust temp is good enough to track a roast repeatably, which I think is correct for the same beans and batch size. It is certainly more convenient when you're getting started.

I have noticed that increasing the batch size does seem to change the readings on an exhaust probe more than it does a probe closer to the bean mass - e.g. first crack can appear at a lower exhaust temperature for a bigger batch but at a similar bean probe temperature, at least on my setup.

Placing a probe to drive the PID can be a tricky balance - it needs to pick up temperature changes quickly enough that it doesn't end up over-egging the heat to get a response, but not so responsively that noisy readings cause it to be continually adjusting the heater up and down. I think it's important to remember that a bean mass probe is really just measuring the temperature of air around the beans, not the actual interior of the beans themselves so it's all an approximation.


----------



## PhilDawes

@MediumRoastSteam hello again!



MediumRoastSteam said:


> With regards to heat gun distance... On mine, currently, the mesh is on the next tin. So, there's a space of one tin between the source of heat and the heat gun. That's approx 8cm I think. It also allows the mesh to be properly secured in between two tins rather than just relying on grip/friction from the grooves of the tin against the mesh.


 I've been playing around with roast chamber designs recently so am interested in this! Is there still a bowl shape in the mesh or is the mesh flat between the two cans?

The best roasts on mine (at least from the perspective of a 'pretty chart with nice smooth ROR') have come from directing the air up one side at an angle so that the beans go up one side and down the other. The bean probe sits in the 'down' side so as to take less direct heat from the airflow and hopefully more from the beans.

I think that's referred to as 'asymmetric flow' in fluid bed roaster circles, as opposed to a spouted bed where the beans come up in a fountain from the centre.

One source of scorched beans could be if there are places where the beans can get caught in the corner of the mesh (slow spots) and heated more / agitated less than the others. Getting a borosilicate glass tube in the future might help you see what's going on with the bean flow.


----------



## PhilDawes

Oh, another thing I found useful regarding probes: I've been using a thin copper pipe (about 6mm hole diameter) to feed the bean probe thermocouple in from the top of the chamber down to the bean mass. This saves having to drill holes in the sides of the chamber, and is also really flexible for adjusting probe placement.

I tend to start the roast with the bean probe just above the bean mass, which keeps it reactive for the PID at the start. (If the probe is buried and reading mostly cool beans away from the heat at the start then the pid will tend to turn up the heater really high as there's a big lag while the newly heated beans get to the probe). As the beans expand through the roast they then cover the probe for the important second half of the roast.


----------



## MediumRoastSteam

PhilDawes said:


> I've been playing around with roast chamber designs recently so am interested in this! Is there still a bowl shape in the mesh or is the mesh flat between the two cans?
> 
> The best roasts on mine (at least from the perspective of a 'pretty chart with nice smooth ROR') have come from directing the air up one side at an angle so that the beans go up one side and down the other. The bean probe sits in the 'down' side so as to take less direct heat from the airflow and hopefully more from the beans.
> 
> I think that's referred to as 'asymmetric flow' in fluid bed roaster circles, as opposed to a spouted bed where the beans come up in a fountain from the centre.
> 
> One source of scorched beans could be if there are places where the beans can get caught in the corner of the mesh (slow spots) and heated more / agitated less than the others. Getting a borosilicate glass tube in the future might help you see what's going on with the bean flow.


 Very interesting all of this. I just realised one mistake I made in my earlier post. The distance of 8cm is from the source of heat (the heat gun) to the mesh.

The mesh is in a bowl shape. It's not flat. I was toying with the idea of keeping it flat, but then I'd have no data to compare against. So it's a bowl at the moment, and seeing you are having good results like that, I'll keep mine like that too until I get good results. 👍

Questions: how do you angle he heat/air flow to one side of the chamber? Do you use one of the heat gun nozzle attachments? I now wonder scorching on mine comes from the fact the chamber wasn't perfectly straight...

And lastly... (for now at least 😉) - when you used the glass/borosilicate chamber, did you manage to get one of the exact diameter of the cans? I can find 65mm and 100mm - but not 70mm.

I've got the arduino out last night and this week will do a crash course. For starters, if I can connect to the TC4 protocol and write a simulator to ensure whether I generate with the Arduino is what I receive in Artisan, then the rest (connecting the actual interface) should be relatively easy. Oh the joys of being a software engineer... Proof of Concept always comes first! 😂😂😂😂


----------



## PhilDawes

MediumRoastSteam said:


> how do you angle he heat/air flow to one side of the chamber? Do you use one of the heat gun nozzle attachments? I now wonder scorching on mine comes from the fact the chamber wasn't perfectly straight...


 This is very much a work in progress, but I have been trying a bunch of designs. I have a half size heinz bean can with the heater hole off to one side, and I have a cocktail shaker lid with a half-tin-lid taped that directs the heat up to the side. I haven't tried nozzle attachments, but the one with a flat angled end might be worth a try. I've seen videos of big commercial roasters that use this asymmetric flow design. I'll see if I can post some pictures.

I've seen an angled chamber being advocated on homeroasters.org before - have seen it claimed that angled lets you increase the batch size for the same heat/air pressure, but I don't know if that is true. I find putting the chamber at a small angle reduces 'pulsing' or 'bubbling' - where the air flow kind-of pushes the whole bean mass up periodically rather than a stable rotary flow. I think the bubbling causes noise problems for the PID because the air bubbling up is hot air direct from the heater and is a different temp to the heat around the beans as the travel down.



MediumRoastSteam said:


> And lastly... (for now at least 😉) - when you used the glass/borosilicate chamber, did you manage to get one of the exact diameter of the cans? I can find 65mm and 100mm - but not 70mm.


 I've bought a couple, different heights but both 75mm diameter. It doesn't fit the cans exactly (i.e. doesn't slot into the rims like stacking tin cans do) but either taping or clamping them works.

I can't see any on amazon at the moment. Ebay might be a good bet. E.g. https://www.ebay.co.uk/itm/Glass-Open-Ended-Hollow-Candle-Holder-Cylinder-6-8cm-ID-7-5cm-OD/402594425991

Incidentally, I saw a video a while back of somebody who had done their entire roast chamber from glass milk bottle by cutting the bottom off and then turning it upside down. I'm thinking that might be an interesting experiment...


----------



## PhilDawes

Not sure how much this helps, but I had this clip on my laptop:

View attachment pipe.mp4


----------



## MediumRoastSteam

@PhilDawes - did my dummy arduino program and saw it interfacing with Artisan. Very easy. Just ordered the breakout board (the one you have), so let the fun begin. 👍

Question: when you vent the smoke/chaff outside with a ducting, can you hear FC? Or you completely rely on artisan these days?

i also see you are only using the heating element of the heat gun! I was thinking of doing the same when I started, but can't think of anywhere to mount it. So for me, it's staying inside its original casing, at least for now. 👍


----------



## PhilDawes

@MediumRoastSteam nice work! Testing the interface with artisan separately to wiring up the electronics is a good idea. I think one of the big advantages of building is that you gain a lot of confidence in how everything works so troubleshooting is easier down the line.



MediumRoastSteam said:


> Question: when you vent the smoke/chaff outside with a ducting, can you hear FC? Or you completely rely on artisan these days?


 It depends a bit on the bean variety - some crack a lot louder than others. When I get a new bag of beans (or am fiddling with profile) I tend to lift the ducting off of the top around when I expect first crack in order to hear it clearly. The ducting provides minimal restriction to airflow and me lifting it on and off doesn't seem to change the temp probe readings (which are super-sensitive to any changes in airflow - e.g. dangling a spoon into the chamber throws the ror all over the place).

With some beans it's obvious when first crack is about to happen because the temp from the bean temp probe starts to dive and the pid kicks in to increase the heat after being stable for ages. I think this is the flick crash business that Scott Rao is often talking about. Definitely seems to depend on the bean though.

I also lift the ducting on and off to take samples after first crack when I'm trying to dial in a roast. I usually 'drop' the roast (turn off the heat, blower high) around a minute or so after first crack and maybe 5-8 degrees higher, but sometimes a coffee tastes a bit grassy to me and needs a bit more 'development' so taking samples helps a bit with figuring out this. (+ it's fun to have a bunch of samples to cup and compare).

Btw, I wear ear defenders while I'm roasting because I'm worried about my hearing. For some reason I'm still able to hear first crack through them. Maybe the defenders help tune out the noise of the blower. I've wondered about whether active noise cancelling headphones might help filter out the drone but still allow hearing first crack, but haven't tried this.



MediumRoastSteam said:


> i also see you are only using the heating element of the heat gun! I was thinking of doing the same when I started, but can't think of anywhere to mount it. So for me, it's staying inside its original casing, at least for now.


 Yeah I don't think it's necessary to take it out. This heat element is actually not the one from the heatgun in my blog post - it's one from a crappier on-off heatgun that I had before buying the variable dialed one. I removed the casing because I thought it looked a bit more space-x, but then I had to get a laboratory clamp stand to get the thing to stand up and be stable (another 30 quid, sigh!). I don't want to add up the amount I've spent on bits and bobs for this hobby!


----------



## MediumRoastSteam

@PhilDawes - I've been playing with the mesh basket for the last couple of days, seeing how airflow works. It seem s that, there's an optimal amount of greens. Like, 130g and you have a very poor circulation, whereas 220g seems to circulate much, much better. It seems that, the depth of the basket is important here. You want the whole basket to be covered at all all times. Yesterday I created s rather deep basket and that has been my experiment. Maybe today I'll create a shallower one. As you might have figured, I'm on holiday this week. 😂😂😂😂


----------



## MediumRoastSteam

@PhilDawes - question for you: Do you recommend anything to enclose the Arduino and the breadboard? Like some sort of custom made acrylic case? I was able to find some for the Arduino, but I do wonder whether there's something where you could fit both in. Thanks!


----------



## PhilDawes

MediumRoastSteam said:


> Do you recommend anything to enclose the Arduino and the breadboard? Like some sort of custom made acrylic case?


 Hi @MediumRoastSteam. I don't know anything about enclosures I'm afraid - I currently have the Arduino and breadboard uncovered near the roaster


----------



## MediumRoastSteam

PhilDawes said:


> Hi @MediumRoastSteam. I don't know anything about enclosures I'm afraid - I currently have the Arduino and breadboard uncovered near the roaster


 Cheers Phil. I got everything setup now... but... do you really need to solder the pins into the breakout board? I tried without but then the contacts are a bit iffy. Got all setup on the breadboard, got a table in the shed, so ready to roll really, pending some minor details! 😂


----------



## PhilDawes

MediumRoastSteam said:


> do you really need to solder the pins into the breakout board?


 I'm afraid so. I haven't found a good way around this.


----------



## MediumRoastSteam

PhilDawes said:


> I'm afraid so. I haven't found a good way around this.


 Well, I'm getting the soldering iron out today then. 👍😊


----------



## MediumRoastSteam

Took me all afternoon and evening but I got it soldered. Oh boy I need a better soldering iron...

Tested the breakout board and everything and all is wonderful. Tomorrow will implement TC4 and then should be able to integrate with Artisan. 👍😊


----------



## MediumRoastSteam

All done and tested. 👍 - and I think I have also figured out why my beans are scorched and uneven: the airflow is too strong. I noticed today that the temperature would simply remain stagnant stagnant around 175C for 5 minutes (at this point the roast was a write off). The heat gun was already on full blast. I then reduced the airflow (2 notches) and lo and behold, the temperature starts climbing again. 1 minute or 2 later artisan registers 202C and first crack begins.

I'm getting there. 👍😊🤞


----------



## MediumRoastSteam

@PhilDawes - So I've tried this a few times now - But it's still not to my taste. I've got the feeling the "burner" (aka. Heat Gun heating element) is too hot and aggressive on the beans, and it's not roasting them evenly. I'm roasting 140g at a time.

Is there an artisan profile that you could share? Currently I'm simply measuring the temperature with a K type thermocouple a couple of inches from the top of the chamber. Readings seem to be consistent at least in terms of first crack and dry end marks.

Thanks in advance.

Edit: NVM. I went back on this thread and there's a graph of one of your early roasts. Mine's remarkably similar. I'll keep going.


----------



## MediumRoastSteam

@PhilDawes - me again! So&#8230; I've made some good progress on this. I have managed to integrate with Artisan. I've configured all the bits and bobs and wrote a little emulator on Arduino to test the PID control on artisan tom follow roast curves. So far so good. But&#8230;

I have also bought an SSR relay so artisan can control the heat gun. I've done a lot of research, and also read your previous post that it does it quite well. I can turn the SSR relay on and off with Arduino no probs. However, is there a library to control the frequency of element switching? And will any SSR relay do or would I need a special type? Is there an Arduino library to do this? I tried to delve into PMW but I'm not sure if that's the way for such high loaded A/C stuff. I'm a bit scared of keeping turning the SSR on/off so frequently if I implement something myself.

I tried to research over the forums but there seems to be mixed opinions out there.

would be great to know how you implemented yours.

Many thanks!


----------



## Rob1

@MediumRoastSteamI use a proportional control SSR with a PWM slider in artisan to control the heater. It's basically a digital version of a dimmer.


----------



## MediumRoastSteam

Rob1 said:


> @MediumRoastSteamI use a proportional control SSR with a PWM slider in artisan to control the heater. It's basically a digital version of a dimmer.


 Thanks Rob. Yesterday I wrote my won algorithm to control heat. Like, 50% heat means 50% of the time on, 50% off. If the cycle is 1 second, then 1/2 sec on, 1/2 off, etc. I tested with a light bulb and it works great. But... It's not a dimmer.

Could you share more details of your SSR? Is this some special version of SSR or is it something generic? I think I got a Zero Voltage Turn On SSR. Sorry I'm a bit clueless on this sort of thing. This is my first dab with electronics 🙂

This one:

View attachment 57043


----------



## Rob1

Ok. How many amps is that rated for? There's a problem with fake Fotek ssrs on ebay and that looks dodgy to me.

I have a Crydom PMP2425w in my amazon but you probably won't need one rated that high or one that can switch between burst fire and phase angle control. There are cheaper ones that do one or the other and they should be cheaper at lower ratings too if you can find them.

I had one like yours initially and couldn't get it working with Artisan and Phidgets but would probably be able to have got it working using the IO pins and Artisan. With the amazon I thought about just using the IO pin on the raspberry pi and programming buttons in amazon to run some simple python scripts but in the end I preferred a proper proportional control SSR.


----------



## MediumRoastSteam

Rob1 said:


> Ok. How many amps is that rated for? There's a problem with fake Fotek ssrs on ebay and that looks dodgy to me.
> 
> I have a Crydom PMP2425w in my amazon but you probably won't need one rated that high or one that can switch between burst fire and phase angle control. There are cheaper ones that do one or the other and they should be cheaper at lower ratings too if you can find them.
> 
> I had one like yours initially and couldn't get it working with Artisan and Phidgets but would probably be able to have got it working using the IO pins and Artisan. With the amazon I thought about just using the IO pin on the raspberry pi and programming buttons in amazon to run some simple python scripts but in the end I preferred a proper proportional control SSR.


 Thanks Rob. It's potentially Chinese rubbish. Bought from Amazon, rated for 40A apparently.

I'll research on the one you have. Many thanks.


----------



## MediumRoastSteam

Rob1 said:


> Crydom PMP2425w


 That looks the business! 😊


----------



## PhilDawes

MediumRoastSteam said:


> Thanks Rob. It's potentially Chinese rubbish. Bought from Amazon, rated for 40A apparently.
> 
> I'll research on the one you have. Many thanks.


 Apologies, I haven't checked back here in a while.

FWIW I bought this one https://www.amazon.co.uk/gp/product/B071HP9NJD/ - I can't remember why I chose this. It has worked perfectly but like Rob says it's probably a bit of a lottery using cheap SSRs. I bought a fire extinguisher (electric powder type) that I keep near my roasting rig.

Switching on/off is fine for a heating element in my experience - I switch mine twice a second (on,off,on,off) timed according to 0-100 duty. I'm unable to pick up the on/off fluctuations with my heater probe at twice a second.

(I wrote some arduino code to allow a configurable number of times a second (with some compensation for rounding), but I ended up settling on twice a second because significantly more than that and I got phasing issues).



> bool turn_ssr_on(int ssr_duty) { // ssr_duty between 0-100
> int time_on_ms = ssr_duty * 10; // total time in ms switched on per second
> int num_on = 2; // number of times to switch 'on' per second
> int window_ms = 1000 / num_on;
> int window_proportion_floored = time_on_ms / num_on;
> 
> int ms = millis() % 1000; // millisecond in the second
> 
> for (int i=0; i<num_on; i++) {
> int threshold = window_proportion_floored;
> if (i < (ssr_duty % num_on)) {
> threshold += 1; // compensate for the remainder
> }
> if (ms < threshold + (window_ms * i)) {
> return true;
> }
> if (ms < (window_ms * (i+1))) {
> return false;
> }
> }
> }


 and then in the main loop:



> if (turn_ssr_on(ssr_duty)) {
> digitalWrite(ssr_pin, HIGH);
> } else {
> digitalWrite(ssr_pin, LOW);
> }


----------



## MediumRoastSteam

@PhilDawes - ha! Thank you. I've been doing 😊a few roasts and I can confirm it work quite well with a turn on/off relay. I did something remarkably similar to yours. I created two ticks: one every 1.5s, and one every 10ms.

The one every 1.5ms is the duty cycle: essentially it divides that time as a proportion of the duty value sent via the Arduino PID. One segment is ON, and the other segment is OFF. So, at 50%, 0.75s is ON and 0.75 is OFF.

every 10ms I check whether the heater should be on or off and set the pin accordingly. I can send you the code if you are interested. 👍

Three questions:

- what PID values do you use? I'm using P=2, I=0.05, D=0.
- are you controlling the blower via Artisan too, the same way? I haven't got to that stage yet. I'm not sure if it's a good idea.
- In Artisan, when you "drop", I can turn the heater off. However, as he PID is still on, it quickly resumes and turns on. Did you manage to solve this?


----------



## PhilDawes

Hi @MediumRoastSteam



MediumRoastSteam said:


> - what PID values do you use? I'm using P=2, I=0.05, D=0.


 I'm currently using P=1, I=0.1, D=0, but results seem quite dependent on heater setup + probe positioning.
I position the bean probe so that it is right at the top of the bean pile when roasting starts (on the down-flow, so not in the air flow). This makes the temp feedback loop quite tight at the beginning so it doesn't over-juice the heater in the first section of the roast. Then as the beans expand they cover the probe and give a better reading for the later stages.



MediumRoastSteam said:


> - are you controlling the blower via Artisan too, the same way? I haven't got to that stage yet. I'm not sure if it's a good idea.


 I'm not using PID for blower settings, mainly because for me the blower is as much about getting the right amount of agitation/turnover/evenness as it is controlling heating, and the pid doesn't have access to data for that.

Instead I use artisan's alarms feature to start the blower highish and then dial down the blower every 10c or so during the first section (~3 mins) of the roast. This is basically replicating what I do manually. I don't touch the blower for the rest of the roast.

I've read in a few places that it doesn't matter as much what you do in the first drying section of the roast, most of the outcome is down to what happens in the middle 'maillard?' section before first crack and the short period after first crack.



MediumRoastSteam said:


> - In Artisan, when you "drop", I can turn the heater off. However, as he PID is still on, it quickly resumes and turns on. Did you manage to solve this?


 Oh that's odd, I don't have this problem when I hit the drop button - my heater goes to zero. I'm not sure what artisan does here.
Hmmm I wonder if artisan just turns off background mode and switches to manual set value - I have manual set-value set to 0 on the PID control window, do you have yours set higher?


----------



## PhilDawes

On the PID topic, I ought to mention that although most beans are fine with the PID for the whole roast, sometimes a bean variety has crack behaviour that the PID just doesn't handle well.
(or at least I cannot get it to handle well)

E.g. the PID sees the temperature rise a bunch during crack so it drops the heat, but it turns out the temp rise is only temporary so then the temp drops suddenly. In response PID guns the heater causing overshoot etc. (I think this is related to flick/crash behaviour)

For these I end up basically turning off the PID just before first crack and learning what the bean is going to do. I then anticipate the changes manually.
It's useful having a record of previous roasts on a per-variety-lot for helping with this. It always surprises me how consistent/repeatable roasts are with this setup. If I were roasting a lot of the same quirky batch I'd probably use artisan alarms to automate that particular lot once I'd learnt it, but I've never felt the need to do that.

(Also if I am taking samples after first crack the act of pulling the samples can cause fluctuations in bean temp readings, so I also turn off the PID and coast manually for this as well)


----------



## MediumRoastSteam

thanks @PhilDawes .

with regards to the control going back to manual after drop, they might be the case. My value is set to 180C, so that might be it. I'll set to zero and see what happens.

On the blower - I'm actually doing something similar like that! I also set an alarm and decrease he blower after 3 minutes nearing dry end.

I was caught last time on the probe position. I drilled a hole on the tin 5cm from the top, and position there. But it was too close to wall, snd it was reading 15C lower than if positioned bang in the middle.

I also haven't managed to source a borosilicate chimney yet, so things are rather inconsistent for me. But I have to say, letting Artisan control the roast has made a massive difference in terms of quality of the roast, to the point that I'm actually drinking what I'm producing. But I need to work on the probe positioning, the transparent chamber and noise levels: my wife is getting annoyed! 😂😂😂


----------



## MediumRoastSteam

Got a solution so I can see the roast, and also managed to insulate the air leaks to the point that the blower operating nowhere close to half capacity - actually much lower.






still have a crazy RoR curve! Need to find a way to tame the "noise"


----------

