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.
- 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.
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
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.
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.