4) Program 1 and 2: This is the most capable mode of the
software, permitting the controller to follow a time/
temperature profile with up to 10 steps. Each step is
programmable by the user and both the setting and the
actual temperatures are displayed in real time. The
software comes with a built-in profile similar to the Kester
solder curve to make getting started easier. It can, of
course, be modified. A nice feature of the programmer is
that the steps for up to two programs are retained in the
EEPROM on the onboard PIC16F88 after the unit is
turned off. The LCD display for this mode shows how
much information can be crammed into just 32 characters.
5) Setup: Five variables can be modified to tailor the
controller to user preferences, including:
• Temperature units (Celsius or Fahrenheit).
• Time/temperature increment (during programming,
the amount of change for each button push can be
varied between one and 10 seconds or degrees).
• LED on with relay (gives a visual indication that the
relay has been switched on; kind-of a safety feature).
• Clock calibration (allows a ± 2% change to the
built-in system clock to get the one second timer
as accurate as desired).
• Time constant (helps the control system compensate
for the lag time in heating up the oven elements).
In addition, the controller program has a data logger
function which will output the time, set temperature,
actual temperature, and relay on/off conditions to your PC.
Data points are sent once per second. It uses the built-in
serial port on the board (a nice to have feature!) and is
directly readable by Hyper Terminal or similar programs.
The data can be easily copied into Excel and analyzed or
plotted, as seen in some of the plots in this article.
Software Tools Selection
Every programmer has to select tools and it’s never an
easy choice. Cost, complexity (including the learning
curve), and capability are all factors. In selecting BoostC
over CC5X — which seems to be the standard compiler in
most articles — the cost differential of many $100s was
important. As this was my first PIC programming effort,
and not knowing whether I would like it or be successful
or ever want to do it again, I opted for a very low cost
entry into the process. It turns out that this compiler
behaves very well, the cost is incredibly low, and there is
excellent user support through the forums. I could often
get a response to a question back in 24 hours from the
creator of the compiler. I didn’t come across a single
bug either, although a few features could be improved,
such as error messages. It also integrates right into the
Microchip MPLAB IDE, too, for a consistent programming
environment. For those of you who want to tweak the
code with another compiler, there are several things which
must be changed globally, including: using small letters for
all the register names; changing the way binary numbers
are entered; and, of course, pragma usage.
The boot loader from SparkFun proved to be more
problematic. It worked perfectly over the serial port during
the early days of program development, when I was
making tons of stupid mistakes during the learning
process. However, when the program size became larger
than 2K (which is half of what the PIC16F88 can
accommodate), the process went “tilt.” There are some
peculiarities in the way the PIC programs jump to addresses
above 2K that are incompatible with the SparkFun boot
loading scheme. Luckily, by that point, my programming
skills had improved and I could use my ICD2 clone to
directly burn-in the program changes to the PIC. It was not
as onerous as I had originally thought, taking only about
30 seconds for a complete remove/burn/re-install cycle.
Cooking Right Along
To start, I suggest trying out the oven in Manual Mode;
just switching the relay on and leaving it there for perhaps
four minutes. Use Hyper Terminal to collect the serial data
output and plot the heating
characteristic. First try, I ran into a
problem before the temperature
had peaked — the oven’s thermal
cutout safety switch clicked out
at 220°C, just enough for regular
solder to melt but not for lead-free
RoHS work. I found that by
adjusting the little metal tab on
the temperature dial inside the
oven cabinet, I could raise the
limit to 250°C, which is enough.
Of course, unplug the oven
before taking screwdriver in hand!
The second attempt then
250 FIGURE 6. Toaster oven heating
curve — Manual Mode.