-
Notifications
You must be signed in to change notification settings - Fork 55
Reflow Theory
Before we start cookin' let's take a look at the science behind reflow soldering! In order to properly reflow your PCB, the temperature must follow a certain profile which depends on if you are using leaded or lead-free solder paste. The profile will also depend on the exact composition of your solder paste, so please refer to the manufacturer's spec sheet to determine the thermal profile set points yourself. In general there are a few main solder paste categories:
- Leaded vs lead-free - Lead-free is becoming very popular with RoHS certification and this is what I use personally, and I'll be focusing on it in this tutorial
- No clean vs water wash - Please see this article for more info about the differences
- Normal vs low temperature - Low temperature solder pastes typically have a melting point of 138°C or lower and are advantageous if there are thermally-sensitive components on the PCB
Solder paste typically comes in jars (larger quantities) or syringes and you should always store the solder paste in a refrigerator unless you buy "no fridge" solder paste. This extends the lifetime of the paste and also allows the components to "stick" to the PCB better when you place the components.
In the Reflowduino Demo code there is a set of temperatures for generic lead-free solder paste and another set of values for low-temperature lead-free solder which has a much lower melting point. Since this is becoming the norm nowadays with all the red tape and RoHS, I’ll be using lead-free solder and it has worked great from my experience.
Generic lead-free solder paste reflow curve (provided by Chip Quik®):
Low temperature lead-free solder paste reflow curve:
The reflow process is typically summarized into four phases:
- Preheat - from room temperature to a soaking point (the first horizontal axis label)
- Soak - "soaking" at the preheat temperature but increasing slowly to another temperature (the third label)
- Reflow - a short period in which the temperature reaches the reflow temperature (the fourth label) and here the magic happens!
- Cooldown - the period after reflow where it cools back down to a comfortable temperature
If you want to take a look at different types of solder paste, Chip Quik® has a variety of solder pastes with datasheets for each one, including reflow curves.
The Reflowduino controls the temperature (measured by the thermocouple) to match the thermal profile by switching the toaster oven on or off with varying duration calculated by a PID algorithm. The temperature is controlled such that it reaches the set point temperature values by increasing or decreasing at the predefined rates of increase/decrease in temperature for the phases of the reflow process. For the PID control there are three gains: Proportional (P), Integral (I), and Derivative (D). I am by no means going to give a comprehensive explanation of PID control, but merely a brief overview relevant to temperature and reflow control. For more info you can google "PID control" and many results will appear!
- The Proportional gain affects the speed of the response but can lead to oscillatory or unstable behavior if set too high. Therefore it's important to choose a proportional gain that isn't too high but at the same time isn't too low, otherwise your transient response may be sluggish to reach the desired temperature.
- The Integral gain eliminates steady-state error so that in steady-state (after a long time) the thermocouple temperature will practically exactly match the desired temperature. We will use a small amount of this gain, but not too much since that could slow the response down significantly and steady-state error really much of a concern for us.
- The Derivative gain, as the name implies, uses the rate at which the temperature is changing to anticipate where the temperature is going to "end up". This is useful to speed up the transient response in some cases, and reduce overshoot. For example, if the temperature skyrockets near the desired temperature, the derivative gain will indicate that the throttle needs to be lowered so that the temperature doesn't keep climbing past the desired temperature but rather, follows a sort of asymptotic behavior.
Since toaster ovens and hot plates typically use resistive heating there will be a significant delay in the change in temperature change when the "throttle" is increased or decreased via a continuous PID control method which would update every cycle in the Arduino loop() function. This control delay or lag would make it impossible to control this way, so instead the Reflowduino will use discrete time proportioning control to control the proportion of time the relay is on or off within a certain time window.