Who is here? 1 guest(s)
 Print Thread
DIY SSR with Picmicro cpu
bvwelch
Greetings,

NOTE-- this project is roughly equivalent to a "router speed controller" which you can find at Harbor Freight and elsewhere for about $10. Check out the other discussions here about the "router speed controller".

Variacs are great, but big and heavy. I wanted to keep my modified popper somewhat portable, so I came up with a lightweight alternative.

I used a triac (an SSR would be OK too) and a little single-chip microcontroller, and a cheap potentiometer/knob.

You may be an embedded software person yourself, or you may have a friend that is always looking for a little project.

Anyway, the idea is simple-- these little computers are cheap-- about $2 and they have a built-in A/D. This means with a little software, you can read the "knob" and control the triac or SSR.

I mounted mine in an aluminum project box which also doubles as the heatsink for the triac.

If there is interest, I will provide a schematic and free software. And if you can't find a friend to help, I could probably provide a few pre-programmed chips to members.

I also did my own PID software but that is another thread, if there is interest.

Bill
Edited by bvwelch on 01/18/2008 5:49 AM
 
seedlings
I'm interested! Ooh, pick me! Look over here, ME me ME! Here I am!s:2

I need one of those if I'm ever going to graduate to custom nichrome!

CHAD
Roaster: CoffeeAir II 2# DIY air roaster
Grinder: Vintage Grindmaster 500
Brewers: Vintage Cory DCU DCL, Aeropress, Press, Osaka Titanium pourover
 
bvwelch
CHAD,

Thanks for your interest. I realize that I worded my posting a bit carelessly, and I don't know if you're interested in the standalone variac replacement idea, or the PID project.

Bill
 
seedlings
Well, my gradeschool reply didn't help either. The triac is what interests me. I'm just OK with circuits but would love to check this one out. As you'll learn I'm pretty budget savvy, so the $5 price tag is real nice.

CHAD
Roaster: CoffeeAir II 2# DIY air roaster
Grinder: Vintage Grindmaster 500
Brewers: Vintage Cory DCU DCL, Aeropress, Press, Osaka Titanium pourover
 
stereoplegic
my answer to whether i'm interested in the variac replacement idea or the PID is... YES! (both please)
 
boyntonstu
I use an infinite controller from a 240 VAC electric range top burner.

It is a 4 terminal device. 2 lines in and 2 heaters out.

I am not sure if it works with 110VAC but it sure works great on my 110 VAC electric grill with 240 VAC applied.

$5.00 on eBay.

Take 2 hots from 2 extension cords for the 240.smile

BoyntonStu
 
Island Addict
I know this is an old thread, but I just came across it and my ears perked up. I've been playing around with microcontrollers for a while, and I just finished a project using an AVR micro to read thermocouples in the roaster and send data to the computer for logging. (I know there are off-the-shelf solutions for this, but in the home roasting spirit, I get more enjoyment out of making things myself.) Adding microprocessor control of the heater and fan would be a great next step. If you're willing to share schematics and/or software, I would be incredibly grateful.
 
bvwelch
Greetings,

I'll be glad to share information with you. Tell me more about your setup-- seems like you have a Poppery I, but I may be wrong about that.

I'd be interested in knowing about your TC to AVR schematic as well. I tried various things with mixed results. I do have some Maxim samples that look interesting, but that project is on the back burner for a while.

I do embedded software for my day-job, so I understand your interest in rolling your own, even if it isn't necessarily cost effective.

-bill
 
Island Addict
Thank you for offering to help! I really appeciate it.

Yes, I'm using a Poppery I. I currently have it set up with a transformer to boost the voltage on the fan and a standard light dimmer for control. I have the heater separated out and controlled with a router speed control. I would love to replace both controls with a solution using the microcontroller (an atmega168).

I'm using the MAX6675 chips for the TCs, and they work great. Connecting them to the microcontroller is a piece of cake--just connect up the MISO, SCK, and SS pins. Nothing else is needed. Cold junction compensation is built in. The code for reading data via SPI was more of a challenge, but I figured it out after a long struggle. (I have a background in programming but am new to embedded stuff, learning as I go.) I've tried the TC in ice water and boiling water, and it is spot on. I occasionally get erratic readings, but I think ungrounded probes will resolve that.


Rob
 
bvwelch
Rob,

Very cool-- those are the chips that I have sitting in my pile to be evaluated! Nice to know they are worth looking at. I think I'll go order some more, since Maxim chips seems to come and go...

How soon will you be working on this? What I mean is, if you're planning to tinker with this right away, I'll try and feed you some rough info ASAP.

But if you're not in a big hurry, I'll work on documenting the mods a friend and I have made to our P1s. I've been enjoying using them so much, I haven't been too good at documenting. Basically we're doing mods that were inspired by a series of messages on the SweetMarias mailing list by Doug Strait.

About PID and microcontrollers-- as you probably know, surplus PID controllers can be found very very cheap-- $20 to $50. So unless you enjoy embedded programming, it doesn't make sense to roll your own. However in my case, I wanted some first-hand experience with PID control loops at 400+ degrees F. :-)

Even though I got my PID setup to work, I have put it away for a while-- I have so much to learn and experiment with in the roasting process, that I found the PID was just getting in the way. But I'm happy to share what I've got and maybe it will inspire me to pick it up again.

I also switched from a microcontroller to a simple '555 timer chip, so that folks could duplicate the circuit without worried if I would be around to provide software. :-)

Doug's idea is basically-- use a TRIAC to control heat, and for the fan, he uses a full-wave diode bridge with big cap as a 170V DC source, switched by a power MOSFET at about 1 KHz to control the nice "universal" motor in the P1 and also the original WearEver Pumper.

I love the BTA20 TRIAC-- it is cheap, snubberless, and has an isolated tab for added safety. I use a "driver" chip, which possibly you could skip but it is so cheap I'd leave it in there.

Back to PID-- a few things I learned-- work with real coffee beans, not just empty chambers-- makes a huge difference.

Measure your time constants, impulse response, etc. Seems like my setup takes 30 seconds or so to respond to changes.

Make sure your TC is buried in beans, rather than hot air. This is a bit of a challenge, since the beans double in size, and lose weight as they roast. That is where the fan control can be a big help.

Let me know your timetable, and I'll dig around in my notes and find a schematic or two.

My PID code is very rough and ugly, but you wanna see that also, I can make it available.

Have fun!

-bill
 
Viridian
I am intensely interested in both of your ideas regarding using a triac to vary heat and the freq drive(is that what it is?) for air. But, to be honest, I am most interested in funding your future experiments by simply offering you money to build them for me. Could you be induced to do that? I have a stock P1 which I want to mod.
Come to think of it, how difficult would it be to drive the triac via 0-10, 0-5 or 4-20mA? Automation Direct has PID's which have 64 segment ramp/soak with 0-5 or 0-10 out for $89 and includes basic software to control via RS485. I would like that better than simple SSR on/off control.
I wish I knew more how to do this stuff you like you Bill, but I ain't there yet.

Thanks, and let me know what you think,
Erik
 
seedlings
My ears are perked as well, Bill! I only blew one resistor building your triac circuit, so bring on the PID!

Bill, any and all documentation you can provide will be invaluable for us novices ;) . And, see? You can SELL your ideas! Why not put a package together and:
1) offer some basics for someone to try and recreate it in their home, plus
2) offer it completed by you for sale?
You'll have takers on both ends.

Drooling, waiting,
CHAD
Roaster: CoffeeAir II 2# DIY air roaster
Grinder: Vintage Grindmaster 500
Brewers: Vintage Cory DCU DCL, Aeropress, Press, Osaka Titanium pourover
 
Island Addict
Thanks Bill. I'm in no particular hurry. I always seem to have several projects up in the air at any given time anyway. I'm good with rough information too. Please don't spend a lot of time polishing it just for my benefit, but schematics would be a huge help. My interest in this is definitely about learning, not about buying off the shelf solutions. It seems like a wasted opportunity to buy something for $50 when I can spend three weeks and $100 making it myself.
s:6 B)

I saw your 555/driver/triac circuit and that is exactly what I have in mind, except using the AVR instead of the 555. I think I understand how you're doing it, but I'm not compeltely sure. For the fan, the MOSFET/rectifier is also exactly what I am interested in. I can build a circuit from a schematic, but as a hobbyist and not a trained engineer, my grasp of theory is basic.

My first priority is to have automatic logging of heat/air settings and enviroment/bean temps. I want to get a feel for exactly what is happening during the roast, then I will tackle the PID code. I suspect that I'm going to find exactly what you did--that PID control gets in the way of learning and experimenting.

I hear you about the importance of how bean temperature is measured. I've played around a bit with measuring brew temps in an espresso group, and I know that exactly how and where you measure makes a huge difference. I'm sure the same is true with roasting. The biggest challenge seems to be figuring out how to measure actual bean temp, and not the temperature of the air or of the roast chamber wall.
Rob
 
bvwelch
Before we get into this too deep, I recommend that you guys review the various threads that came about the first time-- there are some sound reasons why doing this makes no economic sense at all.

Now, as a hobby project, it is fine. But I'll post these reminders once in a while so maybe we don't have to keep re-hashing the issues.

Don't get me wrong-- I do welcome any and all suggestions and criticisms-- I've got a lot to learn. I'm really a "software dude", and I do these little projects partly to learn more about hardware myself.

http://forum.home...ead_id=747

http://forum.home...ead_id=750

http://forum.home...ead_id=759

http://forum.home...ead_id=785
Edited by bvwelch on 08/29/2008 12:56 PM
 
bvwelch

Quote

Viridian wrote:

Automation Direct has PID's which have 64 segment ramp/soak with 0-5 or 0-10 out for $89 and includes basic software to control via RS485. I would like that better than simple SSR on/off control.

Erik


Erik, Can you give further details about what you are looking for? If you are asking can that off-the-shelf PID control a homebuilt TRIAC circuit, the answer is most likely yes. I use a "driver" chip that has an opto-isolated input that is current driven, and should be a direct match.

However, I am wondering why you wouldn't purchase a surplus SSR instead?

-bill
 
bvwelch

Quote

Viridian wrote:
I am intensely interested in both of your ideas regarding using a triac to vary heat and the freq drive(is that what it is?) for air. But, to be honest, I am most interested in funding your future experiments by simply offering you money to build them for me. Could you be induced to do that? I have a stock P1 which I want to mod.


I might consider building one for some sort of trade, like maybe an espresso machine?

Also, see my other thread on the P1 mods-- the external box, is so very much easier and quicker than trying to fit the circuits inside the unit itself.

-bill
Edited by bvwelch on 08/29/2008 1:45 PM
 
bvwelch

Quote

Island Addict wrote:
It seems like a wasted opportunity to buy something for $50 when I can spend three weeks and $100 making it myself.

I saw your 555/driver/triac circuit and that is exactly what I have in mind, except using the AVR instead of the 555. I think I understand how you're doing it, but I'm not compeltely sure. For the fan, the MOSFET/rectifier is also exactly what I am interested in.



Rob,

Yes, we'll check the current/drive available from the AVR I/O pin, but most likely it can be connected directly to the TRIAC "driver" chip that I use. I'll dig up the schematic from my picmicro controller, and probably your cpu will have comparable output capabilities.

The "boost" that you get from the 170V DC on the fan is amazing, and allows for 1/2 pound of greens to be roasted.

-bill
Edited by bvwelch on 08/29/2008 1:51 PM
 
bvwelch

Quote

Island Addict wrote:

I'm using the MAX6675 chips for the TCs, and they work great. Connecting them to the microcontroller is a piece of cake--just connect up the MISO, SCK, and SS pins. Nothing else is needed. Cold junction compensation is built in.



Please tell me more about the TC side of the connections. Did you make a circuit board? How are the pins of the MAX chip connected to the TC itself?

Thanks,

-bill
 
Island Addict

Quote

The "boost" that you get from the 170V DC on the fan is amazing, and allows for 1/2 pound of greens to be roasted.


That sounds great, and without the need for a bulky transformer!

The AVR I/O pins are rated for 40mA.
Rob
 
Island Addict
For my prototyping, I've been using an SOIC to DIP breakout board (http://www.sparkf...cts_id=494), with the TC leads soldered into the DIP holes.

The critical thing is to make sure the cold junction is at the same temperature as the on-chip temperature sensing diode. Avoiding sudden changes in ambient temperature is important, as is, I guess, making sure the thermocouple cable itself doesn't conduct heat down to the cold junction. In my final setup I think I'll put the MAX chip inside a separate metal box to help keep the temps stable around the chip.
Rob
 
bvwelch

Quote

Island Addict wrote:
For my prototyping, I've been using an SOIC to DIP breakout board (http://www.sparkf...cts_id=494), with the TC leads soldered into the DIP holes.

The critical thing is to make sure the cold junction is at the same temperature as the on-chip temperature sensing diode. Avoiding sudden changes in ambient temperature is important, as is, I guess, making sure the thermocouple cable itself doesn't conduct heat down to the cold junction. In my final setup I think I'll put the MAX chip inside a separate metal box to help keep the temps stable around the chip.


I'm not sure what TC you are using, but the cheap ones I use, wear out fairly often, so I'll need to come up with some connector or other.

Yes, I found out the hard way that you need to keep your TC amp/circuit far, far away from the roasting chamber's 400+ F temp. On one of my prototypes, I did the basic TC conversion with a little 8-pin picmicro, and then sent the results via opto-isolator to the main PID controller.

-bill
 
bvwelch
OK, there are a couple of different types of circuits we could use for controlling the heat. One is popular for "dimmers". The idea is to dim the light without flickering. So, they do this by sending "something" to the light bulb at 60 Hz. What you might call a "modified" or "partial" sine wave.

Another approach, which is the one I tend to use, is to turn on/off the voltage at the "zero crossing" of the sine wave. This is nice, in that it doesn't send noise spikes all over your house and possibly mess up your X-10 or other gizmos on your AC line.

The only down-side, is that you basically have 8mS or so granularity on your on/off times. Not a problem for a nichrome wire at all.

I need to double-check this schematic against my notebook, but here is an early sketch.

Note the little "driver" chip. That one has built-in zero crossing detection, so you don't have to worry in your cpu code-- just turn it on or off for multiples of about 8mS, and it will do the heavy lifting for you.

Your cpu would connect to the left side of the chip. I've drawn a "ground" symbol, but what I mean, is your cpu/system ground. Inside the chip is a LED which is isolated from the rest of the driver chip, so all you need to do is adjust the resistor to get the correct current/drive into the internal LED.

bvwelch.com/roast/cpu_heatcontrol.jpg


Here is a pin-out of the triac I like for heat control:

bvwelch.com/roast/bta20.jpg


More later,

-bill
Edited by bvwelch on 08/29/2008 7:29 PM
 
Island Addict
Okay, I think I get it. I like the optoisolator and the low noise zero-crossing detection.

Does the triac need a heat sink?
Rob
 
bvwelch
Rob,

Yes, the triac needs a heat sink. Since it has an isolated tab, I fastened to the large metal bottom plate of the P1. In the photo (see other thread), you can't really tell it, but the triac is mounted beneath one of the circuit boards. The cool air from outside comes in all around that area, which helps.

-bill
 
seedlings
Just for a laugh, is there another easy, cheaper way to get the same results as -->THIS AUBER CONTROLLER<---?

As few as 4 segments would be just fine with me!

CHAD
Edited by seedlings on 09/02/2008 12:59 PM
Roaster: CoffeeAir II 2# DIY air roaster
Grinder: Vintage Grindmaster 500
Brewers: Vintage Cory DCU DCL, Aeropress, Press, Osaka Titanium pourover
 
Jump to Forum: