Temperature seems like the easiest thing in the world to control. Turn on the stove and set the temperature you want. Switch on the furnace in the morning and set the thermostat. Adjust the hot and cold water to make the shower just right. Easy! But what if you want to control temperature beyond these everyday applications? If you want temperatures outside the normal ranges, or want stable temperature within a narrow range, you’re mostly on your own.

In my case, I wanted to control the temperature of a hot plate used for surface mount soldering. Initially, I used pulse width modulation to provide stable temperatures and experimentally determined settings to create the temperature profile required. You can read all about that in this Instructable. This system works and control of temperature in this manner is all well and good, but it has shortcomings.


  • Works only for my specific hot plate. Others are similar, but not identical and experiments are required to determine the settings and times needed to produce the requited profile.

  • Same situation if I want a different profile or temperature.

  • The soldering process takes a long time since stable temperatures must be approached slowly.

Ideally, we could just specify a temperature- time profile, press a button, and the controller would cause the hot plate to perform as programmed. We know this is possible since there are many industrial processes that use exactly this sort of control. The question is can this be done easily and inexpensively at home?

As you might have guessed, since I’m writing this Instructable, the answer is yes! This Instructable will show you how to build your own industrial-strength temperature controller. I’ll particularly target surface mount soldering, but any process requiring precise time temperature profile can use this system.

Note: When I use the name “Arduino” I mean not just the (not quite) copyrighted Arduino itself, but also the many public domain versions collectively known as “Freeduino”. In some cases I use the term “Ard/Free-duino”, but the terms should be considered interchangable for the purposes of this Instructable.

The temperature control scheme used in the Extreme Surface Mount Soldering Instructable is known as open-loop control. That is, a value that has produced the desired temperature in the past is expected to produce the same temperature when used again. Frequently this is true and produces the desired result. But if conditions are slightly different, say the garage where we’re working is a lot cooler or warmer, then you may not get the expected result.

If we have a sensor that can read the temperature and report it back to a controller, then we have closed-loop control. The controller is able to set an initial value to increase the temperature, look at the temperature as time passes, and adjust the setting to make the temperature go higher or lower until the desired temperature is reached.

Our approach will be to replace the AVRTiny2313-based PWM controller with a more powerful ATMega-based controller. Programming will be done in the Arduino environment. We’ll use a pc (Linux-Mac-Windows) running Processing to display the results and adjust the controller.

For the sensor, we’ll use an Infrared Temperature Sensor from Harbor Freight. The IR sensor will be modified to output the temperature as a serial data stream that the controller can read. We'll use an Ard/Free-duino as the controller, with a PC (Mac – Linux – Windows) for input to the controller. When we’re all done, the system will look like the picture. (You may have less extraneous circuitry on your breadboard however. That's OK.)

Step 1: Modifying the IR Sensor

Many thanks to my clever friend, Scott Dixon, for his careful detective work in figuring out how this instrument works and how to make it generally useful with a controller by exposing its serial interface.

The device we'll start with is Harbor Freight Part Number: 93984-5VGA. Costs about $25. Don't bother buying the warranty. :)} Here's the link.

Figures 1 and 2 show Front and Back Views. The arrows on Figure 2 indicate where the screws are that hold the case together.

Figure  3 shows the inside of the case when the screws are removed and the case is opened. The laser pointer module can probably be removed and used for other projects, although I haven't done this yet. The arrows point to the screws to remove if you want to take the board out to solder to it (screws removed in this picture). Also indicated is the area where a cut out should be made for your wiring to exit the case. See also Figure 5. Make the cut out while the board is removed, or at least before you solder the wires on. It's easier that way. ;)}

Figure 4 shows where the wires will be soldered. Note the letter of each connection so you'll know which wire's which when you close the case.

Figure 5 shows the wires soldered in place and routed through the cut out. You can now put the case back together and the instrument should operate as it did before your operation. Note the connector on the wires. I use longer wires to actually connect to my controller. If you use small wire, a small connector, and keep the wires short, you can tuck it all back in the case if you wish and the instrument looks unmodified.

Scott has also created the software to interface this device. He used this document if you want the details. That's it! You now have an IR temperature sensor that will work from -33 to 250 C.


<p>Great job! I'm curious if anyone knows of any products for sale that do this or the equivalent. </p>
<p>The Processing sketch puts up the error msg &quot;No Update&quot; in spite of the plot getting updated correctly. Might be due to my USB serial setup, or new version of Processing, haven't dug into it. The graphical plot runs fine, the commands are accepted fine, soldering went smoothly! Awesome Instructable doctek! </p>
<p>Glad you liked it! I have no idea why you get the &quot;No Update&quot;. I haven't tried it with the new version of Processing. Glad it all works. Post if you find the cause of the message.</p>
When compiling the IR_PID in Arduino, I get errors about the line #include avr/EEPROM.h in the eeprom file tab. So, then I changed to include but now I get these errors: <br> <br>eeprom.ino: In function 'float readFloat(int)'; <br>eeprom: 10:65: error : 'eeprom_read_blcok' was not declared in this scope <br> <br>any ideas what I need to do? <br> <br>
<p>I got this initially as well, with the Teensy and teensyduino stuff installed. I installed a fresh copy of Arduino IDE and it went away. I am using a board with an Arduino bootloader installed on the AVR chippy.</p>
For anyone else looking for the datasheet of the interface to the IR temperature device (link in instructable is dead), I believe it is located here. http://www.zytemp.com/products/files/TNm_302.pdf
Thanks for the update!
This is probably due to using a later version of Arduino than I used. I suggest posting the errors to the Arduino forum and asking for help there.
The Harbor Freight link has changed to http://www.harborfreight.com/infrared-thermometer-93984.html
I love this project so much. For us stingy embedded prototypers it is game-changing. I've decided to port it to CC430 Chronos... with wireless temperature profile upload and monitoring via OpenTag. Then I'm going to use it to build MORE CC430 boards -- you gotta love machines building machines. See you in a month!
I'm curious. You note 5V on the connector, yet the thermometer runs off 3V batteries. Is there a regulator on board? <br> <br>Also, in the recent videos, it looks like the thermometer is mounted higher (and has a nicer looking mount! (pictures?) I assume the spot it's looking at is larger, but does it matter much, and if so how?
Just take the batteries out. 5V powers it without a problem. <br> <br>You may be looking at someone else's set up. Mine still uses the rubber band. As long as you mount it within 4 to 6 inches (or so), the spot size will be small enough to work fine. Just don't put anything under it but hot plate. I prefer a 4 inch working distance. In practice, this hasn't been an issue.
any troubleshooting advice?<br>I am unable to get 120vac from the power controller.<br>The rest appears to be working perfectly. The teensyduino is blinking the power on and off, 120vac is coming into the power controller but no vac is getting out to the load...<br>Thanks for any advice you have.
Sounds like your PWM control unit and IR sensor are both working fine! Good job!<br><br>Be sure the connections to your AC Control Unit are correct. The green jumper must connect to the same ground as the Teensyduino. The Yellow wire must be on the output. Be sure it is connected on the processor side of the output LED. I'm assuming you've already checked this obvious stuff, so let's go on.<br><br>Disconnect the control signal from the Teensyduino. Looking at the pictures, this is the yellow jumper wire. Connect that directly to Vcc (+5V). Be sure the green jumper is connected properly and hooked to ground. This should turn the AC on continuously. If you don't get output, check the wiring of the AC Control Unit. (I assume you built this yourself from the plans in the other Instructable.) <br><br>Still no output? Try shorting pins 4 &amp; 6 of the MOC (optoisolator). Still no output? Check your wiring of the AC Control unit carefully. Be sure the diodes and SCRs are installed with the correct polarities. <br><br>Let me know what you learn and I'll try to help more.
Thanks for your help. <br>Sorry it took me so long to get back to this.<br><br>Shorting pins 4&amp;6 turned on the 120v. I don't know what that means I did wrong though.<br><br>Thanks again
The link to the Zytemp document that Scott used is no longer correct. The correct new link to his source document is:<br>http://www.zytemp.com/products/files/TNm_302.pdf It has good info in there.<br><br>Nice instructable.<br>
hello,<br>everything is working fine, but I dont understand if it is possible to save a soldering time/temp table. <br>I can adjust the temp manually, but can I save a profile??<br><br>best regards<br>Michael
Great idea, and you could certainly modify the software to do this. The reason I haven't tried to do that is that the environment (mostly the ambient temperature) changes enough that I would need to correct for it and controlling the process by eye is pretty easy. The type of parts on the board and presence or absence of ground plane makes a difference also. Some sort of sensor of board temperature or solder flow would be needed.
Very nice instructable!&nbsp; Well researched &amp; documented.&nbsp; Could you please post the pinouts for the IR sensor circuit board?&nbsp; On the board they are labeled &quot;A, G, C, D, and V,&quot; but which one is the interrupt, data out, etc.?<br />
My bad!&nbsp; They're listed in the 2nd photo on step 3.<br />
Fantastic work!&nbsp; I've added this to my list of Things to Build.<br />

About This Instructable




More by doctek:Surprise Picture Card Cheap, One Chip Arduino Easy Oogoo Miixing with Printed Auger 
Add instructable to: