Intro: 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
- 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
- 4 mm ply wood
- Wood glue
- Laser cutter
- 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
- Copper paste
- 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 . 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 . 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
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
I2C LC Display
NOTE: In "MAX6675.h" you have to replace line 11 ( #include "WProgram.h" ) with
#if defined(ARDUINO) && ARDUINO >= 100
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.