Key to ControLeo2's success was "learning mode", where the oven would learn how much power each heating element needed to follow the reflow profile. The goal was to keep the temperature as stable as possible, avoiding surges of power that would create a hot spot - or a void of power that would produce a cold spot. The downside of this method was that it was next-to-impossible for users to create custom reflow profiles better suited to their needs.
We had a lot of requests to support custom reflow profiles, and it was clear that we needed to support this. The obvious solution was to implement a PID (Proportional-Integral-Derivative) algorithm, but PID has some shortcomings:
For all of PID's limitations, this is still the best algorithm to use. It just needed to be improved and adapted.
Controleo3 spends around an hour figuring out how well your oven was built and how well it performs:
It learns how much power is needed to maintain a steady temperature in your oven.
It measures the combination of all elements, as well as individual elements. In the example below, the elements are on only 13% of the time to maintain a steady 120°C. The bottom element needs to be on 32% of the time to maintain the same temperature. This gives Controleo3 a general impression of the overall power and insulation of your oven.
It learns how quickly your oven responds to requests for an increase in temperature.
It also measures the over-shoot. This gives Controleo3 an idea of the thermal inertia of your elements. In the reflow phase, the ability to quickly increase the temperature is very desirable. In the example below, it took 41 seconds to raise the temperature of the oven from 120°C to 150°C.
Given the high temperatures required for lead-free reflow, your oven should be well insulated.
Controleo3 times the drop in temperature from 150°C to 120°C to get an idea of how well your oven is insulated.
The results for each measurement are analyzed and the appropriate smiley-face is displayed. The oven is given an overall score to reflect how well it is able to handle high-temperature lead-free reflows!
Controleo3 uses a smart PID algorithm that uses all these data points to carefully and accurately follow the required profile. The profile is able to specify the top-bottom bias, and Controleo3 is able to adjust output power to suit.
Your oven's score is based on 3 factors. You can find the formula in function "ovenScore( )" at the bottom of this file on GitHub.
A low score in one area can help you identify where to best make improvements. This score is also used to tune PID behavior; a lower score will make the PID algorithm be more aggressive and responsive to deviations and a higher score means changes are smaller and slower. If you run the learning cycle many times, you actually want to stop after seeing the lowest score. Counterintuitive, but true!
You can connect a micro-USB cable to Controleo3 and run Arduino's Serial Monitor application on a PC to view debugging information as the reflow happens.
This number is the duty cycle needed to keep the oven at a constant 120°C. The oven in the build guide typically uses a 16% duty cycle to do this. This number is used during PID operation to provide a baseline power value to which a PID offset is added. If this number is greater than 20% consider adding additional (or larger) heating elements.
This number is the time needed to raise the temperature from 120°C to 150°C using a 80% duty cycle on all elements. It represents the oven's ability to respond to a demand for a change in temperature. This number directly affects the Kd constant in the PID equation. This metric is easily the most important, as it represents the oven's ability to accurately follow a reflow profile. The oven in this guide typically requires 45 seconds to do this. A value of a minute or more indicates that your oven will struggle to follow a profile.
Most times, if this value is high it is because of the type of heating element in the oven. Quartz elements are recommended because they respond quickly to changes in power (duty cycle). Solid resistive elements are slow to heat up and also slow to cool down.
There are a few way to work around a poor inertia score:
This number is the time the oven takes to cool from 150°C to 120°C. The oven in the guide takes around 130 seconds to do this. This number has a very minor effect on the PID calculation. A good insulation score means the oven can use less power to increase or maintain temperatures, though the downside of this is the time to cool boards after a successful reflow. The recommended cool-down rate (especially at higher temperatures) is 2°C/second so make sure the door opens sufficiently wide to allow this to happen. If your oven gets a poor insulation score, take another look at the insulation you've used. Remember to seal air gaps, especially around the door.