3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Closing the Loop on Surface Mount Soldering

Step 2Software for Control

Software for Control

Useful as it is, the IR temperature sensor is only part of the system. To control temperature, three items are required: a heat source, a temperature sensor, and a controller that can read the sensor and command the heat source. In our case, the hot plate is the heat source, the IR temperature sensor (as modified in the last step) is our sensor, and an Ard/Free-duino running appropriate software is the controller. All software for this Instructable can be downloaded as an Arduino package and as a Processing package.

Download the file IR_PID_Ard.zip. Unzip it in your Arduino directory (usually My Documents/Arduino). Download the file PID_Plotter.zip. Unzip it in your Processing directory (usually My Documents/Processing). The files will now be available in the appropriate sketchbooks.

The software we’ll use was originally written by Tim Hirzel. It is modified by adding the interface to the IR sensor (provided by Scott Dixon). The software implements a control algorithm known as the PID algorithm. PID stands for Proportional – Integral – Derivative and is the standard algorithm used for industrial temperature control. This algorithm is described in an excellent article by Tim Wescott on which Tim Hirzel based his software. Read the article here.

To tune the algorithm (read about this in the article mentioned) and to change target temperature settings, we will use a Processing sketch, also developed by Tim Hirzel. It was developed for roasting coffee beans (another application of temperature control), and was called the Bare Bones Coffee Controller, or BBCC. Name aside, it works great for surface mount soldering. You can download the original version here.

Modifying the software

In the following, I assume that you are familiar with Arduino and Processing. If you are not, then you should go through the tutorials until things start making sense. Be sure to post Comments to this Instructable and I'll try to help out.

The PID controller must be modified for your Arduino/Freeduino. The clock line from the IR sensor must be attached to an interrupt pin. On an Arduino, this can be 1 or 0. On Freeduinos of various sorts, you may use any interrupts available. Attach the data line from the sensor to another nearby pin (such as D0 or D1 or another pin of your choice). The control line to the hot plate can come from any digital pin. On my particular Freeduino clone (describe here), I used D1 and the associated interrupt (1) for clock, D0 for data, and B4 for the control line to the hot plate.

After you've downloaded the software, start your Arduino environment and open IR_PID from the File/Sketchbook menu item. Under the pwm tab, you can define the HEAT_RELAY_PIN as appropriate for your Arduino or Freeduino variant. Under the temp tab, do the same thing for the IR_CLK PIN, IR_DATA PIN, and IR_INT. You should be ready to compile and download.

Similarly, start your Processing environment and open the PID_Plotter sketch. Adjust the BAUDRATE to the correct value and be sure to set the index used in Serial.list()[1] to the correct value for your system (my port is index 1).

« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
41
Followers
8
Author:doctek