Wednesday, November 26, 2014

Reflow Toaster Oven - Part 11 - Rewiring

Finally found some time to replace the wiring of the oven. I yanked out the "controls" and redid the wiring. Installed two SSRs on heatsinks and three thermocouples. The result can be seen below.
I used some kapton tape to cover the bare 230V leads on the SSRs. I still need to fix their heatsinks to the bottom of the oven, for now gravity will do the job.
Please excuse the incorrect symbols...
I moved the thermal safety switch from the front to the back because the mains load wire isn't long enough... Mains L connects to the safety switch, so that power to the oven will be cut when the temperature gets too high. From there it goes to the SSRs. Each SSR is connected to one heater element (wires on the left of the photo, front of the oven). The other end of the heater elements are connected to mains null.
I also added three thermocouples in a more permanent setup. Each heater element has one thermocouple, the fiberglass sleeve of the thermocouple has been wrapped in some kapton, and I used a bit of iron wire to strap the kapton covered sleeve to the heater. The thermocouple's junction just presses to the heater. The floating thermocouple in the middle measures air temperature. It's held in place with, again, kapton tape.
I covered parts of the door with aluminium tape, hopefully that will reflect some of the heat.
The difference is noticable; the covered parts of the glass stay cool to the touch whereas the center gets warm. If this works well then I may just have to cover the entire inside of the oven with this stuff, but I'll have to check how well the glue on this tape holds up in the heat first. This is extremely sticky stuff by the way and very thin.

So with the cover back on I have a few wires poking out of the front panel: 3 thermocouple connectors and 2 times 2 wires for the SSRs. Looks like I didn't mess anything up. I didn't blow a fuse when I plugged it in, it didn't catch fire when I turned it on and it didn't kill me when I touched the metal cover. I'm almost disappointed :)

Wednesday, November 19, 2014

Reflow Toaster Oven - Part 10 - Insulation

Yay! The thermal insulation blanket I ordered arrived today!
Cutting this stuff is fairly easy with a snap-off knife. The thickness is just about right (1 inch, 25mm) for the top.
Still have to get rid of the electrics here. That motor's gotta go as well.
Plenty of glass wool left. But I'll use that later, I'm not completely done yet.

Before insulating it I did a few test runs while logging the temperature. After insulating I repeated those tests.
Well, that's disappointing. A cold insulated oven (first run) actually performs worse than a pre-heated uninsulated oven :( It doesn't seem to matter much whether its insulated or not, weird...
But, what's more important is that the top of the oven no longer reaches 80 degrees C, but remains at a comfortable 35 degrees C. The uninsulated back of the oven on the other hand... Like I mentioned before, the back is just a thin piece of single layer sheet metal. It goes well beyond 200 degrees C; not something you'd want to touch. Also, the side of the oven where the electrics are stay below 40 degrees instead of 80. Not ideal yet but much better than before.

So what's next? I'd like to attach another piece of sheet metal to the back of the oven so I can add some insulation there. I need to strip all of the existing electrics and add some solid state relays. I also received the heat sinks for the relays this week, so I can finally make a more permanent installation. I'd like to install some thermocouples as well. I'm probably going to need a fan to cool the electronics, and I'd like a large slow fan in the oven to create a bit of airflow and help spread the heat more evenly.

Tuesday, November 18, 2014

Toaster Reflow Oven - Part 9 - It's raining components

In an attempt to find out whether or not the heat is spread evenly in the oven, I decided to attach multiple thermocouples to a large PCB and give it a go.
Fortunately I haven't been to the waste disposal center recently, so I still had a PCB from an old laptop in my junk drawer.
I tried to find some bare pads or large patches of solder on the board and stick the thermocouples in place with some aluminium tape.
Shortly after I turned the oven on, the outer two thermocouple came loose and detached from the board, crap. There seemed to be some temperature difference between the remaining two thermocouples; about 10 degrees Celsius. As the temperature approached 200 degrees C, some unfamiliar sounds came from the oven. Plonk... Plonk... I soon realized the solder on the bottom of the board was starting to melt and the larger components were starting to fall... Doh! Removing the hot board from the oven didn't do much good to it either...

Hmm, missing some bits here...
The CPU doesn't need those caps right? Right?
So that's one way to harvest a board for components.
Who wants some SMT electrolytic caps? Or some coils?
Or a whole bunch of ICs?
Some passives anyone?
So much for my first (accidental) reflow :)

Tuesday, November 11, 2014

An alternative heat source

It's always good to have a backup plan :) I read in a few other blogs and build logs of toaster oven conversions that conventional heater elements can be difficult to control precisely. Like turning an oil tanker.
Last year I bought a heater for when we go camping with our family tent. It uses some different heating elements that warm up a lot faster.
Yes, it's bright! And it heats up fast! But it's a different kind of heat. I guess the IR frequency is different. The element gets seriously hot though.
That's 460+ degrees C, and in about a minute.

Each element is 400W. There's three elements in the heater and it has a bunch of reflective material which could be reused. The heater was something like 15 EUR. One disadvantage is that the elements are just 20cm wide, the oven is 35cm.

For now I'll just stick with the oven as it is and try out some insulation. But it that's not going to work then It's good to know there's something else I can try.

Sunday, November 9, 2014

Reflow Toaster Oven - Part 8 - MAX6675

Just playing around a bit with the MAX6675 chip. I noticed that the temperature jumps up and down a bit, but never bothered to look into it. So I did a bit of testing.

I did three runs of 200 samples. The first run had a 1000ms pause between each sample, the second 500ms and the third 250ms. The top graph is the raw data, the bottom one is the average of 10 samples.
In order to compensate for actual temperature fluctuations I tried to visualize the standard and average deviation over 10 samples:
Just to put these numbers into perspective: the raw sample data is in centidegrees Celsius; that's one hundredth of a degree. So an average deviation of 25 means 0.25 degree.
If I look at the average of the average deviation for each of the runs then I can note the following:
1000ms has an average average deviation of 18.5
500ms has an average average deviation of 20.8
250ms has an average average deviation of 16.6

Long story short: 500ms seems to cause the most noise, but the total amount of noise does not seem to be very significant. The sample rate does not seem to have a direct relation with noise. Good. 4 samples per second it is!


And now for something completely different: driver software.
Until now I had been using an Arduino library in order to communicate with the MAX6675. After looking at its code and the datasheet I decided to ditch it and write my own. The library I used handles everything in software; it generates the clock signal in software using digitalWrite calls and reads the dataline using digitalRead calls. Furthermore it contains quite a few delays and handles the result in floats (ew).
The MAX6675's protocol is pretty similar to SPI, and since the ATmega328/2560 has hardware for that, why not use it? All you need to do is configure the SPI hardware by setting a few values in the SPI control register (SPCR) and set the pin mode for a couple of pins. Then, when you want to read the data you pull the chip select line low and start a SPI read (by writing a value to the SPDR register). Then you wait until a flag in the SPI status register is set (SPSR) and you read the received value from the SPDR register. Repeat this to get the second byte and drive the chip select line high again to start the next sample. Then it's a matter of combining the two received bytes and processing it. Easy! Just make sure to wait at least 220 ms before pulling the CS line low again.

The result is 6 lines of setup code and 10 lines of read code. Nice.

Reflow Toaster Oven - Part 7 - Taking it up a notch

Top to bottom: clunky thermocouple in oven (181.2), thermocouple attached to pcb in oven(207.9), thermocouple in air in oven (210.1), thermocouple on back of SSR (51.8, yikes!).
I was trying to keep the heater at 300 deg C, check out how fast the temperature drops when the heater is turned off! And how long it takes for the element to heat up again. Let's have a closer look:
So what do we see here? The thermocouple registers 300+ deg C (blue line) and the Arduino turns the SSR off (red line). The temperature still rises a little bit to 301 degrees, but then after a second or two the temperature starts to drop. Two seconds after that the temperature drops below 300 and the SSR is turned back on. For the next 14 seconds, the temperature keeps dropping to 273, wow! Then it takes another 10 or so seconds until 300 deg has been reached again.
So what happened? Why does it drop so fast? I guess the main reason is the difference in temperature between the heater and the air around it. The air is almost 100 degrees C cooler than the heater. So even though the heating element has been turned off for just a few seconds, it takes quite some time compensate for the energy that has been lost.

So what do these tests tell us? I'm just guessing here, I didn't study physics or thermodynamics so my guess is as good as yours :) But I'm guessing that if we run this test for a longer period then the ratio between on/off (duty cycle) can also be used with a much shorter period (say, 1 second). So if on average the heater is turned on for 24 seconds and off for 4 seconds, then we have a duty cycle of 85% (24 out of 28 seconds on). Then my guess is that the heater can be kept at the same temperature by turning the heater on for 0.85 seconds and off for 0.15 seconds. But the result would probably be a much smoother temperature curve.

My second guess is that the duty cycle will need to be higher when the difference between the heater and the air around it is greater. So that means that in order to keep the temperature of the heater constant, the duty cycle needs to be slowly decreased as the temperature in the oven rises.

I really need to order more MAX6675's and some thermocouple connectors, being able to log only one thermocouple is annoying. I noted a few more numbers on paper during testing.
At heater=200, the air was 140 and the pcb 120.
At heater=250, the air was 170 and the pcb 150.
At heater=300, the air was 200 and the pcb 180.
After some time, the air was 205 and the pcb 190
After some more time, the air was 208 and the pcb 200
After some more time, the air was 209 and the pcb 205
Finally, the air was 210 and the pcb 208. By this time the SSR was well above 50 deg C so I turned everything off.

But as you can see, the air seems to reach a maximum temperature of about 210 deg C, and the pcb slowly catches up. The air will most likely never reach the same temperature as the heater, since it's in contact with the walls of the oven and transfers quite some of its heat to that. The PCB on the other hand is only in contact with the air (and the wire rack, but let's ignore that for now) so it will eventually reach the temperature of the air.

This brings us to the topic of insulation. If we can decrease the amount of heat that is lost, then the temperature of the air will follow that of the heater more closely. Now we can't prevent the air from heating up the walls of the oven, unless we add some sort of heat reflective coating to it (not a bad idea actually), but we can prevent the walls from transfering heat outside of the oven. By padding the walls with insulation we should be able to reduce losses quite a bit. I've ordered some thermal fiber glass insulation designed specifically for insulating commercial and industrial ovens. This stuff is different from normal glass wool that you'd use to insulate your house. Although they're both made of glass fibers, the bonding material used in normal glass wool will start to melt/burn at high temperatures. This oven rated insulation has a different type of bonding material which should be able to withstand temperatures of up to 500 degrees C. It'll be interesting to see the difference this stuff will make :)

Saturday, November 8, 2014

Reflow Toaster Oven - Part 6 - PWM Fun

MAJOR WARNING NO 1: THIS COULD KILL YOU!

No, seriously, mains voltages can kill you, keep that in mind whenever you work with it. Having the cover off doesn't make it much safer, there's plenty of exposed contacts with 230V on them. That's lethal.

So now that we've cleared that up, let's have a look at what's happening here. I've replaced the thermostat with a solid state relay. There's a thermocouple connected to the heating element and plugged in to the Arduino. The Arduino monitors the temperature and turns the relay on when it's too cold, and off when it's too warm. The target temperature can be set using the serial interface. There's a bunch of other thermocouples in and around the oven to monitor the rest.

MAJOR WARNING NO 2: SOLID STATE RELAYS REQUIRE HEATSINKS!

I know it says "25Amp" on the cover, but if you check out the datasheets for these kind of relays then you'll notice they're only rated about 4A without the heatsink. That's why I've connected a thermocouple to the bottom of the SSR, so I can monitor its temperature (heatsinks are on their way). So on the thermometer I'm monitoring the following from top to bottom:
-oven temperature (large thermal mass probe)
-oven air temperature (small probe)
-oven top temperature
-SSR temperature

So after increasing the temperature a couple of times this is the result:

The blue line is the heater temperature. The red line is the target temperature and whether the element is on (high) or off (0). As you can see, lower temperatures require less frequent heating (duh) and it overshoots the target temperature sooner than with higher target temperatures.

This was to be expected, but it's good to see it in hard numbers. Next step is to also track the air temperature and see what kind of influence that has on the required dutycycle.

And yes, the SSR runs warm, 40 deg C and rising, target temperature is 250. Air temperature was 176 and the top of the oven was nearly 70 deg C.

Wednesday, November 5, 2014

Reflow Toaster Oven - Part 5 - Crispy Thermocouples

I like my thermocouples well done...
So that little blue piece of shrink tubing(?) doesn't seem to cope well with 200+ degrees C. Oh well.
Did a bit of testing tonight. I placed the four thermocouples in and around the oven:
- one attached to the heater
- one just floating in the middle of the oven
- one stuck through one of the vent holes on the side
- one attached to the top of the oven
And then I turned the oven on :) I recorded the whole thing and manually put all temperatures at 5 second intervals into a spreadsheet. Here's the result:
At one point the thermocouple on the heater fell off, that's when I turned the oven off. The interior was about 270 degrees C by then and kept rising for a short period. Then I opened the oven's door and the air temperature plummeted.The reason these readings differ so much from earlier profiling is because of the thermocouple I used. There small ones have very little mass, so they heat up much faster than the one I used earlier.
What worries me a bit are the green and purple lines. They reach about 80 degrees C, that means the oven is way too hot to put any electronic controls inside. I hope this is reduced significantly after I insulate everything.

I also played a bit with RaceRender, it can overlay various types of data on video images.
Nice :)

Tuesday, November 4, 2014

To Measure Is To Know

Mailbag time!
I got this HT-9815 4 channel K-type digital thermometer from eBay seller PerfectPrimeUSA (which of course is located in Hong Kong). Got it for a mere $26 (including free shipping) and four (cheap) thermocouples included. And it actually seems to work fairly well! Refresh rate is about once per second, it remembers lowest and highest temperatures measured as well as average temp. It can switch between degrees Celsius, degrees Fahrenheit and Kelvin and it actually appears to be reasonable accurate. The backlight is piss-poor (one LED located on the left side) but for this kind of money I can't complain really. Just shipping it back to Hong Kong would probably cost me more than what I've paid for it :)

I'll crack it open tomorrow, see what makes this thing tick, and I'll do some measurements with the oven.

Monday, November 3, 2014

Reflow Toaster Oven - Part 4 - Controller design

Controller design

Another evening well spent :) I designed a controller for my oven. It has connectors for four thermocouples and six relays, a buzzer and an I2C interface. The mandatory ICSP and FTDI headers are present as well of course. I'll probably have to make a few adjustments and tweaks here and there, but the overall layout is okay I guess. It still lacks a 3.3V regulator and logic level converter for 3.3V I2C devices.

The board measures 59 x 42.5 mm (2.325" x 1.675"). It'll cost about $20 per board I reckon. Add a few bucks for the thermocouples, about $10 per relay, $10 for an LCD and keypad and all that's left is a power supply :)




Sunday, November 2, 2014

Reflow Toaster Oven - Part 3

Grounding issues

During the heat profiling I ran into some problems while trying to get stable results from the thermocouple. One of the problems was that the wire from the connector to the MAX6675 was way too long; over a meter. When I shortened this to 5 cm the readings were way more stable than before. Another issue arose when I put the thermocouple in the oven. When it touched any metal part of the oven then the readings would be all over the place. They'd jump about 10 degrees C up and down.

As it turns out, pretty much every metal part of the oven is grounded to mains earth. The thermocouple itself is shielded, but the shielding is electrically connected to the thermocouple. The thermocouple works by creating a really tiny voltage (in the order of microvolts) that rises when the temperature rises. The MAX6675 amplifies this voltage, reads it and performs some compensation. As you can imagine, it doesn't take much to throw off the readings completely. Connecting the thermocouple to mains earth is one of them...

I conducted a small experiment this afternoon to verify that this was in fact the issue. All I did was take a mains extension cord and touch the earth tab with the thermocouple.
I think the readings need no further explanation:

Averaging the values may make them a bit more useful; they're not completely random :)

Another thing I tested today was the temperature of the heating elements. The outside of the elements are connected to mains earth, so the readings aren't entirely accurate, but they should give a rough idea of the temperatures involved.

Yes, that's 400+ deg C before the thermostat cuts the power, yikes! Raw data can be found here. And 400+ deg looks a bit like this:
After the second time the thermostat cut the power I pulled the plug of the oven, disconnecting it's earth connection. You can see the signal immediately cleans up.

These grounding issues are annoying though. I need to have fairly fast and accurate temperature readings on the elements and oven, so I need to solve them some way or the other. I first thought about using kapton tape to electrically isolate the thermocouple from whatever it's connected to (while still maintaining thermal conductivity), but now that I've seen how hot these elements get I doubt that's going to be a good solution. Needs more research...

I need a different thermocouple, this one has too much thermal mass; it takes too much time to respond to temperature changes; the recorded temperature kept increasing even though the heating element just turned off. In this situation you want the thermocouple to have as little mass as possible so it will respond really fast to temperature changes. More eBay purchases coming up :)