Introduction: Programmable Temperature Controller + Hot Plate

Heating things up is one of the most performed tasks in a lab. Quite a lot of times it is not enough to simply hold something at a certain temperature, but the rate at which something is heated and for how long is just as important. Especially when you try to develop catalysts for chemical processes, the temperature program and exact temperature control is crucial and you probably do not want to stay in the lab for 16 hours to manually adapt your temperature program. Unfortunately, programmable temperature controllers that can automate processes are really expensive. So I decided to build a highly customizable controller that is able to run temperature ramps and read multiple different temperature programs from a SD card. It also provides a logging function on the SD card that allows you to evaluate the resulting temperature profile after running a program.

It is a great hack for your heating devices, since it can be easily connected to almost any heating apparatus you can think of, as long as it allows you to also connect a thermocouple. So If you have ever thought about building the perfect electric kiln (there are multiple really good explanations online) or hot plate (take a look at the steps 6 and 7), now is your time.

Overall the controller should cost you about $45 and the hot plate about $55. You should easily be able to build this as a weekend project.

Step 1: Things You Need

Programmable temperature controller:

Electronics:
  • Solid state relays (5V control voltage, 16 A load current)
  • LCD (e.g. on amazon.com)
  • SD card board
  • MAX 6675 controller board (e.g. on olimex.com)
  • Atmega 328 chip & socket
  • 5 x 10 kΩ Resistors
  • 4 x 1 kΩ Resistors
  • 4 x 560 Ω Resistors
  • 1 µF Capacitor
  • 100 pF Capacitor
  • 2 x 22pF Capacitor
  • 16 MHz quartz oscillator
  • LM7805 5V linear voltage regulator
  • Rotary encoder
  • Mechanical 110 V switches
  • 10 A fuse and fuse holder
For the casing:
  • 4 mm ply wood
  • Wood glue
  • Laser cutter
  • Primer
  • Paint


Hot plate:

  • Metal case as support (e.g. an old computer power supply)
  • Small plastic case
  • Aluminum plate 20x20x1 cm
  • 2 Cartridge Heaters (1/4’’ or 6 mm) (e.g. on amazon.com or from China on ebay.com)
  • Type K thermocouple (1/4’’ or 6 mm)
  • Steel thread rod (¼ ‘’ or 3/8’’) and nuts
  • Locking screws
  • Lead
  • Copper paste
Tools
  • Long (ca. 30 cm) drill for the heating cartridge and thermocouple
  • Tap & die for Locking screw and steel thread rod
  • Drill press

Step 2: Building the Case Part 1

You can of course use any casing you want, but I decided to laser cut a custom one. I uploaded the files to this step (the three different file types all include the same design. I just wanted to offer you options depending on which file type works best for you). You can see in the first image where every piece goes. Start by glueing the LCD distance holder to the back of the front-top panel. While the wood glue sets, attach the side panels to the back and the top panel. A corner clamp is certainly helpful to do so. Than add the front-bottom and front-top piece.

In case you are wondering whether wood is a good material choice for the casing, let me reduce your fears. Its autoignition temperature is about 572°F [1]. Since I have added a thermal switch to the hot plate that shuts it off at 338°F, you can be very sure that it is safe. Even after more than a thousand days at a constant temperature of 300°F, studies showed that wood would not self ignite [2]. Furthermore air is know to be an extremely good thermal insulator. If you are planning on running the temperature controller with a apparatus that heats up the surrounding air to more than 500°F: DON'T! Even if you are building a kiln the outside shouldn't be getting that hot.

Step 3: Building the Case Part 2

Since I am not a big fan of the burned edges the laser cutter leaves, I decided to get rid of them by filling the gaps with wood filler and sanding them down. You can see the result in the first picture.

I used a triangular shaped strip of wood to strengthen the connections. They will also be used to attach the bottom later on. Cut it to fit the corners, as shown in the pictures.
If you want you can prime and spray paint it, but that's up to you.

Step 4: Electronics

Safety precautions:
In this instructable you'll have to wire some parts with 110 volts line power and most of the heating plate is conductive metal. Unless you are not 100% sure, what you are doing (and even then I would not work without one) it is very advisable to use a ground fault circuit interrupter adapter or a safety socket when working on and with the device. These sockets will shut off the current immediately when a current leakage is present (e.g. through you). Otherwise you have to wait until one of the fuses blows which needs much more power (in Germany line power fuses blow at about 3.6 kW). GFCIs are cheap safety features that I would everybody urge to use. You can buy them e.g. on amazon.com.

Since I am planning on using heating power up to 1 kW, the main power is led through a 10 amp fuse and a mechanical power switch with a LED power indicator. These devices can disconnect the whole controller and heating circuit from the AC power. The ground wire is fed into the heating cartridge connector and should be attached to all conductive metal parts of the casing.
As you can see in the electronics circuit plan, one of the 110 V lines from the switch is led to the heating cartridge connector through a solid state relay and a second mechanical switch, whereas the second line is wired directly to the heating cartridge connector. When pin 6 on the Atmega controller is set to HIGH and the second mechanical switch is turned on, the load circuit is closed and powers the heating cartridges. The second mechanical switch also contains a LED power indicator which visualizes the heating pulses.
The low voltage supply for the controller circuit is generated by a small print transformer that generates 12 V AC which is subsequently fed into a four diode bridge rectifier and a LM7805 linear voltage regulator.
For measuring the temperature, we use a K-type thermocouple and MAX6675 controller board (MOD-TC). The MAX6675 chip has an internal 12-bit AD converter and can be connected via a serial interface. The LCD (SainSmart IIC/I2C/TWI Serial 2004 20x4 LCD Module Shield), is connected with the Atmega's I2C port and the SD-Card interface board is wired with the SPI interface. For navigation and setting the parameters we use a rotary encoder with integrated push button.
The heating plate also contains a thermal switch, which mechanically disconnects the heating cartridges when the temperature is over 190°C.

Step 5: Code

You can find the code in the attached files. I implemented the following external libraries:
PID library
Bounce library
Rotary Encoder
I2C LC Display
MAX6675

NOTE: In "MAX6675.h" you have to replace line 11  (  #include "WProgram.h" ) with
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
in order to make it run on Arduino 1.05

Use the "LiquidCrystal" library in the sub folder 2004-1.0 code, ignore "LiquidCrystal_I2C".

When a temperature is set manually or a program is selected from the SD card, the controller starts reading the temperature ever 0.1 seconds and calculates the next heating pulse length with PID library. As we are using a lot of different libraries I used up more than 99.5% of all the free flash memory on the atmega 328 chip. Worse, I had to shorten the text and menu for the LCD display, as I was running out of SRAM. Next time, I would probably be using an atmega 2560 or swap some strings into the EEPROM.


The different programs have to be saved as comma separated text files with incrementing file names (1.txt,…10.txt) in the root folder of the SD-card. The  layout of the files should look like this:
1. Line: title (maximum 20 characters)
2. Line: first temperature set point, first heating rate, first duration
3. Line: second temperature set point, second heating rate, second duration
4. Line ...

You can use up to a maximum of 10 lines per file. It has to be terminated with a blank line.

I used an Arduino UNO to upload the following code to the Atmega:
As you can see in the picture, for a first (and not optimized) try these are very nice results. A really nifty way to improve the system even more would be to implement an autotunig library (e.g. from here), but it would need more space than what is available on the atmega328. An other optimization would be to use a more accurate thermocouple controller.

Step 6: Preparing the Hot Plate

To find out, which the best position for the heating cartridges is and whether an adequate heat distribution can be reached using 1 cm thick aluminum, I simulated the stationary temperature profile. As you can see, at about 470 K (197°C, 387 F) the local deviation is roughly ±3 K which is enough for my purpose.

Start by drilling the holes for the heating cartridges and the thermocouple. This part is a little bit tricky and you definitely need a drill press for this step. You also can try to use two aluminum plates and routing machine with a ball nose cutter.  Next, drill the holes for the steel thread rods and locking screws into the aluminum plates and metal support. If you want to use a thermal switch as safety device, also drill the matching holes into the aluminum plate. Lubricate the heating cartridge and thermocouple with the copper paste to improve the heat transfer to the aluminum. Afterwards use lock screws to hold them in the plate.

Step 7: Assembling the Hot Plate

Fix the thermal switch to the plate and solder one wire of each cartridge to one pin of the switch. Connect the other pin to the plug in the metal casing and the other wire directly to a pin of the metal case.
To stabilize the heating plate, you can glue a small plastic casing into the metal support plate and fill it with lead.

In order to get an impression how hot the metal casing of the support gets, I simulated the temperature profile of the heating plate and the steel rods below the plate. It turns out that at 540 K (270°C, 518 F) the steel rods are about 370 K (97 °C, 206 F) hot. Since I limit the temperature to 180°C, I could also have used a wooden casing.

I placed a warning on the hot plate with heat resistant spray paint and used the hot plate to burn it onto the aluminum.

Comments

author
Eadiecd (author)2017-06-16

Could you explain how you set up your simulations, or upload your mph files? I'm new to comsol and would love to see how you did this. Thanks!

author
ayman hussien (author)2017-02-13

would you mind telling me where the program file is?

author
BrittLiv (author)ayman hussien2017-02-14

Please check out "Step 5: Code"

author
ayman hussien (author)BrittLiv2017-02-15

I did, but I found a lot of libraries and a program attachment

I copied this program to arduino but it couldn't verify the file.

So do I have to create the program from the libraries or does the program has a sequence to boot it in atmega?

also, would you mind telling me how can I program atmega? i have a way but I am not sure 100% from it.

And thank you for your reply.

author
WeitingQ (author)2016-02-19

thank you very much for your sharing.

and we can use the programmable temperature controller omron e5cn

author
FangY1 (author)2015-08-28

Great project. Thanks for sharing. Ever thought about extending this to a heating AND cooling plate using TEC?

author
baecker03 (author)2015-05-24

not sure if I missed it, does the heater have feedback correction?

author
mparsons1 (author)2014-11-29

Hi, I'm looking to do something quite similar to this using a cartridge heater, thermocouple and an Uno to control the temperature of an aluminium cylinder. My original intention was to earth the cylinder as it will be an exposed piece of metal (with a mains cartridge heater inside it), but I have just discovered that touching my thermocouple to the earthed metal produces a temperature reading of 0. Did you use an electrically isolated thermocouple? I'm struggling to find one with the right body type in the UK. Thanks

author
elfunkymunky (author)2014-09-12

Hi can I modify an analog hot plate that I would buy from the store with this instructable?

author
andrea biffi (author)2014-01-28

Wow, your projects are so well built... I love all of them.

For this one you could also use a commercial PID controller (digital temperature controllers on eBay), btw your design is much more unique!

author
BrittLiv (author)andrea biffi2014-01-30

Hi, yes you can, but they are not programmable and therefore pretty useless in chemical engineering.

author
ynze (author)2014-01-17

YOU WON A MILL!! Congrats! Again :-)

Y.

author
BrittLiv (author)ynze2014-01-19

Thank you! *happy dance*. Greetings from Matthias (I still couldn't convince him to write his first instructable...)

author
bajablue (author)2014-01-13

High five, BrittLiv!!!

bajabot.jpg
author
BrittLiv (author)bajablue2014-01-14

Thank you! Any plans for your hundred instructable yet?

author
bajablue (author)BrittLiv2014-01-15

Hey Britt!

Lot's of plans, but they have to wait. I cannot find the battery charger for my camera!

No mail service here in the Baja boondocks, so I'll need to buy another one when I visit the States again. I'm just in no hurry to leave this warm and sunny paradise. :-D

Thanks for asking! Congrats again!!!!

author
blakhachib (author)2014-01-11

congratulations

author
BrittLiv (author)blakhachib2014-01-12

Thank you!

author
abhishek7xavier (author)2014-01-10

Congratulations,being a girl,you are more awesome than we boys :)

author
BrittLiv (author)abhishek7xavier2014-01-10

Haha, thanks! Good luck in the hardware hacking contest.

author
abhishek7xavier (author)BrittLiv2014-01-11

Britt,i have sent u a friend request on facebook,accept if u don't mind or just ignore it!!
Thanks
A big fan of yours!!

author
BrittLiv (author)abhishek7xavier2014-01-11

Hi, I just did. My facebook account is quite boring, though since I don't post much stuff.

author
abhishek7xavier (author)BrittLiv2014-01-11

Oh,but atleast i will be connected!!

author
kymyst (author)2014-01-10

Congratulations on winning the Grand Prize Britt. Your temperature profile controller would be an excellent addition to my "Melt-o-matic" digital melting point apparatus, allowing automated melting point determinations. I wish I knew how to write program code like yours, but I'm just an old chemist from the pre-computer dark ages.

author
BrittLiv (author)kymyst2014-01-11

Thank you! Congrats on your win, too. I am impressed how you use mainly cheap or recycled materials.

author
ElectricBlue123 (author)2014-01-10

Good job congrats on the win :)

author
BrittLiv (author)ElectricBlue1232014-01-10

Thank you *happy dance*

author
antoniraj (author)2014-01-09

hi, congratulations on winning the Grand Prize in Build My Lab Contest... mine got the Judges' Prize: Build Their Lab

author
BrittLiv (author)antoniraj2014-01-09

Congratulations to you, too! I am sure you will put the 3D printer to a good use.

author
Ian01 (author)2014-01-08

I have a programmable hotplate that I need to refurbish at some point. If I can't get its existing controller to work well, I'll probably use yours. (I got it out of the electronics recycling; I don't know if it works at all!)

author
hmascarenhas (author)2013-12-15

Man i dont have time/patience/knoledge to do this project but i need this tool so my question is,could you make it for me and send to TN?
Please let me know. fb.com/henrique.h12 or whatsapp +59160780320

author
BrittLiv (author)hmascarenhas2013-12-17

Hi, I am glad that it is helpful. Sadly I don't have the time to build an other one. I hope you can find somebody else.

author
thelostspore (author)2013-12-06

Inspiring, legit !!

author
clazman (author)2013-12-03

At the start of the read I wanted to say PID control, then utilize auto learning , You are using PID and are considering the latter. Kudos to you.

PID is required and auto learning is great. But both features are dependent on the heat load. So several heating profiles will be required.

On the other hand, I am not very happy with the plates temperature profile. More cartridges are needed. I don't know if there are variable wattage cartridge heaters in th\is size range. I've used that feature in say 5/8" X 24" heaters to help create a more uniform temp. profile in rubber molding platens. Have you considered heat mats? They could help in heat distribution.

Again, I am still impressed with your prototype design.

author
BrittLiv (author)clazman2013-12-04

Thank you! 4 cartridge heaters are not going to change as much as you might hope. I have uploaded another simulation and since you could be interested one after applying insulation.
In my case two are really enough, since I doubt, that I will ever heat something of exactly the same size as the the plate.
I didn't know that heat mats can provide such high temperatures, I will definitely have a look into that.

4Patronen_gleichlang.pngIsolation.png
author
HarrieBo (author)2013-12-04

there is another way to save the program steps. I use one line of text as in :

6,300,130,60,780,600,60,1,700,140,1,510,90,600,400,20,900,20,0
With no maximum to the number of steps

The first number is the number of steps, the rest is in blocks of 3, the rate, Temperature and rest-time. With a function I read these values int an array.

I could upload the code and a picture , but apparently I don't know how to :(

author
BrittLiv (author)HarrieBo2013-12-04

Thanks, but the step limit is actually given by the array-space I allocate in the Atmega. When running a program I want to load the whole program into the RAM so you can remove the SD card without canceling your run

author
HarrieBo (author)BrittLiv2013-12-04

Dear BrittLiv, how can I upload a pdf and ino file as comment? I'm new to Instructables, and don't know how to
Pushing the button add Images and select files seems not to be enough :(

author
BrittLiv (author)HarrieBo2013-12-04

Hi, thanks a lot for your effort! As far as I know you can't add ino files to instructables.
That's why I used a text box. Since you are a pro member, just click on "Rich Editor" then "Source" and add one like this:
<pre><textarea cols="75" name="code" readonly="" rows="20" style="width: 600.0px;height: 294.0px;">your code </textarea></pre>

About the pdf I am not sure whether you can add it to comments. Can you maybe upload it somewhere else (e.g. dropbox) and share a link?

The simplest solution to the space problem is probably to get a second Atmega connect it with the IC2 interface and to split all the tasks. Especially since the SC-Card library literally eats up your space (~16 kByte) and the spare amount of free SRAM (apparently only a few bytes are left, as initializing new variables kills the program) might interfere with most of the more sophisticated approaches.

author
HarrieBo (author)BrittLiv2013-12-04

I don't know why but now the selecting of files worked

You will find my .ino file, a pdf with the result ( in Dutch but the graph is International :)), a photo of the oven and control and last but not least a curve file.

By the way it is a setup to heat glass , to shape and fuse

regards, Harrie

StookCurve.pdfOvenControll.pdfCurv07.txtOvenCurve14jun13.txt
author
BrittLiv (author)HarrieBo2013-12-04

Wow, great job! Thanks for sharing your code! I will definitely take a look at it.

author
chutchinson1 (author)HarrieBo2013-12-04

I haven't checked your code (sorry) but have you thought about quantizing your temperature so it is only specified in steps of 5 for example. This way you can use a uint8_t (i.e. unsigned char). Doing this with all the data you might want to use a C bit-field (http://en.wikipedia.org/wiki/Bit_field)

You may also could reduce the memory usage further with a basic zip/delta compression. A simple approach you store the delta/change (+-128) between steps so that each value can be stored as a int8_t (i.e. signed char) . This incurs a slight increase in complexity and requires extra steps for large step changes. There are many ways you could take this further including RLE encoding and a 3bits step header which determines what has changed between steps. Complexity of the code goes up a significantly there though so would probably never be worth the effort!

author
HarrieBo (author)chutchinson12013-12-04

You couldn't check as I didn't upload it so far. If you could tell me how to upload files, You could see what the code is doing, and...how "good" the wanted curve is followed :)

author
dvdwlmn (author)2013-12-04

Wow - very impressed with the 328 coding in this project! i will have to read through it carefully again to really lean the most from this one!!

author
mbaker750 (author)2013-12-03

Awesome writeup!

The autotunig library you mentioned would be to fine tune the PID parameters and help prevent the slight overshoot of the initial temperature ramp?

What software did you use for the temperature simulations?

author
BrittLiv (author)mbaker7502013-12-03

Hi, thank you!  The autotuning library automatically determines tuning constants. You can find out more about it here.
I used COMSOL Multiphysics.

author
mbaker750 (author)BrittLiv2013-12-03

Great! Thanks for the reply (and link)!

author
bwheat (author)2013-12-03

Your instructables are always amazing and professional!!! Fantastic Work!!!

PS... Voted :)

author
BrittLiv (author)bwheat2013-12-03

Thank you! Getting feedback like yours motivates me a lot!

author
wittend (author)2013-12-03

I could use more description of the 'heating cartridges'. I am not immediately familiar with the type shown. Where would I expect to find these?

About This Instructable

108,318views

599favorites

License:

Bio: Hi, my name is Britt Michelsen, I'm a Chemical Engineer especially interested in Computational Fluid Dynamics. To balance all the theoretical work I like ... More »
More by BrittLiv:"Toxic" Ice CreamOzone GeneratorQi Green Lantern Charger
Add instructable to: