In early February, a correspondent pointed me to Jeff Keyzer’s mightyOhm blog. I immediately ran across his homebrew PID-controlled soldering hotplate and improvements, and immediately knew I had to have one.
I contacted Jeff through his blog and he was great about sharing his knowledge. He’d built his hotplate using the last of some surplus parts he’d picked up at a now-closed store in the Valley and was considering ordering a batch of parts to make a few for all the folks inquiring about them, but hadn’t done so yet. I was eager, decided it’d be quicker to make my own (and three months later, that may actually have been correct), and went off to eBay to find myself some parts. I also bought aluminum and took a practice run at polishing it.
Most of the CupCake PC boards are SMT; and although I’m very comfortable soldering SMT by hand, I really wanted to get my hotplate up and running and use the CupCake boards as a chance to try out reflow soldering. (That’s why I started by assembling the opto endstop boards, which are the only all-through-hole boards in the kit.)
So last night I got a working proof-of concept hotplate going, and tonight I can start on the CupCake SMT boards. W00T!
Here’s the tale of how to build a copycat PID-controlled hotplate, with a digression into how lucky I got buying exactly the right PID controller with no idea what I was doing.
PID stands for proportional-integral-derivative, and you can read about it in great detail on Wikipedia, among other places.
To provide a brief recap:
- Many electrical control systems (not just temperature, but any process control) are “bang-bang,” meaning that they turn an actuator all the way on or all the way off — like most residential furnaces.
This is like a male teenager’s approach to driving a car: When you want to accelerate, floor the gas; when you want to slow down, take your foot completely off. [I'm saving the brake for the description of a two-control system later. This is called foreshadowing.]
- The P (proportion) term takes into account the magnitude of the difference between the current value and the desired value, and applies a variable control (or a variable-duration pulsing control) to the actuator.
This is how more experienced drivers control speed on level roads: When you’re far below the speed limit, give it a lot more gas; when you’re almost up to the speed limit, give it less.
- The I (integral) term takes into account the duration of the difference between the current value and the desired value.
This is another aspect of how experienced drivers control speed: If you find that easing off of the gas as you approach the speed limit has left you a little bit short and you’ve been driving too slowly for a while — or if you’re going uphill and the pedal position you thought was correct for your desired speed just isn’t keeping you going as fast as you want to — give it a little more gas.
- The D (derivative) term takes into account the rate of change of the difference between the current value and the desired value.
This is probably the most difficult to grasp intuitively because it feels a lot like what the proportion term already gets you, but consider this: If you’re rapidly accelerating up to the speed limit, back off the gas a little even if you’re not quite there yet. It helps keep you from overshooting the speed and having to slow down.
So I bought a PID controller (with thermocouple) and external solid-state relay (SSR) on eBay. The PID controller in the auction looks exactly like Jeff’s; the one that shipped (above) is close but not the same. And the manual is baffling, to someone who hasn’t worked with PID controllers before. The connection diagram didn’t help at first, either; it shows every possible option, not just the one implemented in this hardware.
My PID controller touts two outputs. OUT1 is a voltage pulse, and OUT2 is an internal relay. When I read “voltage pulse,” I feared that it was intended to trigger some external process that would run for a while every time it was triggered; and I had no idea why there was a second output.
Cort and I had connected it and watched the LEDs on the front, and couldn’t figure out what was going on; so I was afraid I’d made a poor selection and was going to have to do some rewiring in order to make it work for me — rewire the voltage pulse as a steady voltage, rewire OUT2′s relay to deliver the control voltage directly to the outputs, provide an external 12VDC power supply to run through the relay to control the solid-state relay, etc.
Not so. Yesterday afternoon I sat down with the controller and the thermocouple and discovered that:
- The thermocouple’s wiring is directional. I hadn’t studied thermocouples before and I first wired it up backwards, and was surprised to see the displayed temperature drop when I warmed the probe.
- The OUT1 indicator flashes while the process (measured) value (PV) is less than the set value (SV) — with longer on-time the further the PV is below the SV. Far enough below the SV, the indicator just stays on.
Ah ha! OUT1 is a pulse-modulated output, and that’s what “voltage pulse” means. It’s exactly the right thing to drive my SSR controlling a heater cartridge — it turns on constantly when it’s a lot too cold and pulses on for briefer and briefer periods when it’s only a little too cold. Perfect!
Setting for Fahrenheit
The controller had been listed as F/C, which I assumed was Fahrenheit/Celsius, but I couldn’t find any mention in the manual of how to set it for Fahrenheit. I emailed the seller and they sent back instructions:
For changed the reading in Fahrenheit, you can hold the
‘SET’ button for more than 3 second to enter setup mode.
Switch the read
to display ‘LCK’ and change the parameter to ’1000′.
Now hold the ‘SET’
and ‘<' two button together for more than 3 second.
The read will display
Switch the read to diplay 'SL 2' and change the parameter
to '0001'. (0000 means in Celsius, 0001 means in Fahrenheit)
'SET' button and the temperature reading will be changed in
And the instructions work … sort of. The process (measured) value changes to Fahrenheit, and I think the set value does too. But then the SV only goes up to 400°F instead of to 752°F (400°C, the range of the thermocouple), and that doesn’t seem right. I’ve emailed the seller to ask whether there’s another pertinent configuration item; and meanwhile (even though I don’t need to go that hot) I’ve put the whole thing back to Celsius.
Inside the PID Controller
Oh, you wanna see inside? I couldn’t resist taking it apart.
It has two main PCBs. One has an off-line switching power supply and space for two output modules — relays or wiring and resistors for voltage/current drive, depending on the build options. The other has a SyncMOS SM8954A microcontroller that’s the brains of the outfit, and wiring to a relay for an “out of range” alarm.
The back sides of the boards are pretty sparse — the most interesting thing there is the traces from the microcontroller to what I assume is the in-system programming header.
The microcontroller board has a header that plugs into the back of the front panel, and the front panel’s plastic surround has locking tabs to hold the two main PCBs in place, parallel to each other, standing up on edge.
I want to polish my heater block, and I had a friend mill it to provide a smooth surface to begin polishing. That’s a subject for another post as soon as I can get back to take some pictures of the massive, commercial CNC milling machine in his shop.
Due to availability of time over the last few weeks, my heater and base plate are milled but not yet polished. I considered what other work needed to be done in order to assemble and test the hotplate and decided that everything was dismantleable — I could go ahead and get it set up, then come back and polish later.
I had bought a 5″ long, 3/8″ diameter heating cartridge on eBay. Jeff used a 500W heater and said he didn’t need quite that much heat — 400W would probably do. I couldn’t find any 400-600W 110V cartridges I liked, so I ended up buying a 1000W 240V cartridge, thinking (ahem) that I’d run it at half the voltage and get half the power.
P = VI so I = P/V = 1000W / 240V = 4_1/6A
I = V/R so R = V/I = 240V / 4_1/6A ≈ 57.6Ω
Sanity check: I measured the resistance of the heating element at 58.3Ω and my meter reads .3-.4Ω high.
So at 120V instead of 240V:
I = V/R = 120V / ~57.6Ω = 2_1/12A
P = VI = 120V * 2_1/12A = 250W
ANYWAY, my brother does more metalwork than I and has a nice drill press vise, so I used his setup and his longest 3/8″ bit to sink a hole for the heater, then measured the metric threads on the thermocouple and drilled and tapped a hole for it as well. The heater hole ended up a bit loose, so that’s a sliver of Mug Root Beer can sticking out the left that shims up the gap.
Copying Jeff’s design, I wanted to use ceramic spacers to provide thermal insulation between the hotplate and the base — and he had trouble in his first iteration with too much heat conduction through his 1/2″-diameter standoffs and was much more satisfied when he switched to 1/4″ standoffs.
I couldn’t find any 1/4-3/8″ standoffs and didn’t really want to order from McMaster-Carr just to get going, so I pondered alternative sources of ceramic tube. Finally I hit upon a solution — high-amperage, ceramic-cased fuses. Grind the metal caps off the ends and you have 1/4″-diameter ceramic tubes.
I know glass tubing would be a good insulator too, but I figured the glass would be too fragile. Even using ceramic, I shattered two tubes yesterday afternoon grinding the metal ends off of enough fuses to end up with six tubes.
Again taking the nod from Jeff’s work, I used stainless steel screws (low thermal conductivity) tapped into the aluminum blocks and set loosely into the ceramic tubes — gravity currently holds this together, not mechanical fasteners.
Oh, and I botched the first hole I tapped, grabbing the 8-32 tap from the wrong end of my tap set and wondering why I needed to redrill the pilot hole larger than what I had looked up earlier. (Lower left in the picture above, missing the machine screw.)
Firing It Up
By early evening I had everything bodged together and ready to go. After triple-checking my wiring, I turned on the power strip and there was no popping or puff of smoke, so it was fine so far. I set it for 20°C and watched the OUT1 light wink, wink, wink, and the temperature climb up to 20°C … and overshoot a few degrees … and come back down. The block felt cozily warm.
Occasionally OUT2 would turn on for a while and I’d hear the click of the relay.
I set the controller to 40°C and it took a few minutes to climb, then overshoot all the way up to 49°C. I think we need to do a little tuning on the parameters, but there’ll be time for that later. The plate was hot to the touch but not unbearable. No smoke or bad smells — I was at least expecting the heater to burn off some coating or grease or something, but nothing objectionable seemed to be happening — so I figured it was time to go for it.
Jeff’s blog says that 60/40 solder melts around 185°C, so I bumped the controller up to 190°C. Around 130°C, water droplets boil from underneath fast enough that the combination of rising steam and the surface tension of the remaining drop keep them intact and dancing across the plate nearly indefinitely until they roam off an edge. (Somebody find a video of this and post a link in the comments? It’s a really wild effect if you haven’t seen it before.)
At 185°C the solder in the salvaged PCB snippet’s through-holes was melted, and I could melt more of my ultra-fine (15-mil) solder into it. At 190°C I could melt solder onto the tinned area, and at 200°C I could melt solder onto the bare copper I had exposed by sanding away the varnish. After a few minutes the copper had oxidized too much and I could no longer easily melt solder into it.
At no point was I able to melt solder onto the copper on the bakelite board; and by 200°C, the board was starting to darken from the heat. It appears that bakelite is too good a thermal insulator to be able to reflow solder on it by heating only from below, which is disappointing as I have large amounts of single-sided bakelite board that would be perfect for SMT prototyping.
The base plate remained cold to the touch the entire time — apparently the fuse “standoffs” are plenty poor thermal conductors (good insulators) and are doing their job.
When I was done playing, I was curious how long it would take to cool down. Rather than power it off, I changed the set temperature to 25°C so it would no longer heat but would still display the measured temperature. The OUT2 LED came on solid. We went to drop my wife’s Jeep off at a transmission shop out in the country; and when we returned 45 minutes later, the temperature had only fallen from 200°C to 60°C.
That’s a long time to wait for the block to cool. When using the hotplate, I may want to run specific heating/cooling profiles to prevent damage to components; and there’s even the simple safety factor of having a very hot, not visibly hot aluminum block sitting on my bench.
I hooked a salvaged 4″ fan up to my bench power supply and set it in front of the hotplate, blowing between the block and the baseplate. Within a few minutes, the temperature had dropped to 25°C.
I need to enclose the electrical parts in a case, and I think I have an avacado green ancient modem that would be perfect for this. The PID controller is only 2″ square on the face, and I’m sure I have some vintage device (if not the modem) that would provide a suitable housing.
It would appear that OUT2 is intended to control a cooling device, just as a car has both accelerator and brake. Because the base plate is staying so cool, I think I’d like to build the hotplate onto the top of the controller housing, sort of like a solder pot. I intend to build a fan into the housing to blow across the underside of the block under control of OUT2, hopefully far enough from the block that the fan doesn’t melt from radiant heat.
The block is a bit wobbly on its standoffs — the fit between the #6 screws and the fuse tubes isn’t as tight as I’d like. If I were going to keep this in the current configuration, I’d want to find someone with a lathe to turn part of the threads off of #8 machine screws until they fit snugly into the tubes without cracking the ceramic, then redrill and retap all my holes to #8. But because the heater block will really need to be sturdy if it’s mounted on top of the controller housing, I’ve ordered tapped (6-32) ceramic standoffs from McMaster-Carr (at $3.42 each, good grief!).
The system took about ten minutes to heat to solder’s melting point, and that’s longer than I think I’m going to be happy waiting. I still couldn’t find a suitable 400-500W heater on eBay for cheap, so I ordered one from McMaster-Carr for $27. I went with 500W — the pulse-modulated controller output can always deliver less average power if I don’t need so much, so I’d rather overkill and scale back than undershoot.
I’d been hoping to do this on a budget; and although I don’t regret having built it, it certainly hasn’t turned out to be a budget job.
|aluminum block||$5-10 (I think)|
|250W (@ 120V) heater||$18 shipped|
|new actually 500W heater||$27|
The materials I’ve used only in the prototype aren’t necessarily a waste — Cort wants one of these too, and he may be satisfied with the slower action of the 250W heater. He may also like the remote plate design that’s lower to the workbench than mounting the block on top of the controller, so he may use my fuse standoffs (and we’ll do up some #8 machine screws for him).
So … I’m disappointed that the total comes to as much as it does, because I think it may be prohibitively high for other folks who would otherwise want to make one too. eBay prices on the PID controller and the SSR are very competitive with online retailers; and since I was already shopping eBay, I just don’t know that we can get the prices for the expensive bits much lower.
But I’m delighted to have a working, temperature-controlled hotplate, and I’m eager to get going on the CupCake soldering.