July
2004, Issue 168
Easy
Reflow
Build
an SMT Reflow Oven Controller
HOME-BUILT
CONTROLLER
As
for building the controller, I used the Basic Micro
EVB87 Renesas evaluation board, which is fitted with
an H8/3687 microcontroller (see Figure 2). This inexpensive
microcontroller is exactly what I needed for this project.
It has a low pin count, high RAM and program memory
for using a simple high-level language like BASIC, and
on-chip ADC. The evaluation board already provides an
LCD and push buttons, so all I had to do was add two
small circuits using the prototyping area. The first
was a thermocouple interface. I used a K-type thermocouple
and an Analog Devices AD595 monolithic thermocouple
amplifier with on-board cold-junction compensation directly
connected to the H8/3687’s ADC. More than simple, isn’t
it? Lastly, I needed a way to drive an external relay
to switch the oven on and off. It took nothing more
than a BD235 transistor and a free-running diode. Of
course, you could use your favorite microcontroller
(e.g., Basic Stamp’s) for this design, but this evaluation
kit speeds up the process (see Photo 2).
|

(Click
here to enlarge)
|
Figure
2—The reflow oven controller is simple. There are
only six components in addition to the Renesas EVM87
evaluation board. |
|

(Click
here to enlarge)
|
Photo
2—The oven controller includes a Renesas evaluation
board with thermocouple and relay interfaces in
the breadboard area. |
On
the firmware side, I decided to try to the BasicATOM
programming language because this application isn’t
managing microseconds. This was easy thanks to the user-friendly
development environment provided by the board in addition
to the resident boot-loader. It took only 4 h to write
and debug the full software, even though I wasn’t able
to use the debugger for some reason.
The
application, for which the source code is available
on the Circuit Cellar ftp site, is extremely easy to
read. It is structured into two independent sections:
a configuration section and a state machine section.
The former allows you to manually modify all profile
parameters with the LCD and a couple of push buttons.
The latter manages all of the successive steps of the
thermal profile and reads the actual oven temperature
in real time. Let’s look at the details.
First,
a welcome screen is displayed. Then, a static screen
displays the current temperature in real time and allows
you to select either Configuration mode or Run mode.
In
Configuration mode, the LCD successively displays each
of the nine key profile parameters (preheating slope,
drying temperature, drying duration, heating slope,
reflow temperature, reflow duration, cooling slope,
thermal hysteresis, and differential coefficient). It
also allows you to modify the profile parameters with
the plus and minus buttons. (It’s easy to store these
values in EEPROM, but it isn’t done in the current version
of the firmware.) In Run mode, the LCD shows the current
actual and preset temperature, as well as the current
state and the remaining time to be spent in the state
(see Photo 3).
|

(Click
here to enlarge)
|
Photo
3—When it’s running, the controller shows the current
phase (“UpDry,” meaning “up to drying temperature”),
and the preset and actual temperatures, as well
as the remaining time to spend in this phase. |
Seven
steps are managed by the state machine in order to achieve
a thermal profile that’s as close as possible to the
theoretical one. The first step involves preheating.
The preset temperature is linearly increased from the
ambient temperature up to the drying temperature. Next,
the controller waits for the actual temperature to be
equal to the drying temperature. The third step involves
drying. The preset temperature stays constant during
the drying time.
Heating
follows this. Basically, the preset temperature is linearly
increased from the drying to the reflow temperature.
Then, the controller waits for the actual temperature
to be equal to the reflow temperature. Next, the preset
temperature stays constant during the reflow time. Finally,
the preset temperature moves linearly down to the initial
ambient temperature, and you open the oven door to help
the process.
In
addition to state machine management, a thermal control
loop is implemented in the software using a PD-like
algorithm. An estimated future temperature is calculated
using the actual temperature plus a multiple of the
differential of the temperature. The estimated future
temperature is compared to the preset temperature in
order to switch the heater elements on or off. This
allows you to account for the thermal latency of the
captors and heaters and to get a more stable temperature.
A small hysteresis factor is also used in the comparisons
in order to extend the life of the heater. Figure 3
shows the actual thermal profile compared to the preset
values generated by the controller.
|

(Click
here to enlarge)
|
Figure
3—The red curve is the set point defined by the
software, whereas the yellow curve shows the actual
temperature as measured inside the oven. The full
cycle takes around 10 min. |