topbanner.gif
Login
Username

Password




Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Shoutbox
You must login to post a message.

Husamka
10-14-2018 07:41
Allens

Husamka
10-14-2018 07:33
Allens 1 lb build,

allenb
10-14-2018 02:57
Icesheet Welcome

JackH
10-11-2018 21:58
Welcome Flanagan805

JackH
10-11-2018 21:56
Welcome popoktan ThumbsUp

Shoutbox Archive
Users Online
Guests Online: 3

Members Online: 0

Total Members: 5,538
Newest Member: Icesheet
Donations
Donations Bank

Latest Donations
John Despres (Scene... - 25.00
snwcmpr - 10.00
Ozo - 20.00
Josh Woodrow - 10.00
John Wattleworth - 20.00

View Thread

Homeroasters.org » DATALOGGERS - CONTROLLERS - RATE OF RISE METERS » Dataloggers/Controllers/Rate of Rise Meters
Who is here? 1 guest(s)
 Print Thread
Fully Integrated ESP32 Coffee Roast Controller
ahardinger
Hi,

I wanted to design a new controller mostly because that's what I like to do. But I also wanted something that was more tightly integrated and cleaner from a wiring and physical installation perspective. This is based on a module from a company called Espressif so I decided to call is the Espresso(if)? =)

Essentially it replaces:
1) An Arduino UNO
2) A 5V power supply
3) A TC4 board (Almost... it only has two thermocouple channels and none of the analog stuff)
4) A zero cross detector
5) A Bluetooth Dongle
6) A WiFi Dongle
7) A 40 amp Zero Cross SSR
8) A 12 amp random fire SSR
9) (If you want to count it) two heat sinks
10) Finally, a whole mess of wires and connectors and mounts and bits and bobs

Key Specs:
-40 Amp TRIAC for the Heater (Limited to 20A though because of the PCB terminal Block)
-12 Amp TRIAC for the Blower (Random Fire Phase Angle Speed Control Capable)
-2 Additional Outputs for external SSR's
-2 Channel Thermocouple Sensor
-On Board Ambient (cold junction) temperature sensor
-Provides +5V and +3v3 at up to 400mA current draw for external devices
-A master OR slave I2C buss with bi-directional open-drain level shifters (5V/3.3V/1.8V compatible), which is independent from the i2c bus used to read the sensors.
-Bluetooth Serial
-WiFi (Can actually run a web server and host web pages + API, etc...)

The controller is at its core an ESP32 module which provides dual 240Mhz Processors, 384 Kb of usable RAM, 4MB of non-volatile flash storage (shared between the firmware), Bluetooth Classic and LE, 802.11bgn WiFi, and a crazy array of peripherals (SPI/I2C/ADC/DAC/Waveform Generator). There is an arduino port for it as well! I'm not an arduino person so I've coded the firmware for my use using the Espressif IDF which is open source, really well documented and actively supported.

The device is fully isolated from mains with a 5kV isolation rating. It is also very well behaved electrically speaking and is nice and quiet because both TRIACS have snubber networks and I put a large filter cap on the phase angle output.

I can get about 50 ft. of range from the Bluetooth connection. WiFi from across my house.

The firmware I have is designed to mimic the Arduino TC4 to a certain extent. At least it is compatible enough to be able to use Artisan to serve as the front end. I've got dual loop cascaded PID control which incorporates BT and ET control, Feed Forward Compensation (a "?better?" solution to the problem that look-ahead is being used to fix), and Proportional on measurement. Filtering of both BT and ET is done using single Pole IIR filters. There's also Blower PID control, since my heater is too weak to get hot enough at full airflow I need to turn down the blower as the roast progresses. This PID adjusts the blower trying to keep the heater output at ~98%. When a low(ish) ET is called for the heater can easily keep up and the fan gets pegged out at 100% (this is also configurable). But as the ET is commanded to rise the heater eventually is running >98% so the blower PID reduces airflow. That's the theory anyways, I'm still tweaking it.

As of right now this version has a few hardware "bugs". (And A LOT OF SOFTWARE BUGS!!!)
- On reset the pin that drives the heater becomes a JTAG debug output for about 1 second, until the MCU boots and runs my code. This means the heater turns on during boot up and firmware flashing (NOT GOOD)
- Outputs don't have pull down resistors so they float and that means the mosfets become partially conducting...again while booting or flashing...
- Cheap USB to serial bridge doesn't play nice with the ESP32 boot loader so uploading firmware is REALLY annoying.
- The ESP32 runs pretty hot and is tightly coupled with the LM75B temperature sensor which affects the cold junction reading causing some error in temperature readings.
- The layout is wrong for the power terminal block.

Second version of the PCB is being made right now so those big problems should be gone.

Anyways, I'm thinking of releasing this as Open Hardware/Software if there's enough interest from people to help support it; documentation/user support/debugging/etc...

Let me know what you think!

-Aaron
ahardinger attached the following images:
controller_-_top_close_up.jpg controller_-_under_side.jpg controller_-_side_view_under.jpg controller_-_front_view.jpg

Edited by ahardinger on 03-04-2018 00:01
 
allenb
This is an incredibly ambitious project and you must have put in a huge amount of research and a few late nights at the bench to get the project to this stage of development.

I think this will be a welcome addition to the list of controller options and especially with your focus on integrating components that have traditionally had to be kluged into the controls package.

A couple of questions,

Does the ESP32 module provide microprocessor and wifi/bluetooth functions in one package or is there a separate microprocessor IC?
Plans for LCD component with integrated push buttons?

Let us know how our digital techies can help with bug fixes.

Allen
1/2 lb and 1 lb drum, Siemens Sirocco fluidbed, presspot, chemex, cajun biggin brewer from the backwoods of Louisiana
 
Want to Help?
By donating you can ensure that HR will continue to be open for years to come. Expenses are 100% transparent and can be viewed publicly at all times. You can find more information on donations and why we request them by reading up on the forum topic here. Thank you.

ahardinger
allenb wrote:This is an incredibly ambitious project and you must have put in a huge amount of research and a few late nights at the bench to get the project to this stage of development.

I think this will be a welcome addition to the list of controller options and especially with your focus on integrating components that have traditionally had to be kluged into the controls package.


Yeah, its taken some time but this is what I love doing so it was fun. I smile when I see how clean the installation is. What I worry about is if the design is general enough to be useful for 80%+ of people's needs for a roast controller.

Does the ESP32 module provide microprocessor and wifi/bluetooth functions in one package or is there a separate microprocessor IC?

They are all in one package. That's the beauty of the ESP32 and why I've been so drawn to it. Spent a lot of time getting to the point where I can say I know what I'm doing on it to the point where I can develop projects from scratch. At this point this is the third project I've used it in and still like it.


Plans for LCD component with integrated push buttons?

Yes. I've been looking at some already made units like this: https://www.digik...ND/4696332 and just using the I2C buss to control it. But I would really like something with a couple of digital knobs to turn as well.

Let us know how our digital techies can help with bug fixes.


So, once the new boards come in I think the HW will be ready enough for others to play with it. Would like to chat with anyone who's interested in working on it.

-Aaron
 
greencardigan
I'm interested but can't guarantee how much time/effort I can commit to it.

The trouble with making it general enough is the code base can get messy trying to allow for all various roaster/logging setups. This has made the TC4 code big and there are low memory issues with the Arduino Uno.

I'd also like to play with the wifi capability. I picked up a few ESP8266 a while back but haven't had time to do anything with them yet. I like the idea of having the ZCD built in and would also like to see a 20x4 LCD, digital knob/pots and buttons.

Any idea what the total cost would be for this setup compared to a TC4 based board with 2 solid state relays? More I would guess?
 
ahardinger
greencardigan wrote:

I'm interested but can't guarantee how much time/effort I can commit to it.


I'm glad you replied. I've seen your commits on the TC4 git repository and wanted your thoughts.


The trouble with making it general enough is the code base can get messy trying to allow for all various roaster/logging setups. This has made the TC4 code big and there are low memory issues with the Arduino Uno.


Yeah, that's one of the reasons I don't Arduino. But with the ESP32's 4MB flash and RAM size the code base can get pretty large. My firmware right now, including all of the libraries, clocks in at ~600KB on the flash so there's plenty of room left over for more code + web pages etc...

I'd also like to play with the wifi capability. I picked up a few ESP8266 a while back but haven't had time to do anything with them yet.

The ESP8266 is a great chip, just a little under powered for what I usually want to do. The IDF is growing at a crazy speed and the documentation has gotten so much better. When I first started there wasn't much around and it was all guess work and intuition. Plus some google translate for the Chinese.

I like the idea of having the ZCD built in and would also like to see a 20x4 LCD, digital knob/pots and buttons.


Do you have a source for some already build LCD boards with button + rotary knobs on the I2C interface? If not I may just have to spin up a design for it.

Any idea what the total cost would be for this setup compared to a TC4 based board with 2 solid state relays? More I would guess?


I'm getting some quotes from Assembly Houses on how much it will be to populate the board. There's a lot of SMT stuff there (0603 + QFN's). I hand place for small qty but that's also expensive in terms of time.

If you'd ask me how much I would sell them for, fully assembled... maybe ~$90 which covers BOM, PCB Fab + Assembly, Final Assembly, Machining, Packaging, Shipping, Taxes, plus a good bit of my time. This could change once I get a "REAL" quote from the assembly houses.

Does this price list look right for a "traditional" setup? Also beware of the cheap SSR's from ebay + amazon + aliexpress. I've torn 3 of them down (all 25 amp models) and found BTA12 TRIACS in them. Fine if you're pulling 12 Amps like my setup but for a big rig it may end up in flames. And the 40 Amp SSR's have BTA20 or 25's as well.

40A SSR + Heatsink $12.99
Random Phase SSR $16.5
Heatsink $3.47
Arduiono UNO R3 $7.99
TC4 $39
ZCD $24
5V Power Supply $6.99
Bluetooth Module $6.99
$117.93
 
greencardigan
The only I2C board with buttons and LCD that I'm familiar with is the LCDapter board that Jim sells. It's on the github page. I'm not aware of any that include rotary knobs, but I haven't really looked either.

So prices are likely in the same ballpark. That's good.
 
btreichel
Adafruit has a i2c lcd backpack with 4 buttons. https://www.adafr...roduct/714
 
AudioBone
Holy cow, I'm so glad I checked in the forum. This sounds incredible!

I have been trying to learn all I can about electronics and circuits ever since this hobby has taken ahold of me. Since it seems the TC4 is nearly impossible to get at this point, I was starting to think I'd have to roll my own from scratch, or at least clone it.

This controller has basically all the ins-and-outs I've been looking at, though to be honest, I know next to nothing. I'm a classical musician, so electrocution is more likely than a working controller in my near future.

I wholeheartedly support this and thanks for your considerable amount of time already!
trombone.nyc
 
BenKeith
It's super simple to make the LCD board. There are only a couple of parts on it. I just made another one last night. The one I drew up has headers for the buttons and LED's because I remote the buttons and don't use the LEDs. so having them mounted on the LCD board does me no good anyway. It's also all through hole parts, so no little bitty SMD's to solder.

I can email you a PDF file that already has the negative needed to make the one I make, It's only about 2"x 2" and works on a single sided board.
 
ahardinger
AudioBone wrote:

Holy cow, I'm so glad I checked in the forum. This sounds incredible!

I have been trying to learn all I can about electronics and circuits ever since this hobby has taken ahold of me. Since it seems the TC4 is nearly impossible to get at this point, I was starting to think I'd have to roll my own from scratch, or at least clone it.

This controller has basically all the ins-and-outs I've been looking at, though to be honest, I know next to nothing. I'm a classical musician, so electrocution is more likely than a working controller in my near future.

I wholeheartedly support this and thanks for your considerable amount of time already!


Thanks! Its not quite ready to go but I hope it will be soon.

On a side note. Please read up and get comfortable with High Voltage electricity and safety before you start working with this stuff. The controller I've designed has isolation between the low voltage and high voltage side. But, the high voltage is right next door so-to-speak and certainly could be lethal. Stay safe.
 
ahardinger
BenKeith wrote:

It's super simple to make the LCD board. There are only a couple of parts on it. I just made another one last night. The one I drew up has headers for the buttons and LED's because I remote the buttons and don't use the LEDs. so having them mounted on the LCD board does me no good anyway. It's also all through hole parts, so no little bitty SMD's to solder.

I can email you a PDF file that already has the negative needed to make the one I make, It's only about 2"x 2" and works on a single sided board.


Is this like an i2c backpack then? Either way, yeah please send it along.
 
renatoa
It's raining with roaster boards, lol...
Just this morning another thread started about a board good enough as seed for a roast controller.

https://forum.homeroasters.org/forum/viewthread.php?forum_id=133&thread_id=5504
DIY: TO based IR to bean 800g
Moded commercial: Dieckmann RoestMeister, Nesco, popcorn.
PID/ramp/soak controllers, MS6514 USB/Artisan/Apps/popC/ESP32
Grinder: mod'ed Porlex to 47 conical burrs
 
BenKeith
What's the old saying " Necessity breeds invention"
Since it looks like the TC4 supply has dried up, and people have gotten used to the idea that you don't have to be a master roaster to roast a good cup of coffee with a PID, they are going to come up with other sources for something to control/monitor their roasters.

If the TC4 was still available, no way would I have gone through the troubles of making one, when you could buy them fairly cheap.
 
BenKeith
I just finished laying out the schematic for my latest brain fart. The ZCD, Fan control, and Heater control is all in one. I tried to post a copy but the site won't let me and didn't feel like going through getting it into photobucket and then here.
It did make for a pile of parts to order with all the rectifiers/diodes and stuff.
Screen shot of 3D image after doing the layout

i903.photobucket.com/albums/ac239/BenKeith/SSR_BOARD_zpspvfcztwl.gif
Edited by BenKeith on 03-06-2018 17:30
 
ahardinger
BenKeith wrote:

I just finished laying out the schematic for my latest brain fart. The ZCD, Fan control, and Heater control is all in one. I tried to post a copy but the site won't let me and didn't feel like going through getting it into photobucket and then here.
It did make for a pile of parts to order with all the rectifiers/diodes and stuff.
Screen shot of 3D image after doing the layout

i903.photobucket.com/albums/ac239/BenKeith/SSR_BOARD_zpspvfcztwl.gif


Does this board incorporate the TRIAC's for the heater + Fan? If so, how do you get the high current in/out of the board? Also, what about the HV isolation?
ahardinger attached the following image:
espespresso_hv_isolation.png
 
renatoa
If would be me who design this, I'll made it two boards.
A 3 wire RC servo type cable, that carry just the power/fan control signals, is not a mess compared to the mess to bring power wires from the heater to the unique board.
DIY: TO based IR to bean 800g
Moded commercial: Dieckmann RoestMeister, Nesco, popcorn.
PID/ramp/soak controllers, MS6514 USB/Artisan/Apps/popC/ESP32
Grinder: mod'ed Porlex to 47 conical burrs
 
JackH
BenKeith wrote:

I tried to post a copy but the site won't let me and didn't feel like going through getting it into photobucket and then here.


What trouble did you have with the site? The attachment file size has been increased to 10MB.
---Jack

KKTO Roaster.
 
BenKeith
JackH, it wasn't really a problem with the site, it was just the site doesn't let me go directly from a file on my computer directly to pasting it on here. I have to go through a third party (photobucket). Photobucket has made it a total pain in the butt to use and from the looks of it, photobucket has stopped letting you do that without becoming a paying user.
Now, if you are supposed to be able to go directly from your computer to the site, I don't know how. I get a this thing saying I'm using a fake site that blocks it.

As for the design of the board, it's still in it's infant stage. I've thought about the fact that the way it is now, it's all or nothing and I need to break the inputs out so it can be used either, or all. I'm running BT151-800r, 12 amp triacs for the fan motor and 2N6509, 25 amp triacs for the heater side. The fan side has the same ZCD circuit used by the TC4. I've been using that one a few years and it works great. I could use a couple different ones with a whole lot less parts but I decided to use this one.
I've been using this basic SSR design for a couple of years in another project of mine and it has worked well so I just decided to double it up.
As for the current, the fan side is not a problem, the heater side, I've got to experiment with, I'm thinking I will probably have to make me a copper bar buss system. For now, it's going as designed, using the runs of the board, and seeing if it will pass a smoke test, but probably not with a 100% duty cycle.
Also, being just for my use, it ain't gotta be too fancy. It's just one of those things I decided to see how it would work. I've got enough SSR's I don't really need it anyway, just something else to play with.

As for isolation, this whole board is nothin but one big SSR. A whole bunch of parts controlling some high AC voltage by some opti-couplers, so keep your fingers out of it and you don't get bit. The opt-couplers mounted on the board provide isolation from the from the controller, which is mounted on another board, in this case, the TC4 or TC4C. In another project, an ATMEGA328 is mounted on the board with the SSR but again, the two section a separated and only join at the Opt-coupler on the high voltage side.
Edited by BenKeith on 03-07-2018 01:32
 
ahardinger
renatoa wrote:

If would be me who design this, I'll made it two boards.
A 3 wire RC servo type cable, that carry just the power/fan control signals, is not a mess compared to the mess to bring power wires from the heater to the unique board.


So, the reason I made this was that I wanted an integrated solution that had all the capabilities of the traditional setup within the scope of a coffee roaster. With the design proposed I think there would still be most of the wiring mess as well as parts. Essentially it would combine the TC4 and the Arduino together (essentially a TC4C) but that part of the system is already fairly well integrated being that the TC4 is a shield for the arduino.

The "problem" (for me personally) is that I still have to add an external power supply, and wire it up to AC + carry the DC over to the arduino. Then I have to add a ZCD board, wire that up to AC and carry the signal lines over to the controller.

Now, I do recognize that a "power" board could be made that would have all the high voltage parts on it (Dual SSR, ZCD, 5V power supply), much like BenKeith is talking about, and that could connect back to the controller board via a 5 pin cable (+5v, GND, FAN, Heater, ZCD). That would be cleaner than the traditional solution... but why?

That solution doesn't add any practical flexibility (I am open that I may be wrong about this), doubles the board count, and adds a 5 pin cable. The power board still has to have Live + Neutral power into it. Live to feed to Heater + Blower + ZCD. Neutral is required for the ZCD to work. Then you've got to run the Blower Live and Heater Live to it as well.
 
ahardinger
So, it appears that there are some aspects to this controller that are problematic but I'm not aware of what they actually are. In the end this is a working design and within the next week I can have up to 10 units ready to go. Having said that I'm 100% open to discussing and changing any part of the design, let's just have specific discussions.

@Renatoa please continue to discuss the issues, I very much appreciate the feedback.

@BenKeith can you please create a new thread to discuss your board design? It appears like you're creating a distinct design from this controller and if you don't think the espEspresso can be modified to address the problems your design is trying to solve then I fully support creating a new device.

On a side note. I'm cleaning up the schematic and will be publishing the firmware and hardware design files, Eagle CAD, this week on GitHub. This should pull back the covers a little more. =)

-Aaron
 
Jump to Forum:

Similar Threads

Thread Forum Replies Last Post
light roast with SR340 Roasting Coffee 1 10-15-2018 05:01
Fresh Roast SR500 first impressions Roasting Coffee 18 09-20-2018 03:44
No mod, ready to use, BM coffee roaster Bread Machine Roasters 3 09-11-2018 19:46
CR3 Arduino coffee roaster shield (TC4-compatible) Dataloggers/Controllers/Rate of Rise Meters 49 08-29-2018 09:07
Roast Profiles - For Behmor 1600 Plus Manual Mode Behmor 1600 9 08-15-2018 23:51
Homeroasters Association Logo, and all Content, Images, and Icons © 2005-2016 Homeroasters Association - Logos are the property of their respective owners.
Powered by PHP-Fusion Copyright © 2018 PHP-Fusion Inc
Released as free software without warranties under GNU Affero GPL v3
Designed with by NetriX