Hack a Toaster Oven for Reflow Soldering
by frank26080115 in Circuits > Soldering
168403 Views, 348 Favorites, 0 Comments
Hack a Toaster Oven for Reflow Soldering
![DSC07818 (Large).JPG](/proxy/?url=https://content.instructables.com/FQ1/TUPQ/GUGD44Q7/FQ1TUPQGUGD44Q7.jpg&filename=DSC07818 (Large).JPG)
![vlcsnap-2011-10-31-02h05m09s200.png](/proxy/?url=https://content.instructables.com/FWR/5R5K/GUEK9W8W/FWR5R5KGUEK9W8W.png&filename=vlcsnap-2011-10-31-02h05m09s200.png)
![finishedcloseup1.png](/proxy/?url=https://content.instructables.com/F1V/D1AO/GUBPGP9H/F1VD1AOGUBPGP9H.png&filename=finishedcloseup1.png)
![reflowprofile2.png](/proxy/?url=https://content.instructables.com/FKE/RN8Y/GU7F3EG5/FKERN8YGU7F3EG5.png&filename=reflowprofile2.png)
As I get more serious into my electronics hobby, I need to work with more SMD components. Some component packages are very difficult or impossible to solder with a traditional soldering iron. To solve this problem, I decided to hack a toaster oven to become a reflow soldering oven.
Basically, to perform reflow soldering, solder paste is placed on a printed circuit board, and the components to be soldered is placed on top of the solder paste. When the oven heats the solder paste past the melting temperature, the solder paste melts and solders the component to the circuit board.
To control the oven's temperature, I created my own reflow toaster oven controller circuit. This circuit uses an ATmega32U4 microcontroller to monitor the oven's temperature using a thermocouple and AD595AQ, and then control the oven's heating element using a solid state relay. The controller features USB logging/debugging, USB bootloading, a graphic LCD display, and 3 buttons. The firmware features tweaking for all settings, manual temperature control, manual heating element control, and automatic temperature profile control (with a nice temperature history graph display). This circuit will plug into a wall outlet, and the oven will plug into this circuit, while the solid state relay basically acts as a switch between the wall outlet and the oven's heating element. Safety is the main design objective (but some things were limited by cost), and ease of use is the second objective.
Here is a demonstration video:
Some more key features:
Included here (see bottom of this step) are all of the project files. This package contains the CadSoft EAGLE 5.11 schematic and PCB files, the PCB gerber files, the source code for the microcontroller firmware (including the bootloader), and some mechanical drawings for the heat sink and plastic shielding.
Basically, to perform reflow soldering, solder paste is placed on a printed circuit board, and the components to be soldered is placed on top of the solder paste. When the oven heats the solder paste past the melting temperature, the solder paste melts and solders the component to the circuit board.
To control the oven's temperature, I created my own reflow toaster oven controller circuit. This circuit uses an ATmega32U4 microcontroller to monitor the oven's temperature using a thermocouple and AD595AQ, and then control the oven's heating element using a solid state relay. The controller features USB logging/debugging, USB bootloading, a graphic LCD display, and 3 buttons. The firmware features tweaking for all settings, manual temperature control, manual heating element control, and automatic temperature profile control (with a nice temperature history graph display). This circuit will plug into a wall outlet, and the oven will plug into this circuit, while the solid state relay basically acts as a switch between the wall outlet and the oven's heating element. Safety is the main design objective (but some things were limited by cost), and ease of use is the second objective.
Here is a demonstration video:
Some more key features:
- The thermocouple is rated to over 500 degrees Celcius. Soldering using my solder paste requires only up to maybe 250 degrees Celcius.
- The solid state relay is used because they can provide better control than mechanical relays, and they are more reliable. Mechanical relays can wear out because of their mechanical nature, and from internal sparks that occur during switching. I plan on switching the relay at 1 Hz, so this is important.
- The relay is rated for 240V and 25A so it should work with any typical toaster oven in any part of the world. The relay is cooled with a custom made aluminum heat sink and a small cooling fan.
- Everything on this circuit is powered from the wall outlet because I'm using a tiny USB charger as a built-in AC-to-DC converter. This is good since one cable powers everything. A computer is not required to operate it.
- A plastic cover is created to protect the circuit from things touching it accidentally. I can safely handle the circuit without getting shocked.
Included here (see bottom of this step) are all of the project files. This package contains the CadSoft EAGLE 5.11 schematic and PCB files, the PCB gerber files, the source code for the microcontroller firmware (including the bootloader), and some mechanical drawings for the heat sink and plastic shielding.
Downloads
Before You Begin
![safetywarning.png](/proxy/?url=https://content.instructables.com/FM9/T97H/GU9KBNJB/FM9T97HGU9KBNJB.png&filename=safetywarning.png)
There are several videos in this Instructable. Please watch them in full screen and 720p resolution, because there will be some text that you might want to read. The text content of this Instructable will also include additional notes and links. Most images from the videos will also be uploaded into the gallery. Most images (there are over 150 images in this Instructable) are annoted and sized in such a way that they do not suffer from image compression. The pictures, text, images, and files may not match exactly due to having revisions and different versions, but I'll guarantee that the text and files are in their final versions. I usually learn something new with every one of my projects and I put the important stuff in a final thoughts page and appendix at the end.
Safety Notes
This is probably the most dangerous electronics project I've done to date, involving high voltages and fire hazards. I am not responsible for your safety, and I am not liable for any claims, damages, or other liability. Do this project at your own risk.- Do not leave anything unattended, you need to know if sparks happen or a fire starts, and either power down everything quickly or evacuate.
- Make sure you have a fire extinguisher handy.
- Make sure that you are using a wall outlet that has a fuse or circuit breaker, just in case something short circuits.
- Please use a GFCI wall outlet if you have one, this is the type of outlet that will cut power if you drop a hair dryer into a bathtub.
- Remember the rule about wires: Any extension cords must be thicker than the cord that is already used on the toaster.
- Once you use the toaster oven for soldering, you shouldn't use it for food again. Once you've put lead in this oven, your food will not be safe in the oven. Remember that lead is a slow accumulating poision, and it can cause mental diseases later.
- Work in a well ventilated area.
- Make sure you are aware of all materials that are near the toaster oven.
- The circuit I've build does not have an ON/OFF switch for a reason. It forces you to completely unplug it when you are done.
Reflow Soldering Basics
![reflowprofile2.png](/proxy/?url=https://content.instructables.com/FKE/RN8Y/GU7F3EG5/FKERN8YGU7F3EG5.png&filename=reflowprofile2.png)
![reflow_heatrisks.png](/proxy/?url=https://content.instructables.com/FI6/HVXY/GUAF34TT/FI6HVXYGUAF34TT.png&filename=reflow_heatrisks.png)
![reflowprofile1.png](/proxy/?url=https://content.instructables.com/FKS/TJ28/GU9KBNMM/FKSTJ28GU9KBNMM.png&filename=reflowprofile1.png)
![reflowprofile3.jpg](/proxy/?url=https://content.instructables.com/FXZ/4PAL/GUA8INOK/FXZ4PALGUA8INOK.jpg&filename=reflowprofile3.jpg)
To understand why I need something to precisely control the ovens temperature, you need to understand the stages of reflow soldering. See the graphs in the gallery for a general overview. This kind of graph, sometimes known as a reflow profile, is found in many datasheets so you can solder electrical components safely.
First, please realize that kitchen toaster ovens are terrible at keeping a certain temperature on their own, but it's good enough for cooking. You can't just count on using the temperature dial on the toaster.
Second, remember that heat expands materials and cold contracts materials. Heating too fast or cooling too fast can cause cracks. Uneven temperature distribution can cause things to bend or warp. You don't want things to break, and things that are bent won't solder properly due to poor contact.
Solder paste is generally a mixture of flux and microscopic balls of solder. The flux will clean the soldering surfaces when it is heated, and the balls of solder will melt and bond the surfaces.
When doing reflow soldering, you put some solder paste over the pads on the PCB. To make this easier, you can use a stencil made of a thin sheet of plastic, with holes laser-cut into it where you want solder paste (I will cover how to make and use stencils later). Place the components on the pads, then pop it in the oven and let it go through the stages.
This is why I need a controller to control the temperature of the oven automatically, going through all the stages at the right temperature, for the right time duration, and at the right heating or cooling rate.
First, please realize that kitchen toaster ovens are terrible at keeping a certain temperature on their own, but it's good enough for cooking. You can't just count on using the temperature dial on the toaster.
Second, remember that heat expands materials and cold contracts materials. Heating too fast or cooling too fast can cause cracks. Uneven temperature distribution can cause things to bend or warp. You don't want things to break, and things that are bent won't solder properly due to poor contact.
Solder paste is generally a mixture of flux and microscopic balls of solder. The flux will clean the soldering surfaces when it is heated, and the balls of solder will melt and bond the surfaces.
When doing reflow soldering, you put some solder paste over the pads on the PCB. To make this easier, you can use a stencil made of a thin sheet of plastic, with holes laser-cut into it where you want solder paste (I will cover how to make and use stencils later). Place the components on the pads, then pop it in the oven and let it go through the stages.
- The first stage is preheating to the thermal soak stage. The rate of heating needs to be controlled.
- The second stage is thermal soaking the PCB and all the components. This stage ensures even temperature distribution and activates the flux to clean the surfaces. Note that larger components take more time to heat up, especially components with shielding.
- The third stage is raising the temperature to melt the solder paste to perform the actual soldering.
- Finally everything is cooled at a controlled rate.
This is why I need a controller to control the temperature of the oven automatically, going through all the stages at the right temperature, for the right time duration, and at the right heating or cooling rate.
Circuit Design and PCB Layout
![pcbpreview.png](/proxy/?url=https://content.instructables.com/FQM/7CC8/GUCF4RE4/FQM7CC8GUCF4RE4.png&filename=pcbpreview.png)
![circuitassembly1_pcbfront.png](/proxy/?url=https://content.instructables.com/FC9/1KQN/GUCF6NE3/FC91KQNGUCF6NE3.png&filename=circuitassembly1_pcbfront.png)
![circuit.png](/proxy/?url=https://content.instructables.com/FAL/0ODL/GUCF4RDT/FAL0ODLGUCF4RDT.png&filename=circuit.png)
Please watch the video as I explain how I designed the circuit. I will point out each component, show you where it is, and explain it in detail.
The design files are all included in the project downloads, it's mostly in CadSoft EAGLE 5.11 format, but I've included images as well.
The PCB layout isn't a complicated layout. There are some things I'd like to point out:
The design files are all included in the project downloads, it's mostly in CadSoft EAGLE 5.11 format, but I've included images as well.
The PCB layout isn't a complicated layout. There are some things I'd like to point out:
- The size needs to be under 10 cm by 10 cm so I can get it made by Seeed Studio for cheap (see next step).
- There are mounting holes on each corner. Later, I will show you how to make a plastic shield for this circuit, and that shield will be mounted to these holes.
- The PCB is designed with holes that the solid state relay will screw directly into. I really wanted a design with no loose objects.
- The high power traces are super wide and also the solder mask is removed so solder can be added to increase the track's thickness, allowing for more current.
- 240V and 120V AC is VRMS, after calculating Vpeak, the recommended PCB trace spacing (according to IPC-2221) at is 2.5mm for 300V to 500V (240VRMS = 339.4Vpeak), 1.25mm for 150V to 300V (120VRMS = 169.7Vpeak). Note that this circuit is not safe over 10000 feet above sea level.
- I left a large space for the LCD. I actually have two LCD footprints on this PCB design, the other one has almost the same circuitry but uses SPI instead of I2C, and mounts directly to the PCB instead of using a flat cable. But I didn't write the code for this "other LCD".
Circuit Assembly Part 1
![circuitassembly1_withoutlcd.JPG](/proxy/?url=https://content.instructables.com/FN5/W7RL/GUBPGAC5/FN5W7RLGUBPGAC5.jpg&filename=circuitassembly1_withoutlcd.JPG)
![circuitassembly1_withlcd.JPG](/proxy/?url=https://content.instructables.com/FHY/BQBQ/GUBQLXNX/FHYBQBQGUBQLXNX.jpg&filename=circuitassembly1_withlcd.JPG)
![circuitassembly1_hvtraces.png](/proxy/?url=https://content.instructables.com/FD4/7GDW/GUBPGAC2/FD47GDWGUBPGAC2.png&filename=circuitassembly1_hvtraces.png)
![circuitassembly1_otherstuff.png](/proxy/?url=https://content.instructables.com/FC3/5S8O/GUCF6NH2/FC35S8OGUCF6NH2.png&filename=circuitassembly1_otherstuff.png)
![circuitassembly1_overview.png](/proxy/?url=https://content.instructables.com/FXW/KU7U/GUCF6NH3/FXWKU7UGUCF6NH3.png&filename=circuitassembly1_overview.png)
![pcb ac connections.png](/proxy/?url=https://content.instructables.com/FZJ/WSIY/GUCF6NH9/FZJWSIYGUCF6NH9.png&filename=pcb ac connections.png)
![pcb avr isp connections.png](/proxy/?url=https://content.instructables.com/FH9/20VS/GUBPGAC6/FH920VSGUBPGAC6.png&filename=pcb avr isp connections.png)
![pcb lcd connections.png](/proxy/?url=https://content.instructables.com/FRX/4HMX/GUCF4RFG/FRX4HMXGUCF4RFG.png&filename=pcb lcd connections.png)
![pcb other connections.png](/proxy/?url=https://content.instructables.com/F2Q/YMTO/GUCF4RFI/F2QYMTOGUCF4RFI.png&filename=pcb other connections.png)
![circuitassembly1_fluxcleaner.png](/proxy/?url=https://content.instructables.com/FIS/OX24/GUBQLXNV/FISOX24GUBQLXNV.png&filename=circuitassembly1_fluxcleaner.png)
![wire_gauge.jpg](/proxy/?url=https://content.instructables.com/FPF/WMPH/GUBPGPDX/FPFWMPHGUBPGPDX.jpg&filename=wire_gauge.jpg)
Here's a shopping list for electrical components:
Solder these components to the PCB, follow the PCB design.
To get a PCB, download the project files, and send the Gerber files to a PCB manufacture. I used Seeed Studio 's Fusion PCB Service, it'll cost you $29 for 10 pieces.
Most components are 0805 (but can be substituted with 0603), everything on the PCB can be hand soldered. Surface mount soldering is easy, as demonstrated in my video:
There are several special connections you need to make, see the diagrams in the gallery about the following:
You need to put a lot of solder onto the wide exposed AC tracks so it can handle the large amount of electrical current.
Clean the PCB using alcohol or flux cleaner. Leaving flux on the PCB might cause inaccurate readings from the AD595AQ.
The schematic has some notes on it, I hope you read them.
Qty | Sch Ref | Name | Value | Package | Rating | Notes |
---|---|---|---|---|---|---|
1 | C3 | Tantalum Capacitor | 10 uF | 1206 | 6V or Greater | |
4 | C4, C5, C6, C7 | Ceramic Capacitor | 0.1 uF | 0805 or 0603 | 6V or Greater | |
2 | C8, C9 | Ceramic Capacitor | 22 pF | 0805 or 0603 | 6V or Greater | |
1 | C10 | Aluminum Caoacitor | 47 uF or greater | 6.6mm x 6.6mm | 6V or Greater | |
1 | C11 | Tantalum Capacitor | 4.7 uF | 1206 | 6V or Greater | |
10 | C1, C2, C12 to C20 | Ceramic Capacitor | 1 uF | 0805 or 0603 | 6V or Greater | |
1 | IC1 | LM1117 | 3.3V | SOT-223 | ||
1 | JP1 | Male Header | 3x2 | 0.1" Pitch | Standard 6 Pin ISP Header for AVR | |
1 | JP2 | Screw Terminal | 2 Pins, SparkFun PRT-08084 | 3.5mm Pitch | For thermocouple | |
1 | Q1 | Crystal | 16 MHz | HC49 SMD | 20 pF, +/- 30 PPM | |
2 | R1, R2 | Chip Resistor | 22 Ω | 0805 or 0603 | 1/10 W, +/- 10% | |
4 | R3, R4, R7, R8 | Chip Resistor | 10 kΩ | 0805 or 0603 | 1/10 W, +/- 10% | |
1 | R6 | Chip Resistor | 330 Ω | 0805 or 0603 | 1/10 W, +/- 10% | |
2 | S1, S2 | Button Switch | TL3330 | |||
3 | S3, S4, S5 | Button Switch | TL6120DF | Must be super tall | ||
1 | USB | USB Mini-B Female Connector | UX60A-MB-5ST | SMD | My favorite, easy to solder, flat bottom | |
1 | LCD | LCD COG Graphic Display | NHD-C160100DiZ | 160x100 Pixel | ||
1 | LCD | FPC Connector | A100284CT, 1-1734592-4 | 14 Pos, 0,5mm Pitch, Right Angle SMD | ||
1 | U1 | AVR Microcontroller | ATMega32U4-AU | 44 TQFP | ||
1 | U2 | Thermocouple Amplifier | AD595AQ | 14 DIP | ||
1 | U2 | Chip Socket | 14 Pins | 14 DIP | ||
1 | Relay | Solid State Relay | D2425 by Crydom | 240 VAC, 25 A | ||
1 | JP2 | Thermocouple, type K | GK11M, by Test Products Int | -40 to 510 °C | ||
1 | USB Wall Charger | 120V or 240V AC to 5 V DC, 1000 mA | Used as wall AC to 5V DC converter | |||
1 | Cooling Fan | 5V DC | 40mm x 40mm, 10mm to 17mm thick | |||
1 | AC Extension Cord | 16 AWG or Thicker | 300V |
Solder these components to the PCB, follow the PCB design.
To get a PCB, download the project files, and send the Gerber files to a PCB manufacture. I used Seeed Studio 's Fusion PCB Service, it'll cost you $29 for 10 pieces.
Most components are 0805 (but can be substituted with 0603), everything on the PCB can be hand soldered. Surface mount soldering is easy, as demonstrated in my video:
There are several special connections you need to make, see the diagrams in the gallery about the following:
- You need to solder a thick extension cord to the circuit. I live in North America, so one wire is "hot" and one wire is "neutral". Your country might use a slightly different system, but if you don't mix up the wires, this circuit should also work for your country.
- As I mentioned before, a cheap USB charger is used as 5V DC power supply that converts AC power to DC power. After you hack that charger (the instructions will be in another "Instructable Step"), the diagrams show you where to make the connection.
- I used velcro to attach the LCD to the PCB. Connect the flat cable into the FPC connector. Solder the backlight wires to the connection for the backlight.
You need to put a lot of solder onto the wide exposed AC tracks so it can handle the large amount of electrical current.
Clean the PCB using alcohol or flux cleaner. Leaving flux on the PCB might cause inaccurate readings from the AD595AQ.
The schematic has some notes on it, I hope you read them.
USB Wall Charger Hack
![usbchargermod_pic1.JPG](/proxy/?url=https://content.instructables.com/FGV/D177/GUAF34X4/FGVD177GUAF34X4.jpg&filename=usbchargermod_pic1.JPG)
![usbchargermod_pic2.JPG](/proxy/?url=https://content.instructables.com/FES/9WGE/GUAF34X5/FES9WGEGUAF34X5.jpg&filename=usbchargermod_pic2.JPG)
![usbchargermod_cut1.JPG](/proxy/?url=https://content.instructables.com/FVP/4EB1/GUAM5EYF/FVP4EB1GUAM5EYF.jpg&filename=usbchargermod_cut1.JPG)
![usbchargermod_cut2.JPG](/proxy/?url=https://content.instructables.com/F1H/AMCU/GU7F3EJJ/F1HAMCUGU7F3EJJ.jpg&filename=usbchargermod_cut2.JPG)
![usbchargermod_cut3.JPG](/proxy/?url=https://content.instructables.com/F14/6ZQH/GUAF34WV/F146ZQHGUAF34WV.jpg&filename=usbchargermod_cut3.JPG)
![usbchargermod_open1.JPG](/proxy/?url=https://content.instructables.com/FB2/9HZY/GUAF34WW/FB29HZYGUAF34WW.jpg&filename=usbchargermod_open1.JPG)
![usbchargermod_open2.JPG](/proxy/?url=https://content.instructables.com/FBN/VYY4/GUAF34WX/FBNVYY4GUAF34WX.jpg&filename=usbchargermod_open2.JPG)
![usbchargermod_open3.JPG](/proxy/?url=https://content.instructables.com/FRY/DCPY/GUAF34WY/FRYDCPYGUAF34WY.jpg&filename=usbchargermod_open3.JPG)
![usbchargermod_open4.JPG](/proxy/?url=https://content.instructables.com/FIA/GM7M/GUAF34WZ/FIAGM7MGUAF34WZ.jpg&filename=usbchargermod_open4.JPG)
![usbchargermod_open6.JPG](/proxy/?url=https://content.instructables.com/FV9/53ZE/GUAF34X2/FV953ZEGUAF34X2.jpg&filename=usbchargermod_open6.JPG)
![usbchargermod_open5.JPG](/proxy/?url=https://content.instructables.com/FBC/AD47/GUAF34X0/FBCAD47GUAF34X0.jpg&filename=usbchargermod_open5.JPG)
![usbchargermod_wiring.png](/proxy/?url=https://content.instructables.com/FPC/ALN9/GUAF34X7/FPCALN9GUAF34X7.png&filename=usbchargermod_wiring.png)
![usbchargermod_wrappedup.png](/proxy/?url=https://content.instructables.com/FD7/LNTJ/GUAF34X9/FD7LNTJGUAF34X9.png&filename=usbchargermod_wrappedup.png)
Find the USB wall charger I used. It has to be small, works with 120V AC and 240V AC (so it works in both North America and other places), and supplies 5V DC at 1000mA.
Cut it open, I used a saw to cut off the two ends.
Unfolded it. Soldered two wires for the AC power input (polarity doesn't matter, so I used two black wires). Solder another two wires to the USB port where the 5V DC output and DC ground is, I used a black wire for ground and red for 5V since polarity is important here.
I suggest you use 22 gauge stranded wire for all of this. 24 gauge is acceptable. Stranded wire is flexible.
Insulate the entire device. I used electrical tape for this. A huge heat shrink tube would also be acceptable.
Connect your new wires to the appropriate locations on the controller PCB, as shown in my diagrams.
Cut it open, I used a saw to cut off the two ends.
Unfolded it. Soldered two wires for the AC power input (polarity doesn't matter, so I used two black wires). Solder another two wires to the USB port where the 5V DC output and DC ground is, I used a black wire for ground and red for 5V since polarity is important here.
I suggest you use 22 gauge stranded wire for all of this. 24 gauge is acceptable. Stranded wire is flexible.
Insulate the entire device. I used electrical tape for this. A huge heat shrink tube would also be acceptable.
Connect your new wires to the appropriate locations on the controller PCB, as shown in my diagrams.
Thermocouple Modification
![modifyandconnectthermocouple.jpg](/proxy/?url=https://content.instructables.com/FMP/Z9JU/GUAF3521/FMPZ9JUGUAF3521.jpg&filename=modifyandconnectthermocouple.jpg)
You can avoid this step if your thermocouple does not have any special connectors on the end. Try buying the K type thermocouple from Adafruit Industries (product ID 270), or SparkFun version (SEN-00251). The one I used is a GK11M from Test Products Int.
The thermocouple I used has a special plug. Nobody sells the actual socket for this plug (it's really designed for a specific hand-held device).
So I had to connect some wires to the thermocouple, and then plug the wires into the terminal block.
Remember that polarity is very important here so I used red wire for where there is a plus sign (chromel side) and black wire for the negative sign (alumel side).
Remember to use the same type of wire for both wires. If you use copper for the red wire, you must use the exact same copper for the black wire. It doesn't have to be copper but both wires must be the same material, because different metals would have a small voltage difference that will mess up the voltage readings.
Please read the appendix about how thermocouples work.
The thermocouple I used has a special plug. Nobody sells the actual socket for this plug (it's really designed for a specific hand-held device).
So I had to connect some wires to the thermocouple, and then plug the wires into the terminal block.
Remember that polarity is very important here so I used red wire for where there is a plus sign (chromel side) and black wire for the negative sign (alumel side).
Remember to use the same type of wire for both wires. If you use copper for the red wire, you must use the exact same copper for the black wire. It doesn't have to be copper but both wires must be the same material, because different metals would have a small voltage difference that will mess up the voltage readings.
Please read the appendix about how thermocouples work.
Heat Sink
![DSC07738 (Large).JPG](/proxy/?url=https://content.instructables.com/FDZ/HLF9/GUAF360B/FDZHLF9GUAF360B.jpg&filename=DSC07738 (Large).JPG)
![heatsink_drawing_preview.png](/proxy/?url=https://content.instructables.com/F5Q/LZGE/GUAF360E/F5QLZGEGUAF360E.png&filename=heatsink_drawing_preview.png)
![relay_datasheet.PNG](/proxy/?url=https://content.instructables.com/FS9/VU51/GU7F3EWF/FS9VU51GU7F3EWF.png&filename=relay_datasheet.PNG)
![relay_thermo.png](/proxy/?url=https://content.instructables.com/FK7/EMU0/GUAF360G/FK7EMU0GUAF360G.png&filename=relay_thermo.png)
![DSC07739 (Large).JPG](/proxy/?url=https://content.instructables.com/FBO/2EJK/GUAM5GBF/FBO2EJKGUAM5GBF.jpg&filename=DSC07739 (Large).JPG)
![DSC07740 (Large).JPG](/proxy/?url=https://content.instructables.com/FGL/POCG/GUAF360C/FGLPOCGGUAF360C.jpg&filename=DSC07740 (Large).JPG)
![DSC07737 (Large).JPG](/proxy/?url=https://content.instructables.com/FDT/WP5U/GUAF360A/FDTWP5UGUAF360A.jpg&filename=DSC07737 (Large).JPG)
![heatsink_compound.png](/proxy/?url=https://content.instructables.com/FYI/UJ80/GUAF360D/FYIUJ80GUAF360D.png&filename=heatsink_compound.png)
![heatsink_putenough.png](/proxy/?url=https://content.instructables.com/F4J/EVRA/GUAF360F/F4JEVRAGUAF360F.png&filename=heatsink_putenough.png)
![heatsink_testfit.png](/proxy/?url=https://content.instructables.com/FI8/GLX9/GUA8IOE3/FI8GLX9GUA8IOE3.png&filename=heatsink_testfit.png)
The manufacture for this solid state relay actually sells the appropriate heat sinks designed specifically for their relays, they are somewhat expensive. But I'm a cheapskate DIY loving university student who has access to free scrap metal at school, so I built my own heat sink.
From the datasheet, there is a graph (see in gallery) that shows what the thermal resistance of the heat sink needs to be. I'm going to use 25 degrees C as room ambient temperature, and 15A. If you look at the graph, you might think a 4 C/W heat sink is enough.
Why do I think I can make a heat sink that's suitable? This HS351 heat sink is 3 C/W:
![Crydom HS351 Crydom HS351](http://media.digikey.com/photos/Crydom%20Photos/MFG_HS351_sml.jpg)
It's just a simple tiny piece of aluminum. I think my heat sink will be just as effective, plus I have a cooling fan. The heat sink I made also makes it easy for the entire circuit to sit on a surface, unlike the small heat sink that you can buy.
During the first test, I used the relay with a 120V AC, 1300 watt toaster oven, in a basement room that's at about 18 degrees C, at maximum power output for 20 minutes. The temperature of the relay and heat sink was measured using an infrared temperature measuring gun and it never reached over 30 degrees Celcius. This shows my heat sink is sufficient.
From the datasheet, there is a graph (see in gallery) that shows what the thermal resistance of the heat sink needs to be. I'm going to use 25 degrees C as room ambient temperature, and 15A. If you look at the graph, you might think a 4 C/W heat sink is enough.
Why do I think I can make a heat sink that's suitable? This HS351 heat sink is 3 C/W:
![Crydom HS351 Crydom HS351](http://media.digikey.com/photos/Crydom%20Photos/MFG_HS351_sml.jpg)
It's just a simple tiny piece of aluminum. I think my heat sink will be just as effective, plus I have a cooling fan. The heat sink I made also makes it easy for the entire circuit to sit on a surface, unlike the small heat sink that you can buy.
During the first test, I used the relay with a 120V AC, 1300 watt toaster oven, in a basement room that's at about 18 degrees C, at maximum power output for 20 minutes. The temperature of the relay and heat sink was measured using an infrared temperature measuring gun and it never reached over 30 degrees Celcius. This shows my heat sink is sufficient.
Enough Rambling, How to Build the Heat Sink:
- Buy some sheet aluminum that you can cut, bend, and drill (or punch)
- Before continuing, please note that the cooling fan I used, I basically found in the trash, so I don't know where you can get one EXACTLY like it. Just make sure it's 40mm x 40mm square, around 15mm thick, and runs on 5V DC. The dimensions of my heatsink depends slightly on the size of the fan, so be smart about adjusting the dimensions a bit if the fan you get won't fit.
- Buy some heat sink compound, you need this stuff to conduct heat between the metals, it will fill up any microscopic gaps where heat doesn't transfer.
- Cut out the pieces of aluminum according to the mechanical drawings you've downloaded
- Drill the holes so you can attach the fan with screws (#4 or #6 machine screws)
- Drill the holes you need for the relay as well (#6 or #8 machine screws)
- Bend the aluminum sheets only after all cuts have been made and all holes have been drilled
- At this point, you should attach the cooling fan (#4 or #6 machine screws)
- You need to apply some heat sink compound between each layer before screwing them together
- Screw all the aluminum pieces together after applying the heat sink compound (#6 or #8 machine screws)
Final Circuit Assembly
![DSC07745 (Large).JPG](/proxy/?url=https://content.instructables.com/FJ2/AE1Q/GUBPGACK/FJ2AE1QGUBPGACK.jpg&filename=DSC07745 (Large).JPG)
![DSC07746 (Large).JPG](/proxy/?url=https://content.instructables.com/FHD/IGF2/GUBPGACL/FHDIGF2GUBPGACL.jpg&filename=DSC07746 (Large).JPG)
![circuitassembly1_otherstuff.png](/proxy/?url=https://content.instructables.com/FC3/5S8O/GUCF6NH2/FC35S8OGUCF6NH2.png&filename=circuitassembly1_otherstuff.png)
![usbchargermod_wrappedup.png](/proxy/?url=https://content.instructables.com/FD7/LNTJ/GUAF34X9/FD7LNTJGUAF34X9.png&filename=usbchargermod_wrappedup.png)
![pcb other connections.png](/proxy/?url=https://content.instructables.com/F2Q/YMTO/GUCF4RFI/F2QYMTOGUCF4RFI.png&filename=pcb other connections.png)
![circuitassembly1_fluxcleaner.png](/proxy/?url=https://content.instructables.com/FIS/OX24/GUBQLXNV/FISOX24GUBQLXNV.png&filename=circuitassembly1_fluxcleaner.png)
Look at the diagrams while doing the next few steps.
Now you can screw the relay into the bottom side of the PCB, the relay should have come with the screws you need already. Check the orientation of the relay, but the hole spacing is slightly different on each side so it's not really possible to screw it in backwards.
Solder the fan's wires to the PCB, watch your polarity. (I didn't have any connectors, but if you want, use a polarized Molex or JST connector for this)
Solder the modified USB charger's wires to the PCB, watch your polarity. (I didn't have any connectors, but if you want, use a polarized Molex or JST connector for this)
Use a flux cleaner to clean the flux off the PCB. I have this spray can that is absolutely magical at this job. I've discovered that the flux actually affects the thermocouple readings greatly so cleaning it is important.
Tuck away anything that is loose, and secure it. I tucked everything under the PCB and secured it down with electrical tape.
Now you can screw the relay into the bottom side of the PCB, the relay should have come with the screws you need already. Check the orientation of the relay, but the hole spacing is slightly different on each side so it's not really possible to screw it in backwards.
Solder the fan's wires to the PCB, watch your polarity. (I didn't have any connectors, but if you want, use a polarized Molex or JST connector for this)
Solder the modified USB charger's wires to the PCB, watch your polarity. (I didn't have any connectors, but if you want, use a polarized Molex or JST connector for this)
Use a flux cleaner to clean the flux off the PCB. I have this spray can that is absolutely magical at this job. I've discovered that the flux actually affects the thermocouple readings greatly so cleaning it is important.
Tuck away anything that is loose, and secure it. I tucked everything under the PCB and secured it down with electrical tape.
Programming and Using the Bootloader
![bootloader.png](/proxy/?url=https://content.instructables.com/FZ4/C7GH/GUCF6NS6/FZ4C7GHGUCF6NS6.png&filename=bootloader.png)
Please watch this video, where I show you how to compile the bootloader, how to flash the bootloader into the microcontroller, how to use the bootloader, and how to install the driver you need.
To actually do any of the things in the video, you need to have a working GNU tool chain setup. Follow some of these general AVR tutorials, which should get you started:
To actually do any of the things in the video, you need to have a working GNU tool chain setup. Follow some of these general AVR tutorials, which should get you started:
- AVR Programming Introduction - Hack a Day , there are several parts.
- AVR Tutorial, Step-by-step how to start AVRs - Ladyada
- A Quickstart Tutorial for ATMEL AVR Microcontrollers - I Make Projects
- AVR-GCC Tutorial - Scienceprog.com , a collection of tutorials about using AVRs
- AVR tutorials - AVR Freaks , a collection of tutorials about using AVRs on the AVR Freaks forums
Firmware
![firmware.png](/proxy/?url=https://content.instructables.com/FDV/KTZ4/GUCF6NTJ/FDVKTZ4GUCF6NTJ.png&filename=firmware.png)
All of the source code are included in this project's download files. They are completely commented.
The code is composed of several components:
There are some major details I need to point out here:
Refer to the previous "Instructable Step" about the bootloader to see how to compile and bootload the application code, there is even a video in there.
The code is composed of several components:
- A virtual serial port is implemented using the code provided by PJRC . If you need the drivers, go to their site.
- I wrote three functions to communicate to the LCD via I2C, then several more functions to initialize the LCD and draw stuff on the LCD. There's also a 8x5 pixel font that is stored in flash memory so I can write text easily to the LCD. (The font is generated by a custom tool I wrote, but you can also find a similar font on Newhaven Display's website)
- One file handles the behaviour of the menus, another file handles gathering temperature reading sample, another file is responsible for saving/loading data from EEPROM memory.
- The main file handles calculations for temperature control, and automatically going through the reflow soldering stages. It also handles initialization of the various AVR internal hardware like timers.
There are some major details I need to point out here:
- When you use "%d" with "printf", the argument is taken as a signed 16 bit integer even if the variable is not, so I wrote "str_from_int" to overcome this limitation. I also wrote "str_from_double" for convenience, as using "%f" doesn't offer much formatting control and "dtostrf" makes the code messy.
- The LCD, NHD-C160100DiZ, has a datasheet that says that the maximum I2C clock frequency it can use is 400 KHz. This is false, it will not respond at that frequency and will freeze the I2C bus completely. I've also tried 280 KHz and it still would not work. Finally I used 100 KHz, and it started working.
- The LCD's frame rate is ridiculously slow because of my relatively slow microcontroller (running at 8 MHz), the low I2C bus frequency (100 KHz), and the fact that a lot of font data is stored in flash memory instead of RAM.
- I'm using PWM to control the solid state relay. My reasoning is that I can control the heating element as if I was controlling the brightness of a LED. The PWM frequency has to be low, for the reasoning behind this, see the appendix.
- The PWM value used is ranged between 0 to 65535. So OCR value 0 means 0% duty cycle, OCR value 5000 means 7.6% duty cycle, OCR value 40000 means 61% duty cycle, and OCR value 65535 means 100% duty cycle.
- The AD595AQ chip outputs a square wave instead of a constant voltage, the top of the square wave is the voltage that should be read as the temperature. I'm not sure if this is intentional and a part of the AD595AQ's design (I can't figure this out from the datasheet), or if it's my fault somehow. Regardless of the reasoning, the sensor reading routines I wrote accounts for this and will sample only the top of the square waves, it also does averaging.
- The raw sensor value is ranged between 0 and 1023 because the ADC on the AVR has 10 bits of resolution. 1023 means the reading is 3.3V because the analog reference voltage is 3.3V. According to the datasheet of the AD595AQ, the output voltage for 320 degrees celcius is 3.227V (0 degree is 0.027 volts, by the way, pretty close to 0, the AD595AQ is supposed to output 10 mV per degree Celcius). From these numbers, I know that 1 degree celcius is 3.125 raw ADC reading units, and 1 raw ADC reading unit is about 0.32 degrees Celcius. These conversion calculations are hard coded into my source code. You should remember the constant of 0.32 when dealing with the log files.
- A PID controller is used to calculate the appropriate amount of power to deliver to the heating element. The user is able to edit the PID constants using the user interface.
- This PID controller is not a typical PID controller, it is assisted by using information that is already known about the toaster oven's characteristics. You are allowed to input the highest steady temperature that the oven can achieve, and how long it takes to achieve that temperature. From this information, the controller knows how to estimate the correct amount of power to deliver. The PID controller is used to tweak this estimation, which corrects for the non-linearity of the estimation.
- Note: Use the "manual PWM control" mode to measure the highest temperature you can achieve and how long it takes to achieve it. Do this by going into that mode from the menu, and turn up the PWM to max, and then save the log reading (or use a stop watch).
- There are error checking in the temperature profile and device settings. The software won't allow you to make edits that do not make sense, and if something is wrong, it'll ask you to correct it before continuing.
Refer to the previous "Instructable Step" about the bootloader to see how to compile and bootload the application code, there is even a video in there.
Plastic Shield
![DSC07724 (Large).JPG](/proxy/?url=https://content.instructables.com/FGL/1XLM/GUBQLXP1/FGL1XLMGUBQLXP1.jpg&filename=DSC07724 (Large).JPG)
![plastictop_screenshot.PNG](/proxy/?url=https://content.instructables.com/FFM/Z1VI/GUBQLXPF/FFMZ1VIGUBQLXPF.png&filename=plastictop_screenshot.PNG)
![DSC07747 (Large).JPG](/proxy/?url=https://content.instructables.com/FSD/BQ7M/GUBPGAE5/FSDBQ7MGUBPGAE5.jpg&filename=DSC07747 (Large).JPG)
![DSC07748 (Large).JPG](/proxy/?url=https://content.instructables.com/FHI/J8ZL/GUBPGAE6/FHIJ8ZLGUBPGAE6.jpg&filename=DSC07748 (Large).JPG)
![topplastic_buttons.png](/proxy/?url=https://content.instructables.com/FZ6/89VN/GUBPGAEB/FZ689VNGUBPGAEB.png&filename=topplastic_buttons.png)
![DSC07749 (Large).JPG](/proxy/?url=https://content.instructables.com/FY7/UU5J/GUCF6OGK/FY7UU5JGUCF6OGK.jpg&filename=DSC07749 (Large).JPG)
Please see the mechanical drawings in the project downloads. Cut a sheet of 2mm thick acrylic (cheaper) or polycarbonate (stronger) to the square shape and drill the appropriate holes.
Note that the picture is missing a hole that exists in the drawing. That hole is so you can access the screw terminals.
I hot glued some 0.25" long #8 machine screws to the buttons so they will stick out over the plastic shield.
Before you attach the sheet of plastic over the PCB, you need to program the AVR microcontroller first, that's actually in another "Instructable Step". When you finish that, use 1" long #4 machine screws and nuts to attach the plastic shield to the PCB. (I didn't have any stand-offs, use stand-offs if you want)
This will go over the PCB and protect it from things falling onto it, and protect your fingers from the uninsulated areas on the PCB. But if you actually tried to stick your finger under there, you can still get hurt. Keep this thing away from people who don't understand it.
This step comes after all of the software tasks, because it's not possible to use the ISP header if the plastic cover was on.
Note that the picture is missing a hole that exists in the drawing. That hole is so you can access the screw terminals.
I hot glued some 0.25" long #8 machine screws to the buttons so they will stick out over the plastic shield.
Before you attach the sheet of plastic over the PCB, you need to program the AVR microcontroller first, that's actually in another "Instructable Step". When you finish that, use 1" long #4 machine screws and nuts to attach the plastic shield to the PCB. (I didn't have any stand-offs, use stand-offs if you want)
This will go over the PCB and protect it from things falling onto it, and protect your fingers from the uninsulated areas on the PCB. But if you actually tried to stick your finger under there, you can still get hurt. Keep this thing away from people who don't understand it.
This step comes after all of the software tasks, because it's not possible to use the ISP header if the plastic cover was on.
Toaster Oven Modification
![oven_frontview.JPG](/proxy/?url=https://content.instructables.com/FZ7/3HZA/GUAF3549/FZ73HZAGUAF3549.jpg&filename=oven_frontview.JPG)
![oven_backview.JPG](/proxy/?url=https://content.instructables.com/FKQ/5ZIW/GUAF3547/FKQ5ZIWGUAF3547.jpg&filename=oven_backview.JPG)
![oven_bottomview.JPG](/proxy/?url=https://content.instructables.com/FFZ/MTCU/GUAF3548/FFZMTCUGUAF3548.jpg&filename=oven_bottomview.JPG)
![ovendetail_justopened.JPG](/proxy/?url=https://content.instructables.com/FO2/CDG4/GUAF354K/FO2CDG4GUAF354K.jpg&filename=ovendetail_justopened.JPG)
![ovendetail_othersideblackwire.png](/proxy/?url=https://content.instructables.com/F3Y/0FVM/GUAF354S/F3Y0FVMGUAF354S.png&filename=ovendetail_othersideblackwire.png)
![ovenwiring_before.png](/proxy/?url=https://content.instructables.com/FC4/66OR/GUAF354W/FC466ORGUAF354W.png&filename=ovenwiring_before.png)
![ovenwiring_after.png](/proxy/?url=https://content.instructables.com/FZ3/AOZ0/GUAF354U/FZ3AOZ0GUAF354U.png&filename=ovenwiring_after.png)
![ovendetail_disconnect.JPG](/proxy/?url=https://content.instructables.com/FG7/ZDO0/GUAF354C/FG7ZDO0GUAF354C.jpg&filename=ovendetail_disconnect.JPG)
![ovenwire_customconnector.png](/proxy/?url=https://content.instructables.com/FL3/B7TS/GUAF354Z/FL3B7TSGUAF354Z.png&filename=ovenwire_customconnector.png)
![ovenwire_customconnectormounted.jpg](/proxy/?url=https://content.instructables.com/FHU/URKP/GUAF354T/FHUURKPGUAF354T.jpg&filename=ovenwire_customconnectormounted.jpg)
You need to modify a toaster oven. The goal of the modification is to connect the top and bottom heating elements directly to the AC power cord, instead of the toaster oven's own control dials. Please watch this video presentation where I show you how to perform this modification in a safe manner.
To summarize my steps:
I want to repeat my safetly notes:
Further performance enhancing modifications were made after testing, which are discussed later.
To summarize my steps:
- Disassemble the toaster oven, and clean out the food crumbs if it's used
- Find the wires for the heating elements and the AC power cord, and disconnect them from the dials
- Connect the heating elements directly to the AC power cord. Do this in a safe manner using safe materials.
I want to repeat my safetly notes:
- My oven is a 1300 watt oven, and its AC power cord uses 16 gauge wire. Your extension cord must be 16 gauge or thicker to safely handle the same amount of electrical current.
- The wires used inside have a heat resistant insulation so they will not melt if they touch the hot oven enclosure. If you use any plastic insulation, the insulation may melt or burn, and cause a short circuit. You can't use electrical tape for the same reason.
- Solder cannot be used inside because it will get very hot
- Things are mounted securely so they don't touch the hot oven enclosure
Further performance enhancing modifications were made after testing, which are discussed later.
Menu Usage
![DSC03973 (Large).JPG](/proxy/?url=https://content.instructables.com/F4S/4UD0/GUBPGANR/F4S4UD0GUBPGANR.jpg&filename=DSC03973 (Large).JPG)
![menu_zoomedin.png](/proxy/?url=https://content.instructables.com/FR2/CSJ0/GUCF4TXC/FR2CSJ0GUCF4TXC.png&filename=menu_zoomedin.png)
Watch this video where I show you how to use the menu (warning: kind of boring)
There are three buttons, the top button is used as "select" or "add", the middle button is used as "next menu item" or "exit current mode", the bottom button is used as "subtract".
The main menu offers 4 options:
The screen refresh rate is slow, keep that in mind, you might need to hold down the button for a second before it responds.
There are three buttons, the top button is used as "select" or "add", the middle button is used as "next menu item" or "exit current mode", the bottom button is used as "subtract".
The main menu offers 4 options:
- "auto mode" is for automatically going through a reflow soldering process
- "manual temperature control" is used to keep the oven at a steady temperature
- "manual PWM control" is used to deliver a steady amount of power to the heating element
- "edit settings" is where you can adjust the PID constants, the oven's maximum temperature and the time it takes to achieve the maximum temperature
- While in "auto mode", you can set the characteristics of the temperature profile, and then press "select" while on the "start" menu item to start. Press the "exit current mode" button" to stop the cycle. Once started, you'll see the current temperature, target temperature, current stage, and a temperature history graph being drawn on the LCD.
The screen refresh rate is slow, keep that in mind, you might need to hold down the button for a second before it responds.
Testing, Tuning, Logging
![test.PNG](/proxy/?url=https://content.instructables.com/F9L/SPX8/GUCF6OVS/F9LSPX8GUCF6OVS.png&filename=test.PNG)
![DSC03972 (Large).JPG](/proxy/?url=https://content.instructables.com/FME/79LX/GUBQLXYD/FME79LXGUBQLXYD.jpg&filename=DSC03972 (Large).JPG)
![DSC03976 (Large).JPG](/proxy/?url=https://content.instructables.com/F2G/4YHQ/GUCF6PAL/F2G4YHQGUCF6PAL.jpg&filename=DSC03976 (Large).JPG)
![testreflow_beforeafter.jpg](/proxy/?url=https://content.instructables.com/FCZ/ZS2S/GUBPGBVI/FCZZS2SGUBPGBVI.jpg&filename=testreflow_beforeafter.jpg)
![testreflow_lcd.JPG](/proxy/?url=https://content.instructables.com/FTJ/6ZZ9/GUDENONR/FTJ6ZZ9GUDENONR.jpg&filename=testreflow_lcd.JPG)
![testreflow_inside.JPG](/proxy/?url=https://content.instructables.com/FQP/YPSU/GUBPGBVJ/FQPYPSUGUBPGBVJ.jpg&filename=testreflow_inside.JPG)
![testreflow_data.PNG](/proxy/?url=https://content.instructables.com/FB7/I73T/GUCF4WPH/FB7I73TGUCF4WPH.png&filename=testreflow_data.PNG)
In the following video, I show you how I test my circuit, how to log the temperature data during the testing, and how to use this data to configure the settings.
To Summarize:
From this serial port, data is sent in comma-seperated-value format. You can use a serial terminal to log this data into a .csv file and then open it in a spreadsheet program. Remember that raw ADC readings must be multiplied by 0.32 to convert it to degrees Celcius, and PWM OCR values are between 0 and 65535.
In "manual temperature control" mode, the text you see will look like
1, 234, 567, 559,
2, 237, 567, 564,
3, 232, 567, 536,
4, 235, 567, 524,
The format is
time in seconds, raw ADC reading, target ADC reading, PWM OCR value
In "manual PWM control" mode, the text you see will look like
1, 567, 559,
2, 567, 564,
3, 567, 536,
4, 567, 524,
The format is
time in seconds, raw adc reading, PWM OCR value,
Note: Use this mode to measure the highest temperature you can achieve and how long it takes to achieve it.
In "auto" mode, the text you see will look like
0, 1, 567, 559, 524,
0, 2, 567, 564, 559,
1, 3, 524, 559, 559,
1, 4, 567, 524, 564,
1, 5, 564, 559, 559,
1, 6, 567, 564, 524,
2, 7, 567, 559, 559,
2, 8, 567, 559, 564,
2, 9, 564, 559, 559,
3, 10, 567, 559, 559,
3, 11, 564, 559, 564,
The format is
stage number, total time in seconds, raw ADC reading, target raw ADC reading, PWM OCR value,
time doesn't reset if the stage changes
If the temperature tends to rise too fast, then lower the P constant. If the temperature doesn't rise fast enough, then raise the P constant.
Adjusting the I and D constant will affect overshooting or oscillating behaviour. This takes experimentation.
If all else fails, try to just turn up the P constant up really high and set I and D to 0, this will effectively stop the software from using PWM and just turn on the relay if the measured temperature is below the desired temperature.
To Summarize:
- Power up the circuit, the firmware should run.
- Plug in the modified toaster oven. Insert the thermocouple inside the toaster oven. I tied a knot to secure it in such a way that it doesn't contact the metal inside.
- Connect to your computer via a USB cable. It should show up as a virtual serial port. Install the driver if you need to.
- Use the menu to run "manual PWM control". Set the power output to maximum by setting the PWM duty cycle to maximum.
- Turn it off when the temperature does not increase any more.
- Use a serial termial to watch the log file. Save the log and open it up it a spreadsheet application like Excel.
- Calculate the maximum temperature that was reached and calculate how long it took to reach it. The raw sensor values needs to be multiplied by 0.32 to be converted into degrees Celcius.
- Use the "edit settings" submenu to adjust the values.
Notes I Made During First Test
- You might have noticed that I placed the oven on top of a sheet of wood. This is safe, as most kitchen counters are made of laminated wood.
- The maximum temperature reached greatly varies with the distance to the heating elements, as does the time it takes to reach that temperature. This is obviously expected but not to the extent I witnessed, 2 inches meant a difference of 100 degrees. I wish I had a thermal imaging camera to visualize this. So don't worry if the data in the video showed the temperature rising too slow, I can just move the thermocouple up to speed it up.
- Due to the above observation, I plan on using ceramic tiles to raise my PCBs up a bit while performing the actual reflow soldering. Ceramic or bricks can handle the high temperatures without problems. A steel solution can also be considered. Do not try to use wood for this.
- I measured the temperature of the relay and heat sink during operation and they never reached over 25 degrees during the entire duration of the test (120V AC, 1300 watts, 20 minutes on full power, inside a cold 18 degree basement room). I think this means the heat sink is effective.
- The constant pulses to the heating elements caused the fluorescent lighting in my basement to dim and brighten repeatedly. I'll also note that I've very happy with how effective the PWM control is at controlling the power output.
- The temperature readings are accurate and stable while temperature is increasing, but it is sometimes buggy and noisy while the temperature is decreasing. The majority of the reflow soldering process involves raising the temperature so this isn't a major concern. It must have something to do with how thermocouples work.
- The thermocouple's insulation does indeed handle the extreme temperature inside, but it did become darker. It is supposed to be rated to 510 degrees C, I think it lives up to that.
- Oven thermometers heat up slower but stays hot for longer. The reading from the thermocouple is pretty much instant.
Data Format
From this serial port, data is sent in comma-seperated-value format. You can use a serial terminal to log this data into a .csv file and then open it in a spreadsheet program. Remember that raw ADC readings must be multiplied by 0.32 to convert it to degrees Celcius, and PWM OCR values are between 0 and 65535.
In "manual temperature control" mode, the text you see will look like
1, 234, 567, 559,
2, 237, 567, 564,
3, 232, 567, 536,
4, 235, 567, 524,
The format is
time in seconds, raw ADC reading, target ADC reading, PWM OCR value
In "manual PWM control" mode, the text you see will look like
1, 567, 559,
2, 567, 564,
3, 567, 536,
4, 567, 524,
The format is
time in seconds, raw adc reading, PWM OCR value,
Note: Use this mode to measure the highest temperature you can achieve and how long it takes to achieve it.
In "auto" mode, the text you see will look like
0, 1, 567, 559, 524,
0, 2, 567, 564, 559,
1, 3, 524, 559, 559,
1, 4, 567, 524, 564,
1, 5, 564, 559, 559,
1, 6, 567, 564, 524,
2, 7, 567, 559, 559,
2, 8, 567, 559, 564,
2, 9, 564, 559, 559,
3, 10, 567, 559, 559,
3, 11, 564, 559, 564,
The format is
stage number, total time in seconds, raw ADC reading, target raw ADC reading, PWM OCR value,
time doesn't reset if the stage changes
Tweaking
Run through the auto mode a few times to test it, remember to save the log data to help you. If it doesn't keep the temperature steady or heat/cool at an unsteady rate, then adjust the PID constants from the "edit settings" submenu.If the temperature tends to rise too fast, then lower the P constant. If the temperature doesn't rise fast enough, then raise the P constant.
Adjusting the I and D constant will affect overshooting or oscillating behaviour. This takes experimentation.
If all else fails, try to just turn up the P constant up really high and set I and D to 0, this will effectively stop the software from using PWM and just turn on the relay if the measured temperature is below the desired temperature.
Test Run
After tuning and performance optimization, you should run the "auto mode" reflow cycle just to see what the temperature curve looks like. I did this with a junk PCB populated with a single resistor just as a test. In the pictures, you can see I didn't do the cleanest job because I applied the paste with the syringe tip directly without a stencil. But the solder did melt and the component is soldered in place perfectly.Performance Improvements
![performance_brickinoven.png](/proxy/?url=https://content.instructables.com/FS5/7K9V/GUA8INLW/FS57K9VGUA8INLW.png&filename=performance_brickinoven.png)
![performance_wrapbrickinfoil.png](/proxy/?url=https://content.instructables.com/FI8/X30Q/GUAF34OD/FI8X30QGUAF34OD.png&filename=performance_wrapbrickinfoil.png)
![performance_sealoven.png](/proxy/?url=https://content.instructables.com/FMO/02EM/GUAF34PH/FMO02EMGUAF34PH.png&filename=performance_sealoven.png)
![performance_shielddoor.png](/proxy/?url=https://content.instructables.com/F89/ZHU6/GUAF34QX/F89ZHU6GUAF34QX.png&filename=performance_shielddoor.png)
![performance_fiberglass.png](/proxy/?url=https://content.instructables.com/FYR/PSCQ/GU7F3EDA/FYRPSCQGU7F3EDA.png&filename=performance_fiberglass.png)
The very first test showed that the temperature reached 225 degrees Celcius in 520 seconds, and 260 degrees Celcius in 900 seconds. This is a little too slow.
I then raised the rack about 1.5" closer to the top heating element, and sealed most of the holes and tiny seams inside the oven using aluminium tape. This isn't the smartest idea since I had no idea what temperature the adhesive can withstand, but it seems to be OK.
After these changes, the temperature reached 225 degrees Celcius in 360 seconds, and 260 degrees Celcius in 570 seconds.
Then I applied a layer of aluminium tape to the front glass door, covering the bottom 2/3 of the glass door. I then performed another test: 225 degrees Celcius in 320 seconds, and 275 in 560 seconds.
This is just fast enough for reflow soldering according to the temperature timeline that I am following, but more improvements would need to be made.
I stuffed the inside of the oven with a layer of pink fiberglass insulation. This stuff is not electrically conductive and can handle a temperature of 500 degrees Celcius. It is safe for use in my situation.
I also found a large brick to place in the oven. The purpose of the brick is to occupy volume so there is less air inside the oven to heat. The brick is covered with aluminium foil to stop it from absorbing heat too fast. This brick actually did not get very hot, it is actually cooler than the surface of the glass door. It does its job exactly as I expected it to.
I am very happy with the final results: 225 degrees Celcius in 300 seconds, and 275 degrees in 540 seconds. I can reach the end of the "soak" stage in just 3.5 minutes.
I then raised the rack about 1.5" closer to the top heating element, and sealed most of the holes and tiny seams inside the oven using aluminium tape. This isn't the smartest idea since I had no idea what temperature the adhesive can withstand, but it seems to be OK.
After these changes, the temperature reached 225 degrees Celcius in 360 seconds, and 260 degrees Celcius in 570 seconds.
Then I applied a layer of aluminium tape to the front glass door, covering the bottom 2/3 of the glass door. I then performed another test: 225 degrees Celcius in 320 seconds, and 275 in 560 seconds.
This is just fast enough for reflow soldering according to the temperature timeline that I am following, but more improvements would need to be made.
I stuffed the inside of the oven with a layer of pink fiberglass insulation. This stuff is not electrically conductive and can handle a temperature of 500 degrees Celcius. It is safe for use in my situation.
I also found a large brick to place in the oven. The purpose of the brick is to occupy volume so there is less air inside the oven to heat. The brick is covered with aluminium foil to stop it from absorbing heat too fast. This brick actually did not get very hot, it is actually cooler than the surface of the glass door. It does its job exactly as I expected it to.
I am very happy with the final results: 225 degrees Celcius in 300 seconds, and 275 degrees in 540 seconds. I can reach the end of the "soak" stage in just 3.5 minutes.
Solder Paste Stencil
![prepstencil_newstencil.png](/proxy/?url=https://content.instructables.com/FN7/284A/GUDENOOU/FN7284AGUDENOOU.png&filename=prepstencil_newstencil.png)
Here is a video showing you how to generate a Gerber file that you can use to create a solder paste stencil using CadSoft EAGLE 5.11
To Summarize:
To Summarize:
- Open up your PCB drawing in Eagle. The solder paste layer is the "tCream" and "bCream" layers, for the top and bottom. Enable these layers to look at them. This is where solder paste will be placed, and where the holes will be cut into your stencil.
- I recommend you print out those layers with 1:1 scale on paper, so you can check that the footprints will match your components.
- Open up the CAM processor, set it to generate for only the tCream layer (or bCream) and the dimension layer. Make sure it's generating a Gerber RS274X file. "Pos coord" and "optimize" should be enabled. The file extension should be ".gtp" for Gerber Top Paste. Run the job.
- You can double check the file you generated in a Gerber file viewer. Once you are happy, send it to somebody with a laser cutter, who will use the file to cut your stencil.
- You can place multiple designs together by cloning your design in Eagle. Do this if you want to make two or more stencils per sheet of plastic.
- If your board is a single sided design, you only need one file. If you have a double sided design, you need one for each layer.
- According to SparkFun, 4 mil thick stencils are good for 0805 or 1206 sized components and 3 mil thick stencils are good for finer pitched components. The thickness of the stencils determines the thickness of the solder paste that is applied.
- If you don't want to spend the money on a stencil, you can also carefully manually apply the solder paste to your PCB using a toothpick, or buy the paste in a syringe.
- Pololu, they sell robot parts but can also do laser cutting for you, they can make Mylar stencils for you
- Ohararp, they make Kapton stencils using a laser cutter
- QuickStencil, they sell complete reflow soldering kits with custom laser-cut steel stencils, expensive
- large copper planes will dissipate heat fast, when a pad is on a plane, it usually uses "thermals" to lower the heat transfer between the pad and the plane.
- The area that the paste covers is usually as big as the pad. But for chips with a exposed bottom pad, only about one quarter of the center pad should be covered with paste.
- Having a solder stop mask is the best way of preventing solder bridges between pins.
- You can pre-bridge solder jumpers by putting solder paste over it before reflowing. This is useful if you use stencils to "mass produce" with a default jumper setting.
Performing Reflow Soldering
![paste1.JPG](/proxy/?url=https://content.instructables.com/F23/BKMB/GUD895C2/F23BKMBGUD895C2.jpg&filename=paste1.JPG)
![paste2.JPG](/proxy/?url=https://content.instructables.com/FWZ/AR3L/GUCF4WPV/FWZAR3LGUCF4WPV.jpg&filename=paste2.JPG)
![paste_tools.JPG](/proxy/?url=https://content.instructables.com/F32/NA3K/GUD895C3/F32NA3KGUD895C3.jpg&filename=paste_tools.JPG)
![prepstencil_tapedown.png](/proxy/?url=https://content.instructables.com/FCQ/L3V0/GUBPGBVW/FCQL3V0GUBPGBVW.png&filename=prepstencil_tapedown.png)
![prepstencil_focus.png](/proxy/?url=https://content.instructables.com/F3H/U7ST/GUDENOOL/F3HU7STGUDENOOL.png&filename=prepstencil_focus.png)
![twopasses.png](/proxy/?url=https://content.instructables.com/FDQ/JV63/GUBPGBWE/FDQJV63GUBPGBWE.png&filename=twopasses.png)
![vlcsnap-2011-10-31-02h05m09s200.png](/proxy/?url=https://content.instructables.com/FWR/5R5K/GUEK9W8W/FWR5R5KGUEK9W8W.png&filename=vlcsnap-2011-10-31-02h05m09s200.png)
![removestencil_placecomponent.png](/proxy/?url=https://content.instructables.com/F9D/9NE6/GUCF4WPT/F9D9NE6GUCF4WPT.png&filename=removestencil_placecomponent.png)
![vlcsnap-2011-10-31-02h06m45s203.png](/proxy/?url=https://content.instructables.com/FNE/C0S1/GUEK9W8B/FNEC0S1GUEK9W8B.png&filename=vlcsnap-2011-10-31-02h06m45s203.png)
![finishedcloseup1.png](/proxy/?url=https://content.instructables.com/F1V/D1AO/GUBPGP9H/F1VD1AOGUBPGP9H.png&filename=finishedcloseup1.png)
![finishedcloseup2.png](/proxy/?url=https://content.instructables.com/FSV/NPPQ/GUFXAM6C/FSVNPPQGUFXAM6C.png&filename=finishedcloseup2.png)
Watch the following video presentation, where I show you how to perform reflow soldering:
Here are some other tutorials from other websites: Shopping:
Summary of Steps:
If you notice that the cooling is too slow, you can open the door just a bit, while watching the LCD display so you don't cool too fast.
After it's finished, take it out of the oven and your circuit should be all soldered.
You need to clean your PCB using alcohol or flux cleaner, unless you are using "no clean" solder paste.
Here are some other tutorials from other websites: Shopping:
- Purchase some solder paste, I got some leaded paste from Deal Extreme. SparkFun sells them too (TOL-10448). I also got a syringe tube of Chip Quik solder paste.
- Keep the paste sealed and cool, I put it in a zip lock bag and then in my fridge. This stuff is kind of expensive.
- Tweezers are a must, also get one of these suction component placement tools (see picture in gallery). I got mine from eBay.
Summary of Steps:
- Secure your PCB to a surface first. Do this by surrounding it with other PCBs that are the same thickness so the entire surface is still flat. Use some tape to do this.
- Then secure your stencil over the PCB, making sure everything is aligned. Tape it down.
- Apply the solder paste using a squeegee (credit cards work for this if you are a cheapskate like me). Pass over it twice, the first time should be soft to make sure that the paste covers everything, the second time should be hard to scrape off the extra paste.
- Save the extra paste, put it back in the container. Clean the stencil later using rubbing alcohol and paper towel. Don't take too long as alcohol can cause some plastics to warp out of shape.
- Remove the stencil carefully. Inspect the paste job.
- Place the components onto the paste using your tweezers or that special suction pen tool thing.
- Put the PCB into the oven. Stick the thermocouple into the oven as close to the PCB as possible (don't let the thermocouple touch anything conductive). Run "auto mode". The default settings I put in are shown in the reflow profile graph I've shown in the gallery.
If you notice that the cooling is too slow, you can open the door just a bit, while watching the LCD display so you don't cool too fast.
After it's finished, take it out of the oven and your circuit should be all soldered.
You need to clean your PCB using alcohol or flux cleaner, unless you are using "no clean" solder paste.
Potential Problems:
- Large components might not be soldered well due to their huge heat capacity. If you have a large component that didn't reach the right temperature, make a note so you increase the thermal soak time for the next attempt.
- If you get solder bridges, you should use a de-soldering wick to remove the bridge. Try using less solder paste next time, or use a thinner stencil.
- Solder paste not melted? The temperature didn't reach the melting point at that location. Do a few adjustments to the settings and do a few tests to make sure the solder will melt.
- If you have melted solder but the component didn't really make a joint, consider adding more solder and flux. The temperature might be too low. The component might also be dirty. Also, remember that if the component doesn't sit flat or is warped, it can't be soldered well.
- If you see too many little balls of solder that are just sitting around, you might be pre-heating for too long or your solder paste has gone bad. This is sometimes caused by the lack of flux, or the pre-heating period dried out all the flux for too long.
- If your solder paste is dried out, buy some liquid flux and stir it in.
Final Thoughts
The AD595AQ chip is a old chip and it costs $20 each. Newer designs should use a newer and cheaper alternative. Example: MAX31855 or MAX6675
I did find some other relays with similar ratings but the only way they can achieve those ratings is by using a heat sink or with a cooling fan. So I decided the "puck" shaped relay is a great idea since it makes it easy to mount.
A full enclosure would have been the best idea. The plastic shield offers enough protection for me to handle my circuit, but I am still able to be shocked if I tried to stick my finger underneath the plastic.
For the toaster oven I chose, I have to raise the PCB closer to the heating element. See my test results from before. I did this using ceramic tiles or a brick. This lowers the amount of air that needs to be heated as well, which should speed up the rate of heating (adding same amount of energy into less volume). However, solids have more heat capacity than air, which should actually slow down the rate of heating as (it takes in more energy). But since it'll take more time for the solid to suck the energy out of the air, the final effect should still be that it makes the air get hotter faster.
This project can easily be ported to the ATMega328P, which is important if you really want to use an Arduino. Please note that my circuit is running on 3.3V, and although a 16 MHz crystal is used, it's actually running at 8 MHz. I might design an "Arduino Shield" version of my circuit later.
I have seen similar projects using mechanical relays that simply turn on and off the heating element, with the slow reaction time of the heating element, this apparently works well enough.
I am capable of building my own AC to DC converter circuit, but I just don't feel like it's worth the effort for this project. I would have had to squeeze it in the PCB design as well.
The heat sink is not grounded. I did not find any reliable documents that indicates that it is safe to ground the heat sink. It probably is safe to ground it, but you might not be using a grounded extension cord. My toaster oven isn't grounded.
Arduino Leonardo's bootloader (currently in beta as the date of this page) should also work, but I don't want to rewrite a lot of instructions.
This Instructable has so many videos because I'm experimenting with different methods of presentation. I've used computer screen capture, panning around in CadSoft EAGLE with both the schematic and PCB side-by-side, 720p video recordings with my new smartphone, slide shows, and fooled around with video editing a lot. I like using videos to get my thoughts out in the order I want to present in, and then providing a text and picture summary, which I can use to fill in gaps that the videos did not cover.
I did find some other relays with similar ratings but the only way they can achieve those ratings is by using a heat sink or with a cooling fan. So I decided the "puck" shaped relay is a great idea since it makes it easy to mount.
A full enclosure would have been the best idea. The plastic shield offers enough protection for me to handle my circuit, but I am still able to be shocked if I tried to stick my finger underneath the plastic.
For the toaster oven I chose, I have to raise the PCB closer to the heating element. See my test results from before. I did this using ceramic tiles or a brick. This lowers the amount of air that needs to be heated as well, which should speed up the rate of heating (adding same amount of energy into less volume). However, solids have more heat capacity than air, which should actually slow down the rate of heating as (it takes in more energy). But since it'll take more time for the solid to suck the energy out of the air, the final effect should still be that it makes the air get hotter faster.
This project can easily be ported to the ATMega328P, which is important if you really want to use an Arduino. Please note that my circuit is running on 3.3V, and although a 16 MHz crystal is used, it's actually running at 8 MHz. I might design an "Arduino Shield" version of my circuit later.
I have seen similar projects using mechanical relays that simply turn on and off the heating element, with the slow reaction time of the heating element, this apparently works well enough.
I am capable of building my own AC to DC converter circuit, but I just don't feel like it's worth the effort for this project. I would have had to squeeze it in the PCB design as well.
The heat sink is not grounded. I did not find any reliable documents that indicates that it is safe to ground the heat sink. It probably is safe to ground it, but you might not be using a grounded extension cord. My toaster oven isn't grounded.
Arduino Leonardo's bootloader (currently in beta as the date of this page) should also work, but I don't want to rewrite a lot of instructions.
This Instructable has so many videos because I'm experimenting with different methods of presentation. I've used computer screen capture, panning around in CadSoft EAGLE with both the schematic and PCB side-by-side, 720p video recordings with my new smartphone, slide shows, and fooled around with video editing a lot. I like using videos to get my thoughts out in the order I want to present in, and then providing a text and picture summary, which I can use to fill in gaps that the videos did not cover.
Appendix
![zerocross.png](/proxy/?url=https://content.instructables.com/F06/YC3G/GUA8INMQ/F06YC3GGUA8INMQ.png&filename=zerocross.png)
![ac_pwm_lf.png](/proxy/?url=https://content.instructables.com/F5I/EU6H/GUA8INMY/F5IEU6HGUA8INMY.png&filename=ac_pwm_lf.png)
![ac_pwm_mf.png](/proxy/?url=https://content.instructables.com/FDR/ZLAZ/GUAF34RF/FDRZLAZGUAF34RF.png&filename=ac_pwm_mf.png)
![ac_pwm_hf.png](/proxy/?url=https://content.instructables.com/FL1/3BPA/GUAF34RH/FL13BPAGUAF34RH.png&filename=ac_pwm_hf.png)
PWM Frequency and the Solid State Relay
The solid state relay is built using a TRIAC (or something similar, like two thyristors) because it needs to handle large alternating currents. Remember that we are trying to put 120V AC at 60 Hz (these numbers are North American) through this relay.Wikipedia on thyristors http://en.wikipedia.org/wiki/Thyristors
omega.com: Solid State Relays (pdf)
Once you trigger a thyristor, it starts to conduct, but it will not stop conducting until the voltage reaches zero.
This also means if you tried to power the heating element with a DC power source, once the relay has been triggered, it will stay on forever. So do not attempt to use a DC power source. (Also, if you did use DC, you would probably fry the USB charger).
The fact that thyristors won't stop conducting will make high frequency PWM ineffective as the PWM duty cycle won't correlate to the power delivered to the heating element. When a pulse from the PWM output ends, it doesn't mean the AC current is turned off.
If a low PWM frequency is used, then you have more control over how much power is being delivered. If the PWM frequency is 1 Hz, PWM duty cycle at 50%, and the AC power is 60 Hz, then you are basically saying "I want to let about 30 out of 60 oscillations through per second". The relay will try to turn it self off 60 times per seconds at regular intervals, unless you keep the input signal high.
The gallery includes a few diagrams that illustrates what I'm saying in terms of voltages and waveforms.
The Crydom solid state relay is actually more complicated because it has special zero-cross triggering. This means the relay will conduct immediantly after the voltage is zero (instead of at any time) and turn off immediantly when the voltage is zero again if the trigger is removed. What I am saying still applies. The output waveform will always start at 0V and end at 0V, which is good for equipment that doesn't like being turned on too fast.
There are special solid state relays that can control the output waveform according to a linear input (and thus, filtered high frequency PWM can be used). But these cost more, and the heating element doesn't react fast enough for this to be useful anyways.
How Thermocouples Work
Wikipedia about thermocouples http://en.wikipedia.org/wiki/ThermocoupleMaxim application note 4026 http://www.maxim-ic.com/app-notes/index.mvp/id/4026
I used a K type thermocouple, with the AD595AQ thermocouple amplifier chip. The K type thermocouple is made of a junction between chromel and alumel, where a small voltage is generated proportional to the temperature difference at the junction. The AD595AQ is designed to amplify the small voltage between the chromel and alumel to a voltage that is 10 mV per degrees Celcius. The AD595AQ features "cold junction compensation", which basically it means it can use room temperature as the reference voltage.
Remember how I said you must use the same metal for the wire that connects the thermocouple to the terminal block? For example, using copper, the voltage beween the alumel and copper would be cancelled out by the voltage between the chromel and copper, while the left over voltage would be proportional to the temperature. As another example, if you used copper connected to the chromel and steel to connect the alumel end, then your final voltage reading would be the voltage between the alumel and chromel plus the voltage beween the copper and steel, which is not accurate.