The Smoke-O-Tron




About: Letting my EE degree go to waste while I build an IT business

Who doesn't love smoked meats? Yes, I'm ignoring vegetarians and vegans. Who doesn't love them more when you don't require any skill to maintain temperature for the 6+ hours of cooking?

This guy.

I picked up a Brinkman Gourmet Electric Smoker on an impulse one day. It's a steel can with a 1500W heater, a water pan, and some racks for food. For under $100, it's a reasonable device for getting really fantastic food. However, it only has one setting: about 250F degrees, and that depends a lot on the outside temperature. You see, the heater gets HOT, and when that heat rises, it hits the water pan and the water eventually boils. That barely at temperature steam rises up and mingles with a bit of the 400F degree air and you wind up with about a 250F degree cooking temp. 250F is great for pork, beef, and most other smokeables... but not fish, and not if you want to get a really thick bark on your meat.

Enter the Smoke-O-Tron; a PID controller that can handle the 1500W heater to within about 3 degrees F.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Hardware Selection

OK, so what do we need to do? We need to control temperature in a large air mass using a 1500W heating element.

What does this entail?
1] Measuring temperature in the space
2] Switching the heater on and off at a given speed
3] Having the temperature be easily adjustable: Digital.

Since I wanted a digital read out, I was going to need a Micro Processor on this one. I haven't used one since I was an EE, and even then I spent most of my time keeping large industrial  robots from running me over, which really limited my exposure to the actual processors. I went with the PICAXE 18 line for this one. It seemed to be what I needed, but the development language it uses really limits what you can do with the micro (e.g., couldn't set interrupts). This was kind of an annoyance, but for the precision needed here, it wasn't a deal breaker.

The thermometer was selected to be a K-Type Thermocouple. They tend to be rugged and are good to well beyond the range of temperatures in the smoker. To interface, I went with a Max 6675 Thermocouple Interface IC. This interfaced with SPI to the micro. The PICAXE doesn't do hardware SPI, so I bit-banged it.

Next, the display. The usual 20x2 display seemed enough for this task. The chip almost lacked enough pins to talk parallel to the LCD, so I got a serial one from SparkFun, just to make sure. Again, probably something I'd do differently, but there ya go.

For a relay, I figured that I would leave this thing running for about 8 hours at a time with a switching time of 6 seconds. That's about 2880 on/off cycles for a relay, and with anything reasonable being rated at 20,000, I figured I should look at solid state relays. I picked up a 250V, 20A model from Digikey (about $40), but since then I pick them up on eBay for about $10 with heat sink.

Finally, I went with a rotary encoder for user interface. I was always a fan of "knob with a button" interfaces, and this one was a good way to go.

The power section is your basic AC supply. There's a MOV in there for surge suppression, but you can leave it out. I have no idea why I left it there.

Step 2: Software Annoyances

The software should be fairly easy: in a loop figure out if it's time to do a PID cycle, do it; check if the output PWM needs attention, then handle that; otherwise, check to see if the UI needs attention.

In practice we have a couple of issues on the PICAXE.

1] There are no timing functions, outside of the delay functions.
2] There are no real hardware interrupts you're allowed to play with
3] The "soft" interrupts are really slow and you can only have one defined.
4] Variables are registers. If you want to use RAM, peek and poke out of it
5] Serial output is bit-banged and hangs the code for the duration of the transfer.
6] We can only use 16 GoSub calls in the software, or lose some program space elsewhere.

The last one was easy enough to fix... I got rid of as many GoSubs as possible by in-lining some code.

So, to get around the timing aspects, I found a post on the forums on how to peek/poke the hardware registers to run the timer. We'd still have to poll for overflows, but it's better than nothing.

Next, Since we can't define real interrupts, we had to make the best of the one we had. I put it on the "A" side of the rotary encoder. Every time the knob moved, it should trigger an interrupt and seeing if the"B" side went high or low would tell us the direction. If you move it too fast, it will lose track, but that's what we got.

The button is polled. Nothing exciting there. We simple keep track of how many counter overflows it's been held down to see if it's been held down a little or a lot.

#4 is inexcusable in a high-level language. The compiler should be handling this unless I tell it otherwise. Because of this, you will see a bunch of loads in and out of memory throughout the code.

The serial delays are fairly serious. This means that if you write more than 2 characters to the display, you will lose a timer overflow. I didn't bother to work around it. The PID timing is not precise, and neither is the PWM timing... however, it's less than 1% deviation, so it's fine in this application.

Step 3: PID Logic

The PID is the heart of this code. The basic theory is that you consider three factors to figure out how much heat to apply to the system:

1] how far away are we from the target setting?
2] how fast are we getting there?
3] How much have we been consistently off?

OK, so first off, since this is an 8-bit micro that can handle a few 16 bit registers, we represent the temperatures as the temp multiplied by 64. This is called fixed point math, since we're just shifting the decimal point. A 64x multiplier lets me get a temp up to 1024 degrees with 5 bits of decimal points (1/64th per division). Since the temp sensor is giving us 2 bits of decimal, this is plenty of precision for what we're up to.

When we calculate how much to heat the space (The power demand), we begin with the proportional gain. To get this, we subtract the target temp from the current temp and multiply by the gain setting. As we get closer, we add less and less heat. Running this by itself will, however, leave us with an error. If the gain is too low, then the error will be nearly constant. Too high, and it will oscillate. It's important to make sure when you do this math that you be on the look out for overflows on the registers. If your gain is 1024 and your reading is 16C, the math works out to well over the 65,535 you're allowed to go. So be sure to limit all values to sane ones.

To prevent oscillation we add the Derivative portion. The derivative of the temperature is a measure of how much it's changing. So to do this we save the last reading and subtract it from the current one. Now, we multiply that by the derivative gain and get a measure of how much of the proportional gain we need to get rid of to prevent overshooting the target temp.

Finally, that little bit of error that will always be present when you use only P and D portions can be removed by adding a factor that comes from how far off you've been. While handy for holding the set point, it cannot be stressed enough that because it accumulates, the integral gain has the potential to cause problems faster than anything else. Think about it: You start the system and it's 82F, but you've set it for 225F. For the 45 minutes it takes to come up to temp it's piling on more gain.

We avoid most of this by two simple methods:
1] Limit the I portion to something small... no more than about 10% total available gain
2] Don't accumulate I gain if the temperature is moving in the correct direction.

The second bit there is not standard, but it seemed to work best in this application.

Once you have all the gain components added up, convert to an output value.

Step 4: Building for Testing

The biggest issue here is that I decided to go full out to the 110VAC version. In retrospect, I should have just used a standard 5v supply and run cords to the SSR. However, I went this way, and a good amount of time was spent making sure that I didn't electrocute myself on exposed wiring.

You can pick up the same case at any home improvement store. I took a Dremel to the front panel to make the cut outs. I'm ashamed to say that I was sober and yet the cuts came out that badly.

So, how do you test this? Having a massive smoker in your house may not be convenient. I used a small Tiffany lamp. Tape your thermocouple above the bulb and maybe throw a cloth over it. This will make debugging the PID loop that much easier.

Step 5: Building a Real Version

So next, why not get this made up for real? I decided to give BatchPCB a try. Sure enough, I got back a working board. While selecting parts, I decided that since I was going to put on at least one SMD part, I might as well get the rest as SMD as well. SMD parts tend to be cheaper than the through-hole counterparts, so it was a no-brainer. Baking the boards was decidedly easy. My instructable is located elsewhere on the site .

Step 6: Making the Case Better Looking.

How do you finish this up and make it all sexy looking? Answer: Have your friend with a CNC machine take care of it for you . He did a fantastic job.

Thanks for taking a look through this. I hope this helps people. Please feel free to comment and ask questions. I'll try to answer what I can.

Step 7: Conclusions and Final Thoughts

OK, there are definitely some things that I would have done differently, but over all , the system works well.

1] Go on eBay and buy industrial thermocouples. The bare ones are nice for testing because they're fast, but the kiln thermocouple was far more convenient in practice since you can effectively forget about them. In fact, if I had to do it over again, go on ebay and buy a ready-made PID temperature controller and SSR and then just wire those up. This doesn't need .1 degree accuracy and it'll cost less and be done in a day.

If you've ignored that bit of advice and feel like doing it for the experience...

2] It helps to get in and really dig into a microprocessor to figure out which one works well for your project. Yes, the PICAXE was easy to use, but it's designed for teaching kids robotics and doing some basic controllers. It's fantastic for that, but it's not the perfect fit for this project.
3] The AC supply was pretty basic and brute force. There's really no need for that much transformer, nor did I need anywhere near that much bypass cap reserve. Using something like a SuperTex SR087 swithing converter, I can get the same result for about half the cost of the transformer and it would take up less than a quarter the space.
4] Backlit LCDs suck on bright days.
5] The board was laid out like a noob. Dual ground planes save a lot of etching and the second layer was really not needed. I should have also just left space on it for the LCD so that it could be mounted better.
6] You can't solder to thermocouple probes, so again, buy the industrial ones that come with screw connectors and just have a terminal for them. The keyed connectors were terrible and got replaced pretty quickly.
7] The software works terribly on Fahrenheit mode. I'd probably just add another memory spot for the desired temp in the desired unit and convert to a target temp (in C) on the fly.
8] A built in timer and wireless paging system would be nice, but I'm against spending more on the networking that everything else.

Thanks for reading!

Microcontroller Contest

Finalist in the
Microcontroller Contest

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    17 Discussions


    8 years ago on Introduction

    Nice job on the smoker. I have been muling over the smoker idea for awhile myself. One think I really would like to have is the capacity for cold smoking. I notice the Bradley that someone mentionned does that. Most commerically bought smokers I have seen have done hot smoking.

    But, the price of the Bradley is $500. I am wondering whether it is really worth it, or whether you would be better just throwing together some kind of box with an entry for smoke in it? I'd appreciate any comments or suggestions

    6 replies

    Reply 8 years ago on Introduction

    Cold smoking is pretty straight forward... I even think there's a Good Eats episode that talks about it. A hot plate with a covered cast iron pan of saw dust will billow smoke. Put that in a box with some aluminum dryer ducting and a fan and you will get a cool smoke out. You can pretty much smoke anything in a plastic bag with some holes poked in it at that point.


    Reply 8 years ago on Introduction

    I pretty much understand that part of it. But, where I am stuck is on the stove part. I don"t want to buy a stove just for this. I am not sure I ge the 'covered' cast iron pan idea. How does this work?
    thanks Gouthro


    Reply 8 years ago on Introduction

    Oh, well, there's no stove, just a hot plate. I picked up my last hot plate at the good will for $6. You can get them new for about $20 at a big box store.

    My old smoker generator that got used in this rig (pre-controller) was a cast iron pan filled with wood that I covered in a disposable aluminum pie plate (poke some holes in it). The pie plate was on there to keep the wood from getting enough oxygen to catch fire, so it would just smolder. So you take those two, and put them in a cardboard/metal/ceramic box with a fan to blow out the smoke through some long-ish tubing to cool the smoke, and inject that into your smoke chamber.

    The Good Eats episode is available on You Tube, and the second part shows the process around 1:50.


    Reply 8 years ago on Introduction

    I finally saw the link to the video in your post. Had a look. I am sure i will get something going
    thanks G


    Reply 8 years ago on Introduction

    Thanks for the reply. I looked at Good Eats video but the one I saw had him constructing a hot smoke smoker. I looked around though, and found some other things. One possibly useful one for me was someone using a Weber kettle bbq as a firebox. A flexible tube goes from that to whatever the smoke box is. That may be fairly simple for me to set up. Otherwise, as you say, I imagine I could use pie plates.



    7 years ago on Introduction

    Do you need a higher or lower temp for fish? What kind of temp range do you get with this controller? Will this enable it to get hotter than 250? I dont like my brinkman because ideally i would like it to get to 300 or so for the first hour for the chips to burn then back it off to around 230 for the rest of the cooking time. Is it possible to get the unit hotter than 250?


    7 years ago on Step 6

    what does this exactly do? can u please mention the controller required?


    8 years ago on Introduction

    This is a great way to bring some flavor to otherwise bland TOFU!
    You haven't ignored vegetarians, you just didn't know how many would appreciate this for things like Tofu and BBQ roasted vegetables. Great invention for foodies, keep it up.


    8 years ago on Introduction

    Wow! I love this! You did an awesome job here. I've been working on an AVR based PID controller for sous vide cooking, and I'd be very happy if mine looked half as sexy as yours!

    One question I have is what on-board power supply you used? It looks like you just combined a transformer and rectifier, and left it at that. Is that enough? Can you suggest which parts you ended up using? Thanks so much, I'd love to give this a shot!

    1 reply

    Reply 8 years ago on Introduction

    Nothing fancy for the power supply. It's a 120v->9v transformer, bridge rectifier, 100uF cap, and LM7805 regulator on the board. The power wiring has a circuit breaker and a MOV for protection as well as the power switch.

    If done today, I'd go with a Supertex SR037 to get the voltage. It's cheaper to put it and associated parts than deal with the transformer, and the board space would be much smaller.

    Sorry I don't have the part numbers... I seem to have lost the BOM for the build.


    8 years ago on Introduction

    The derivative is a measure of the rate that the temperature is changing not just how much. The method that you describe to calculate the derivative will be fine as long as you sample at a constant rate (essentially your delta time will be incorporated into your derivative gain), though it will fail/behave funky if your sample rate is changing. Dividing the temperature change by the time between samples would help to prevent potential problems.

    1 reply

    Reply 8 years ago on Introduction

    Very true. And if I could actually tell how much time had passed, I might have been able to factor that in. The Integral component had the same set of issues, but the 1-2% variation in loop calculation time never really affected anything; the time constant is over 2 minutes.

    The time between samples is roughly constant and the errors did average out after a while. The derivative gain was not a huge portion of the gain on this system so it got the shaft in terms of care taken to make sure it performed adequately. If I was tuning PID loops for Galvos, it would be a different story.


    8 years ago on Introduction

    Excellent work. I've been mulling over smoker designs and products for a while now. You may be interested in these smokers as well, for inspiration for a future upgrade.

    2 replies

    Reply 8 years ago on Introduction

    Those look great... I'm looking to make a more portable rig as my condo is tiny and there's just no real point in filling the smoker over here. Carting around a smokey steel can filled with lava rocks is also a royal pain. I liked the portable rig they had there with the Mylar/insulation soft box combo. I might want to take a stab at it.

    Thanks for the link!


    Reply 8 years ago on Introduction

    I'm in a similar situation. The "load-it-turn-it-on-and walk-away" factor is what really intrigued me, plus the low-temp smoking capabilities. Hams, bacons, sausages, etc, etc. I'm willing to buy the wood-chip-cakes, if I can DIY a feeder/burner mechanism. The enclosure will be no problem, I'm thinking junk fridge, or cardboard box.