BC-2 Mods

Discuss roast levels and profiles for espresso, equipment for roasting coffee.
aabud
Posts: 107
Joined: 3 years ago

#1: Post by aabud »

Just starting a thread to document some modifications I intend to do on my BC-2.

Goals:

- Automate gas control (e.g. push 1.0kpa button in Artisan and gas changes to 1.0kpa)
- Use Artisan software PID for pre-heat and between batch protocols
- Non-invasive changes to the roaster - maintain full manual capabilities
- Allow for future expansion (gas pressure reading, airflow reading, airflow control)
★ Helpful

aabud (original poster)
Posts: 107
Joined: 3 years ago

#2: Post by aabud (original poster) »

BC-2 Data Logging Hardware Investigation

My first thought for gas control was simply a servo on the control knob, controlled by an Arduino that talk Modbus and sits on the same RS485 network as the temp displays. I've used a similar approach (modbus Arduino servo knob) with success in the past for some mods I did to a Kaldi. So I did a little analysis of how the BC-2 works as shipped, to see if this seemed feasible.

The ET and BT probes attach to two EC55 Omron temperature displays, that are RS485 wired in a daisy chain fashion to a "data gateway" board. That board provides the external USB connector that you would cable to your PC for Artisan control. It also puts out a blue tooth signal if you wanted to connect to it that way as well. This "data gateway" board is marked with an identification of AGE-609-C, and is a bit of a mystery to me as I can't find any doc on it at all. Aside from the obvious function of exposing a modbus interface over USB (or Bluetooth), it also apparently remaps the EC55's to a different Modbus SlaveID and Register. So in Artisan, you talk SlaveID=1 and Register=0 or 2 for ET and BT to the "data gateway", which in the background has a second "internal" Modbus network that is polling the EC55's twice a second as SlaveID=2 Register=0 and SlaveID=3, Register=0. Why would the BC-2 designers do this remapping?

So if I just wanted to tack on an extra modbus node as my servo controller, I'm doing that on the "internal" network, and I would somehow have to reprogram/extend that "data gateway" board to know how to remap my new node into the external Modbus network that Artisan will see.

I queried BC Roasters and they were only able to tell me that the "data gateway was "not designed to handle a third input". I gather it's proprietary as they didn't seem to be able to have any doc on it, at least that they were willing to share. I'm also not sure how much of the design BC Roasters does themselves, vs. being an importer/tester/reseller/supporter. They suggested I use a Phidget controller. I assume that meant replacing their "data gateway" board and dual wiring the ET and BT probes to both the EC55's for front display and also to a Phidget for input into Artisan. I think I would prefer an Arduino based approach as it's more expandable/capable, I suspect quite a bit cheaper, and I have Arduino stuff "in stock" from prior projects.

Here's a pic of the mystery "data gateway" board:




You can see the two inputs labled on the back - 5V power and the A and B RS485 connection that daisy chains to the EC55s. The little bluetooth board soldered to the AGE-609C appears to be a commodity board and presumably not made by the same company making the AGE-609C.

Poking around the modbus registers put out by "data gateway/AGE-609C"... only holding registers appear valid, and there's 120+ of them. 0 and 2 we know are ET/BT, but I also find what look to be temps in 1 and 3. Maybe an ambient temp? All the other regs hold zero values until you get up to 96 or so, where you get what you could speculate is configuration data... maybe the slaveid's of the E55C's as I assume that has to be stored on this board somewhere. In any case, even if I could hack my way into the configuration, it's probably not worth it - better to just replace it with something known.

UPDATE - 7-19-2021 - The microcontroller on this mystery AGE-609C board is a Gigadevice Cortext M3, specifically a GD32F103-C8T6, which makes this board loosely equivalent to an Arduino Due. Here's a link: https://www.gigadevice.com/products/mic ... 03-series/

So... Plan B... why not just expose the "internal" network the EC55's sit on to artisan? I assumed that's they way it was working anyway, before I dug into it. I have a little dongle that exposes an RS-485 modbus network to USB, so I think I'll try just replacing the stock "data gateway" board with that dongle and see if Artisan can read the EC55's directly. If that works, then I can simply hang my gas knob servo off the end of the existing internal RS485 network as I originally planned. I should probably also look at what others have done for "data loggers/data gateways" in customizations.

aabud (original poster)
Posts: 107
Joined: 3 years ago

#3: Post by aabud (original poster) »

Data Logging Update

Yup, bypassing the mystery board and going straight at the E5CC's worked fine. The temp was in 10ths of a degree, just like the display, which was mildly interesting as the mystery board was outputting it as a float... so aside from address and slaveid conversion, the mystery board was also doing some data format manipulation.

The Omron E5CC had some connection quirks... the default comm parms are 9600, 8,N,2 - two stop bits being the odd thing. And the labelling of the RS485 connection on the device seems backwards - it's labelled A and B on the E5CC. Every other RS485 device I've have is labeled A+, and B-. So you'd think A+ goes to A on the E5CC, but no... on the E5CC what is labeled B is actually the +. So I had to wire it "backwards" to get it to work. Couple examples on the net of people hooking up E5CC's made quick work on these two points.

So I'm pushing ahead with this approach of bypassing the "as shipped" data logger and just exposing the internal RS485 via USB as is.

One potential nice thing about this is it exposes the full functionality of those E5CCs. They have a PID in them, for example, though it just controls a relay, so not sure that's worth much.

aabud (original poster)
Posts: 107
Joined: 3 years ago

#4: Post by aabud (original poster) »

Still roasting with the "as shipped" setup while I was working on a "contact" wheel mechanical design for the gas servo... I ran into a couple of roasts where air pressure messed me up, and I learned that you can't just set the damper wheel at the same place mechanically and get the same pressure - you have to adjust the damper wheel so the pressure is what you want... some times 4 pascals of air pressure is a 2 on the damper dial, some days 4 pascals is a 3.5 on the damper wheel. So I was suddenly motivated to start logging pressure. I found a sensor that looked to be a good fit and figured this would be a good reason to go ahead and start the mods.

Here's a diagram of how the data interface works "as shipped" in the BC-2:



And here's how I changed it:



As shipped, the BC-2 appears to your PC as a single USB comm port, where Artisan can talk Modbus to get temps. I liked the idea of changing this to a USB hub, so you can address multiple USB devices in the roaster if you want. For example, Artisan can talk modbus over a comm port, just like before, but I can also program my Arduino over a separate comm port. And USB hubs can be a power source for things like 5V servos. The hub was $20 on Amazon https://www.amazon.com/gp/product/B00VK9C24M

Since I couldn't easily add additional modbus devices onto the "as shipped" proprietary board, I removed it and replaced it with a Waveshare USB/RS485 adapter dongle. $15 on Amazon: https://www.amazon.com/gp/product/B081MB6PN2 Now I can extend the internal BC-2 modbus network with whatever modbus devices I want.

I configured an Arduino as modbus slave 4 (ET and BT 2 and 3 as shipped). Probably could have made this Slave #1, which is what the proprietary board was that I uninstalled, but... oh well. Arduinos don't talk RS485 natively, so I needed a little adapter board for that. I liked the specs on this little board ( $9 on Amazon https://www.amazon.com/gp/product/B07B667STP ).

The Sensirion Pressure sensor wasn't cheap ( $43 at Mouser https://www.mouser.com/ProductDetail/403-SDP610-025PA ). It interfaces via I2C with the Arduino, which is fine, but is 3.3V, which is also ok, but with a slight bit more complications than if it were 5V.

As far as which Arduino model to use, I went for the path of least resistance. I wanted one with decent memory and speed to handle multiple sensors/servos. I wanted with at least one extra TTL serial port to talk to the RS485 board. I wanted one that could speak 3.3V I2C with the pressure sensor. Uno doesn't have the extra TTL serial port, so no... Mega is set up for 5V I2C, so no... I ended up going with an Arduino compatible board called a Teensy ( $30 https://www.amazon.com/gp/product/B08259KDHY ), which has some crazy good specs.

There's probably room to squeeze all this in the BC-2, but difficult to do in a way that would be easy to access and work on. So I opted to mount a small enclosure ($6 on Amazon - https://www.amazon.com/gp/product/B07TS6RY85 ) on the outside, just below the drum speed control. I was able to attach it via the screws that I removed from the old data adapter, so no drilling needed of the BC-2. The cut out for the old USB plug, which was now just a square hole having removed that old adapter board... is what I used to pass wires from inside the BC-2 to my new external enclosure. For now, I've got the USB hub power adapter internal, with it's low voltage running out externally to the hub itself. I may mount that somewhere on the enclosure box. The pressure sensor I put in it's one little box and I've got that just sitting on my enclosure - I plan to mount that on the back of the Magnehelic gauge.




It all pretty much worked without too many surprises. I had to update Artisan to address the now natively exposed Omron temp units. They are set up as slave#2 and #3 as shipped, but current temperature register number is a little wacky to figure out - it's an "int" and it's register 8192. Reading the Omron doc, you might be able to also get it to work as an int32, register 0, but I didn't try that road. The data from the pressure sensor was reasonably close to my Mag gauge, but it was a little "jumpy". I added some Golay smoothing to the Arduino code that reads the sensor, and that helped. I think I still want to play with the smoothing some more.

Here's a roast of some absolutely stunning Prime Green Pink Bourbon ( Sharing a Pink Bourbon ) that I have been loving this past month. Thanks to mkane for posting that. I know there's none left, because I went back and got the last of it after I tried my first order of it. Sorry...



On Artisan, I scale the air x10, so a left axis 50 on the graph is 5 pascals, 40=4 pascals, etc. Often I'll cut the gas a bit mid-way into FC to avoid the flick, but here I thought I'd try to just add air, since I'm logging air now.... Didn't work as well as I had hoped.

I cupped it tonight against an Ethiopian and a Brazil that I also did today, and the Pink is just in a whole 'nother universe. I like cupping, but am still pretty lousy at trying to describe and categorize what I'm tasting, so I won't embarrass myself and try... :-)
★ Helpful

User avatar
mkane
Supporter ♡
Posts: 1750
Joined: 6 years ago

#5: Post by mkane »

Watching this thread even if I don't have plans to automate. As amp builder I like this electronics stuff.

Nice roast and keeping an eye out for Pink Bourbon anywhere.

aabud (original poster)
Posts: 107
Joined: 3 years ago

#6: Post by aabud (original poster) »

Here's the mechanical prototype of the gas knob controller:



I say prototype, because this just seems like something that will take a few different attempts to get something that I like. I like the aesthetics of this "contact lever" idea, and who doesn't like the idea of a few skateboard parts in their roaster? I don't think it's going to work very well, though... now that I have it in place, the knob just feels too stiff to be turned reliably by the wheel, even if I increase the force holding the wheel against it. On the plus side, the idea for how to mount it to the BC-2 worked very well - it's simply sized slightly thick(base is 0.7 inches thick), so that the weight of the roaster holds it in place. So despite the negative outlook, I'm still going to give it a go. I still have to run the wiring over the Arduino and add the code to turn the servo, regardless of the mechanics. Assuming this doesn't work so well, Plan B will probably be a more direct drive mechanism with the servo attached somehow direct to the knob. Or maybe a hybrid where I fit a gear around the knob and then use this "contact lever" to bring another gear into contact with it.

Here's all the parts from the mechanism above. The wood bits were cut from a CNC router, and the aluminum adapters/shafts were turned on a metal lathe. Excuse to use some of the other toys I've accumulated over the past decade or two. The super soft skateboard wheels and bearings were Amazon acquisitions.


aabud (original poster)
Posts: 107
Joined: 3 years ago

#7: Post by aabud (original poster) »

Well, it actually worked better than I expected, but not good enough to be a keeper. This is just a test where I'm sweeping the servo back and forth 45 degrees. There's just too much slipping - compare the tape position at the beginning of the clip to the end... it should be the same, but obviously it's not. There's also more backlash in the drive mechanism I fashioned (my key /key slot was really sloppy). There will always be some backlash, and I already figured that the servo logic was going to employ the "take out the slack" trick of always approaching the target from the downward side, but no sense it being any worse of an issue than it needs to be.
You can kinda see the knob moves around quite a bit, in all directions, so keepers from this prototype are the wide point of contact, and the point of contact being under a little pressure.

Based on this, I think I'll simply fashion a gear that fits over the knob and change out the skate wheel with a matching gear that's one physical piece (no coupling) in the way it connects with the servo. Hopefully the gear mechanism will eliminate any slippage.

aabud (original poster)
Posts: 107
Joined: 3 years ago

#8: Post by aabud (original poster) »

Well, Plan B (geared/levered approach) worked better, maybe almost usable, but not pretty, IMO. I'm still just testing by sweeping the servo back and forth 45 degrees. I think the "stiffness" and "wonkiness" of the gas knob itself is going to be problematic for any sort of indirect drive (e.g. gear, wheel, etc.). Plan C will be attaching the servo direct to the knob. I may go ahead and develop and test the software side to get calibration and control from Artisan (via modbus), so I can actually get some live testing in. Then I'll have something to compare Plan C to when I get it done.

Here's a pick of the geared/levered mechanism:



And a video of it in all it's contorted glory:
Those fat plywood gears worked surprisingly well. I was going to 3D print them, but on a lark, I just decided to try and cut them out of wood on the CNC instead. With the gearing, you can see in the video the swing is very repeatable - the tape mark comes back to the same position repeatedly.

It took a surprising amount of force (you can see I hacked in a rubber band because the springs were way too weak) to hold the gears together. Maybe due to the off center rotation of the knob itself, so the gears have to also move in all directions to stay engaged with each other. I think I'm right on the limit of load for this servo - if I add a little more stretch on the rubber band, I can really hear the servo start to complain about the load. Another reason for direct drive - get rid of any additional load introduced by the coupling approach.

The challenge with Plan C will be how to do it in a way that I can "pop it off" to take manual control if I want to.

CantinaCoffee
Sponsor
Posts: 237
Joined: 3 years ago

#9: Post by CantinaCoffee »

Amazing working! Can't wait to see the progression.

aabud (original poster)
Posts: 107
Joined: 3 years ago

#10: Post by aabud (original poster) »

Winner, winner chicken dinner... the direct drive approach was way smoother. To attach the servo to the knob, I simply took my friction fit gear from the last attempt, marked center on it by holding a pen in the center while I turned the knob, the mounted a metal servo hub dead center.



So having the knob geared serves no purpose... it's just me reusing something in had. Maybe it gives it a cool aesthetic :-) To mount the servo I cut a new plywood bracket similar to before and mounted it on my base plate from the first attempt. I mounted it with a single bolt so it could rotate a bit if needed to track with the knob not being exactly true. This also makes it super easy to plug in to the servo hub, because the heights can be varied slight by moving it around until the mantel exactly. Here it is in action:
Still thinking about quick disengage for manual control. My original idea was to have slack in the bolt holding the bracket to the base, so I could simply pull the servo away and let it flop off to the side. I put those little horns on the bracket to allow a rubber band to hold the servo in the engaged position... obviously those gear spurs are gonna have to go for that to work as they'll catch the band. Maybe a simple speed knob on the hold bolt that I could spin to back the servo away would be simpler.



Next step is to test my calibration and gas setting commands from artisan.

Post Reply