Thursday, November 28, 2013

Toast-R-Reflow: how-to summary

This is intended to be a sort of "landing page" that summarizes the Toast-R-Reflow project. Now that you're here, you can do a deeper dive by checking out all of the posts here with the toast-r-reflow label.

The internet is full of folks who have made their own SMD reflow oven by hacking a toaster oven. I'm not the first, and certainly won't be the last. The reason you have to hack them at all is because the controls that come with these devices are not nearly precise enough to follow a reflow soldering profile. Gutting the controls that come with the oven and giving control of the heating elements to a microcontroller (like an Arduino), and providing that controller with the ability to read the temperature from a high-temperature rated thermocouple is the task at hand.

Oven heating elements run with AC line voltage power and require hundreds of watts of electrical power. In order for a microcontroller to safely control such a load, it must be galvanically isolated. Most folks have used a Solid-state relay to do the switching, but those are very expensive. Triacs have been around for a long time now, and some are quite hefty. They can be controlled by opto-isolated driver triacs quite simply, with the result that the entire high-voltage switching assembly can be made on one board and built inside the oven where the original user controls were located. The input side of the optoisolator can be wired to low voltage wires and routed outside to the controller with complete safety. The triac circuit is inexpensive and simple enough that putting two copies of it on the board made it possible to cut the current requirements in half (so long as you can divide the load evenly between the two sides). The design is rated for 8 amps per channel, or just short of 2000 watts of power combined.

Lots of folks have bought a commercial PID controller to operate their oven. A PID controller is designed to provide an analog control signal, but that can be easily translated into a digital control signal by using a slow version of PWM. The Arduino has facilities for automatic PWM, but we're talking about a pulse frequency of closer to 1 Hz - much easier to simply do it in software. It should be noted that this is how microwave ovens provide proportional power as well - when you ask for 50% power, the microwave will generate power for one second and then stop for one second. This mechanism makes element control quite easy - you just need to be able to turn them on and off. Commercial PID controllers are also, however, quite expensive. Adapting an Arduino or - even better - an Atmel ATTiny controller to do the job can be done quite inexpensively. I started down this road by breadboarding the controller and designing the permanent controller as an SMD board. The power board was made with through-hole components simply because there are aren't many components and they need to have high voltage ratings. It also served to solve the bootstrapping problem - you build the power board, convert the oven and run the cycles at first with an Arduino and/or breadboarded controller, then use that to reflow the permanent controller.

For a while now, I've been using the OpenEVSE store's 2 line RGB LCD for just about everything. They're the same as the AdaFruit RGB LCD shield, but arranged as a "backpack" design with a 4 pin SIP cable connection back to the controller board. The particularly nice thing about these displays is that you can see the backlight color from much further away than you can read the text, which is useful for simple status reporting. The backpack/shield also allows you to read 5 buttons (we will only need one as a 'start' button) all over a single i2c slave.

The thermocouple needs a cold junction compensated amplifier. There are quite a few of those out there to choose from. The AD8495 is the best answer in terms of cost and simplicity. The original breadboard prototype was made with an AD595AQ, which is an older device and 3 times more expensive. To make the breadboarding easier on the next guy to come along, I designed an AD8495 breakout board that can plug into a breadboard and has a pair of screw terminals for a K type thermocouple. The AD8495 simply outputs a voltage that is 5 mV for every °C. This can be fed directly into an Arduino / ATTiny analog pin and read with analogRead() and scaled appropriately. +/- 1 °C is fine for this application.

Finally, an ATTiny85 is a perfect choice for the controller. It has a USI interface that can be converted into i2c with the TinyWireM library, and it has besides that two digital pins and one analog input pin - exactly what we need.

As for the oven, a Hamilton-Beach 31138 from Fry's was what I more or less randomly chose. It turned out to be an excellent choice. It can keep up with the reflow profile I chose and has yielded quite good results. It was also easy to disassemble and convert to its new use.

I'll be stocking the power and controller boards in my store if anyone wants to follow in my footsteps. The firmware for the controller is over on GitHub.

2 comments:

Unknown said...

I have completed the power board and I am doing the controller soldering. It seems all the assembly instructions I can find are somewhat dated and not exactly what I'm working with, but that is only a minor detail really. Pretty obvious what needs to be done. I'm still waiting for the thermocouple to arrive so I will probably begin an exploratory dismantling of the Hamilton-Beach 31138.

Nick said...

The most up-to-date documentation is the PDF at the Tindie store page. Go to https://www.tindie.com/products/nsayer/toast-r-reflow-controller/ and click on the "documentation" link.