Introduction: How to Automate ANY Temperature Controlled Process

About: Hi I'm Michael! I love all things Science, Engineering, & 3D Printing. If you've enjoyed my work then I've love to hear from you!

I'm going to show you how to build and use a device that will enable you to automatically control the temperature of any thermal process (heating OR cooling) to a very precise degree.

Precision temperature control for both hot and cold applications is surprisingly easy to achieve with off-the-shelf parts, and you don’t even have to write a single line of code to do it!

The biggest trick for this project is simply knowing of the existence of affordable process controllers. These devices are commonplace in industrial environments and are used to control various properties of predictable systems.

Pressure/force, cycle count, flow rate, and temperature are the most common control parameters and each one requires its own special type of controller & accompanying transducer. These controllers are usually mounted into large electrical enclosures for industrial use, but in this case I've created a standalone device intended to be a versatile tool for your toolbox.

We'll start with how to build this simple device, then move on to what it can do, the scientific theory of operation, and some pro tips & tricks!

Step 1: BILL OF MATERIALS & TOOLING

Recommended Tools:

*Dremel Tool (For cutting square holes into the box.)

*Wire Strippers & Crimping Tool (For preparing safe electrical connections. The strippers in this solderless connector kit are great for crimping, not so much for stripping: http://amzn.to/1AtX4RF)

*Calipers (for measuring where to put the holes on the box.)

*Drill (For drilling round holes into the box. I used these fancy step drill bits but you don't have to: http://amzn.to/1KhVlz0)

Bill of Materials:

(1) Temperature Process Controller: http://amzn.to/1Fbtyww

(1) Thermocouple Sensor Probe: http://amzn.to/1J01gKe

(1) Project Box 7.5" x 4.3" x 2.2": http://amzn.to/1ApI8US

(1) SPDT Mechanical Relay, 120VAC Coil, 15Amp Load: http://amzn.to/1FzE4A9

(2) Panel Mount Straight Blade Power Receptacle: http://amzn.to/1AtWROf

(1) SPST Rocker Switch: http://amzn.to/1Hszlyi

(1) Power Cord: (easy to salvage this from old electronics) http://amzn.to/1HszYrG

(1 Optional) Rope Cleat http://amzn.to/1FbudOI

(1 Optional) Thermocouple Panel Jack (I did not use this here because I don't need to change my thermocouples, http://amzn.to/1KhWF4U)

Step 2: MODIFYING THE BOX

*If you bought the project box linked in the BOM then you will have to cut out some holes for the parts. Since the box is just ABS plastic, a Dremel tool with a cutting wheel is my preferred choice for making the square holes. I used a dull pocket knife to clean up the edges. (The dullness was actually good for this because it keeps the blade from digging too far in making it a good deburring tool.)

*Refer to the attached PDF file in this step for exact hole dimensions and locations.

*I've also attached a reference of the standard sizes of process controllers. The model I've provided in the BOM is the 16 DIN. The main selling points for the larger standard sizes is that they have larger screens and buttons, more current capacity, more switched connections and alarms, basically more of the same stuff except bigger.

*I made stl files if you want to try to 3D print the box, but it is a bit big for most consumer grade 3d printers.

Step 3: ELECTRICAL WIRING

*See the electrical diagram in the attached pics for a reference and notice that its not a very difficult circuit to put together (Yes I did draw it in MS paint and drop it on a nice layout. I have other software but Paint has its own charm to me).

*I do recommend using the solderless connectors to make clean reliable connections and to avoid having to bust out the soldering iron.

*For the wire junctions I used wire nuts reinforced with tape & a zip tie. Be aware that you will never see this type of connection in a professional product but I used it here because it is simple, water resistant, cheap, effective, and most of all compact. (It just doesn't look good and doesnt lend itself well to adding or removing wires quickly.) If you wanted to do it right then you'd use some sort of terminal blocks.

*The controller I used has an internal relay that you could use directly rather than using the supplementary relay shown in the diagram, BUT then you would be limited to 3A MAX and if you ever did overload it then your cheap supplementary relay can break instead of your more expensive process controller.

*Don't worry about heat generation inside the sealed box. The relay selected was chosen for this because it is mechanical (rather than solid state) so it doesn't get very hot in use. The controller can handle a bit of heat, I just wouldn't leave this thing inside a hot car all day or use it inside an oven because that would definitely destroy the controller.

Step 4: HEATING APPLICATIONS

Heating is more intuitive so let’s start there. As an example, imagine using an oven for testing metal specimens at high temperatures.

All you do is plug some sort of heating device directly into the controlled outlet, such as a strip heater for the oven. You could also use things like an incandescent bulb, hair dryer, band heater, space heater, portable stove, immersion heater, cartridge heater, heated 3D printer beds, anti-freezing pipe wraps, fish tank heaters, heated pet lamps, oil boilers, cooking crock-pots, i.e. anything that gets warm.

Next you may need to plug in some sort of convection assistance tool like a fan or water pump into the always on outlet. The oven in our example would need a fan to transfer heat from the strip heaters to the air. This fan would stay on 100% of the time while the heaters would turn on and off as necessary to regulate the temperature.

Finally you'd position the thermocouple probe within the insulated oven chamber, near or even on the test specimen you are trying to heat, and close the door and you're done! The temperature controller, once tuned (an automatic process), will automatically regulate the temperature inside the oven to be whatever you want!

Step 5: COOLING APPLICATIONS

*Chilling things is a bit more difficult than heating because there is no such thing as a device that 'produces cold'; heat can only be moved, not eliminated. I’m going to discuss the 5 possible basic cooling methods as I see them.

#1 Ambient Air Fan Cooling: Starting with the obvious, you can use this device to control a fan and accelerate the process of cooling something to ambient air conditions. This option is great for something like cooling the motor on your electric bicycle or having a bedroom window fan that automatically turns on during the hot day and off during the cool night.

#2 Peltier elements: Thermoelectric cooling is easy to setup but offers low cooling capacity and is terribly energy inefficient. This is a great option if you need a cheap, small package for a light cooling load (up to 36 °F below the ambient air temp). Technically, you can stack them for some compounding effect, but this comes with a significant cost in overall cooling capacity (i.e. stacking makes it colder but it cannot remove heat as quickly. You cannot reach cryogenic conditions in this manner.) Peltiers are a great option for making a portable mini fridge. I've never used one or seen one used in any industrial applications, so its more of a novelty.

#3 Heat Pump/Refrigerator/Air Conditioner: This type of cooler is the most efficient type. The typical four-step vapor compression refrigeration cycle does not lend itself well to direct control via a simple process controller. These systems use compressors to circulate refrigerants in cyclical patterns. If you stop a compressor mid-cycle and attempt to restart it with the system partially pre-pressurized it can damage the compressor. (This is known as short cycling). Instead of direct control, your best option is to control a fluid pump which circulates a bath of chilled antifreeze (a 'chiller', controlled just like in method #1). This type of cooling system is complicated, but can be assembled with commonly available components. It is can reach greater temperature differentials with much greater efficiency than Peltier elements, although you have to use expensivemulti-step heat pumps to reach cryogenic temperatures.

#4 Sterling Cooler: This type of cooler is a pretty efficient type and the professional ones can easily reach cryogenic temperatures. It is not directly controllable using the process controller described here, but maybe you could rig something up. Regardless these things are really expensive but are mechanically simple and compact. For the curious among you, you can read about the tech here and see a producing using this tech here.

#5 Liquid nitrogen: My favorite! You can use the temperature controller to control a cryogenic rated solenoid and release liquid nitrogen on command. When properly tuned, this type of system works surprising well and easily reaches cryogenic temperatures (that is, below −238 °F). The only real drawback is that this method relies on a consumable, and so cannot be used for indefinite periods of time.

Step 6: PID CONTROL EXPLAINED

*Most temp controllers have three control output settings: (Our model only has PID and ON/OFF settings on it.)

PID: Uses temperature AND time feedback to adjust the output.

SIMPLE ON/OFF: Uses temperature feedback to adjust the output.

DUTY CYCLE: Uses time feedback to adjust the output.

The PID Control option is what really makes this device so powerful. When properly tuned, this device can control temperature with excellent precision. It works so well because PID is a control loop feedback mechanism that can be used on any process that changes over time (if it reacts predictably to inputs and can reach a steady state). Here is my best explanation of PID control in the most down to earth terms possible.

P= proportioned control response. It uses the measured difference between the desired temp and actual temp (the Error) to calculate how to respond. If your error is huge, you apply the control process more aggressively (I.e. leave heaters on longer if measured temp is far from desired temp). The bigger the error, the bigger the correction.

But proportioning doesn’t deal with sudden fluctuations very well. If a gust blows all the heat from your oven briefly, the p control by itself would respond too heavily and blast the oven with a powerful response that would overshoot the target.

Derivative control: It literally measures the rate of change of the error(Error/Time,) within the system. If the oven cooled off drastically in a 2 second period, D control knows not to over blast your system. It will limit the proportioned responce and stop heating earlier because it knows the overshoot will take it to the right temperature.

But if the rate of change is slow (I.e. your oven is very gradually cooling off when it is supposed to be in steady state), the D control doesn’t respond because the change is too gradual, and the P control is proportioned too low because it is only off by a little. To achieve perfection we need the integral control.

Integral control: This measures error magnitute relative to how long the error has bee present (Error*Time), it increases its output contribution the longer the error. I control kind of the opposite of D control and is very good for correcting steady state errors.

The really interesting thing is that not every system can be tuned. Imagine an oven that has the door opened and closed intermittently at random. PID control can handle some fluctionations but if the controlled system cannot possibly reach a steady state then PID will not work well.

If you read all the scratching your head don't worry.This temperature controller features an 'autotune' button, so it can figure out how to make all that work on its own!

Step 7: THERMOCOUPLE THEORY OF OPERATION

You don't need to know the info in this step to use the temperature control box but I think if you understand a bit of the science behind the tool then you will be able to use it more effectively.

To be brief, a thermocouple is a pair of wires made from dissimilar metals that when fused together will create a voltage (see Seebeck effect) that corresponds predictably to certain temperatures. This is why you have to mount the thermocouple directly to the temp controller, because adding solder or a connector will change the readings!

The various types of thermocouples use different metals joined together with the result being different usable temperature ranges and stability readings. Thermocouples come in all shapes and sizes and have their own color codes to indicate type. K type (yellow & red) is the most common. The attached pdf shows the usable temperature ranges for the various types.

The temp controller used here can also use a Resistance Temperature Detector (RTD) instead of a thermocouple if you wanted but you'd have to use pins 7,8,9 AND 10 on the controller to make it work! The general differences between the two are:

Thermocouples: Low cost, rugged, huge measurable temperature range.

RTD: More accurate and steady readings than thermocouple, but also more expensive and may suffer from self heating issues.

*Tip You can make your own thermocouples from a spool of special thermocouple wire easily if you have the right tool. A 'thermocouple welder' is just a really expensive stack of capacitors used to fuse the end of the wires together. I'd bed money that you could rig up your own using a modified one-time-use camera flash.

*Tip: Limit your thermocouple wire length to a maximum of 100 ohms (will still be very very long).

Step 8: OBVIOUS TRICKS

*If you've never played with process controllers before then I assure you that they are not difficult to wire up or operate. Controllers always have a diagram on the side to tell you what the connections on the back are for.

The model in the BOM comes with a 2 page instruction manual on how to use it. I do recommend looking at it if you are new to these before playing with it because process controllers have a built in lock out code that you can accidentally set if you are just pressing buttons. There are only 4 buttons on the thing, two of which are directional inputs.

*I couldn't find a digital copy of the instruction manual online so I scanned mine and have attached it.

*Everybody and their brother sells process controllers. The one I've recommended is the lowest cost to entry model you can buy that isn't garbage. That said, its primary drawbacks are that it cannot be connected to a computer or data acquisition device (it doesn't have a scaled output), and that it has a +/- .3% accuracy rating. I used to use process controllers a lot at work and we needed the more expensive higher grade ones that got +/- .1% accuracy, and we had them calibrated.

Step 9: NON-OBVIOUS TRICKS

I've been working with these things for a long time and there are a few things I've learned the hard way that I will share right here:

*Your controller is more accurate in Fahrenheit mode than it is in Celsius! Fahrenheit gives you almost double (1.8x) the resolution of Celsius because the Fahrenheit numbering system is more sensitive to small shifts in temperature. The temp controller can only display one decimal point at a time, so a 0.1 deg F change is a smaller shift in absolute temperature terms than a 0.1 deg C temp change.

*The sensor is in the tip, no matter how long the probe is, so your most accurate reading will be at that point.

*But be aware, for precision temperature control applications its worth noting that the presence of the thermocouple itself can disrupt the process. Ive used really long thermocouples that ran down into cryogenic freezers and I found that I had to heavily insulate the portions of the thermocouple that stuck outside of the chamber because they were introducing a significant amount of heat into the system! (To visualize this just try to get a long probe to read 32 degrees F in a shallow ice water bath...)

*The mass of the thermocouple matters. Larger thermocouples change temperature slower but they are robust. Small surface mount thermocouples work quickly but they often need some insulating material added to their back side to reduce the affect of ambient temperatures altering their readings. Remember, the readings your machine takes isnt necessarily what temperature the object in question is, its what temperature your thermocouple is!

*DC voltage controlled contactors/relays benefit greatly from using a 'flyback diode'. Because relays are inductive loads (have an inductor/coil) they can damage electronics by creating a voltage spike if you suddenly remove the power from them. It is easier to visualize how this happens by thinking of an electric motor: If you apply power to a motor it spins and if you remove the power source the motor becomes a generator and produces a voltage difference. You can protect electronics in DC circuits from the power spike by wiring them in parallel with a diode, as seen in the photo. The particular setup in this instructable runs purely on AC voltage so we don't use the diode here.

*Well that's all for today, I'm exhausted! If you have learned something from this instructable then please take a second to vote for me in the "Home Automation Contest"! Questions and feedback are always welcome, thank you!

Home Automation

Participated in the
Home Automation