Project-GlassKilnController

Hi Everyone, Earlier I asked about Wood Stove controllers, and showed some working examples of reading high temperatures with Thermocouples (HERE). I'm still working on that but another project has taken priority.

The more complex project is for the design and construction of a electrically-heated kiln for making "Warm Glass", which is glass heated until pieces fuse together or "slump" or "drape" over shaped molds. This requires a careful profile of kiln temperature over a multi-section sequence of heating, "soaking" at a high temperature, rapid cooling to an intermediate temperature, annealing to stabilize stresses, and finally cooling to room temperature.

I would like feedback on what you see on the project progress so far. Comments/suggestions/critique welcome. I also am trying to make the project description page show some techniques of construction of a system like this. It's a big step for many people to go from a desktop prototype to a packaged system, and I get many questions (and see many here) about the problems in making a more complex system. There are both electrical challenges like Common Ground Point and mechanical challenges like cutting rectangular holes accurately in metal. Then there's mounting/packaging Arduinos and many peripheral modules. And cabling. So I'd also appreciate comments/suggestions/critique on that aspect: hopefully a practical example of making stuff like this. Lately I have been mostly making kits and writing how-to for relative newbies and younger people, and it's been a while since I've done a project like this.

So, my project page is HERE and I hope you may have time to look it over.

AND I have stuff I don't know how to do yet, and I'm asking for suggestions/pointers:

  • The active multi-level temperature control will use Brett's great Arduino PID library. I am getting to understand it a little, but this specific situation requires not just a PID approach to a single temperature, but control that follows a needed profile of temperature rate-of-change. So I THINK it's like "do a PID to the next intermediate setpoint in the next minute, then go to the next setpoint along the profile path". Or something like that. Anyone seen an example of doing that kind of control??

  • I need to initiate a read of a small text file on the PC into a buffer in the Arduino Mega. I didn't find a good example of that yet? Seen one??

  • I have seen/done some datalogging. But here I need logging over several hours, and hopefully nice graphing on the PC of Temperature vs Time. Any pointers??

  • I would LIKE to keep backing up critical parameters including "where in a firing schedule sequence I am" with the hope of being able to recover from a crash without destroying the Product in Process. I assume I can save this kind of information in EEPROM memory. Anyone seen example(s) of this crash/recovery/restart function?

I will put the CodeOfTheMoment on another page HERE

So far quite a bit of stuff is working. The one temporary disaster was the attempt I made to use a couple of small optically-isolated 30A relays to turn the main 240V power on and off. I have the main power cable (8-3 copper) wired to a 50 Amp outlet I use for a welder and plasma cutter. Hmmmm... What Could Go Wrong? Last night after dark I finally plugged that big plug in and flipped the 50 Amp breaker. BLAM!! FLASH!! ALL THE LIGHTS WENT OUT!! Jeezum Crow! (A Vermontism).. I stumbled blindly to the shop door where I knew the backup flashlight was. Got it. UNplugged The Project. No lights on in the house at all. Hmmm.. Went to the main breaker panel. Main breaker is ON (cycled it) but no lights. Doggone! There is another 100 Amp breaker, out on the power pole. In a locked box. In the Snow. Fortunately I had compulsively marked and tagged and hung up the KEY next to the panel. Flashlight out the door, through the snow, unlock the box, Cycle the breaker.. Lights!!

This was easily the most spectacular failure I've had in the past 20 years. Impressed my wife, too.

I read something about modern project management and agile development. "Fail Early" was one idea. Got That. That little relay was Way Overdone Toast. I have a real one coming from Digikey.

UPDATE I removed the toast and put in a temporary fuseblock with two 1/2 amp fuses. Plugged that big cord back in.. .. Flipped the breaker and.. the pilot lights came on, the power monitor showed 242 volts at 0.12 amps and the little (failsafe) temperature controller came up. It complained the Thermocouple was bad(gone) so I made a quick 6 inch long one with a propane torch and a hammer weld. OK for now..

Thermal ramps are used in PCB reflow soldering, and I've seen a few DIY examples for toaster ovens. This one is Arduino compatible. Here is an open source example with code.

Spoils the fun, but you can buy little PID process controllers that do thermal ramps, very cheaply on eBay. That, a thermocouple and maybe an SSR is all you actually need for a small kiln. For example: http://www.ebay.com/itm/PID-Temperature-controller-With-30-steps-RAMP-SOAK-Option-/132034883168?hash=item1ebde46e60:g:shUAAOSwCfdXpK41

terryking228: So, my project page is HERE and I hope you may have time to look it over.

Looking good! Just FYI, the peacock is most likely stained glass, which didn't involve any use of a kiln, only cold cutting of the colored sheet glass and then soldering it all together using lead came or copper foil. Slumping can be used in stained glass work when you need to form the flat pieces using a mold prior to soldering them together, such as to make a stained glass lamp.

terryking228: - The active multi-level temperature control will use Brett's great Arduino PID library. I am getting to understand it a little, but this specific situation requires not just a PID approach to a single temperature, but control that follows a needed profile of temperature rate-of-change. So I THINK it's like "do a PID to the next intermediate setpoint in the next minute, then go to the next setpoint along the profile path". Or something like that. Anyone seen an example of doing that kind of control??

You just need to be continually updating the value of the Setpoint variable that was passed to the PID constructor. So that part of your code will be separate from the PID library, which is only intended to precisely reach the value of Setpoint without any overshoot. It's a simple equation that calculates the current setpoint from the start setpoint of the ramp, end setpoint of the ramp, ramp duration, and time since the start of the ramp.

This is the relevant line of code from my sketch:

setpoint = program[programID][programStep][programArrayPositionTemperature] + (program[programID][programStep + 1][programArrayPositionTemperature] - program[programID][programStep][programArrayPositionTemperature]) * (long(millis() - timestampProgramStep) / (program[programID][programStep][programArrayPositionTime] * 60.0 * 1000L) + programStepPercentPrevious / 100.0);  //Hstart + Hdelta * Tcurrent / Tstep

terryking228: - I have seen/done some datalogging. But here I need logging over several hours, and hopefully nice graphing on the PC of Temperature vs Time. Any pointers??

First you need to decide where you're going to store the data. Will it be logged on the computer? If so then how will you be communicating with the computer(serial I assume). If you're logging on the computer then the computer would need to be on the entire cycle running some application that records each data point as it is received. Another option would be to log to an SD card. If you go that route then you could either just pull the card out of the controller and read directly from that using your computer or you could send a command from your computer to the controller to dump the data from the card. I think you'll end up finding that you don't really use the graphs much beyond the initial stage of checking to make sure your cycles are running as expected and just geeking out on the cool data visualization. So I would just store it as comma separated text or the like and generate a graph in a spreadsheet program when you want one. Much more useful is to have the controller produce some sort of error log/notification if something does go wrong with your cycle. That's really all the information you need.

jremington: Spoils the fun, but you can buy little PID process controllers that do thermal ramps, very cheaply on eBay. That, a thermocouple and maybe an SSR is all you actually need for a small kiln. For example: http://www.ebay.com/itm/PID-Temperature-controller-With-30-steps-RAMP-SOAK-Option-/132034883168?hash=item1ebde46e60:g:shUAAOSwCfdXpK41

That is a very good price for a programmable controller . The amount of time and the cost of parts of a DIY controller will always make buying a commercial model more economical but there can be some great advantages to a DIY controller.

30 steps might seem like a lot but you need to realize that in glassworking you will have a different program for each different process/glass type/glass color/etc. Some programs may be over 10 steps long. Programming these controllers with their tiny membrane buttons, 8 x 7 segment display, and confusing menus is a huge pain. Any mistake could spell a huge disaster that could ruin hundreds of dollars of glass, damage your kiln, and waste a bunch of time and electricity. Considering that each step is just a temperature and a time we're talking a few bytes per step so a DIY controller can handle as many programs as you could wish for.

My experience with lower end yet reputable brand name controllers is that the firmware isn't always as reliable as you might hope for. I've had some major disasters due to bugs in commercial controller firmware but not one in my DIY controller. When I do find a bug in my DIY controller it can easily be fixed, with the commercial controller you're stuck with it unless it's still under warranty. I can also program in error logging and debugging features to make it easy to see exactly what went wrong.

With a commercial controller you're stuck with whatever feature set the manufacturer thought might be useful for the wide range of applications the device might be used for. You can custom design a DIY controller specifically to your application and adapt it over time as you find use for new capabilities.

I really like understanding every single part of my controller and being able to quickly and easily replace any part that might go bad.

Hi, Thanks! Sorry for slow response; I was travelling..

Spoils the fun, but you can buy little PID process controllers that do thermal ramps, very cheaply on eBay.

Yes, I have one of those.. But I need to coordinate 3 zones within one kiln, and Probably (I need to learn a lot more) will want to do part of the process with the "Lid" element providing radiative energy to fusing glass. I'm using the Ebay/Amazon controller as the FailSafe independent controller, set to 1800F, which I should never hit, and having it's "Alarm" output cut the main 240V supply relay. (I'll be reading those code examples.. Thanks!)

Pert, thanks for this and other help you've given.. I'll be reading the code closely..

First you need to decide where you're going to store the data. Will it be logged on the computer?

... Good points. I need to decide how much data a run could log. I am using a Mega so maybe local memeory would be ok, and dump it later.. Hmm. The SD card is probably best. I'm not using a shield for Ethernet, but a separate SD card is easy. This will probably be stepwise development. But I need the data / graphing the most during development and first few firings..

Programming these controllers with their tiny membrane buttons, 8 x 7 segment display, and confusing menus is a huge pain.

Yes! I've developed several special-purpose "Languages" over the years. A simple interpreted but readable Firing Schedule in "Kiln Control Language" is what I plan to do. So it may be like this:

KILN CONTROL LANGUAGE  V2.03 12/27/2016 terry@yourduino.com

ST HHMM Start at (24 hour time)
WA MMSS 0000 = infinite WAIT for time (Button OverRide)

SR TTTT OR AFAP Set Rate (Degrees per Hour)

RU TTTT Ramp Up at SR to target TTTT
RD TTTT Ramp Down at SR to target TTTT

HO HHMM Soak Hold at last Setpoint

AH TTTT ALARM if HIGH above TTTT
AL      TTTT ALARM if LOW below TTTT

VC ???? Vent Control: Kiln Vent

EN 0000 END; Power off

MS CCCC Display/Log Message (4 char)


EXAMPLE 1 Advanced Full Fuse from SYSTEM96  22*6= 132 Bytes

WA 0000 Wait for user button start
SR 0250 250 Degrees/Hr
RU 0250
HO 0030
RU 1050
HO 0100
RU 1250
HO 0020
RU 1360
HO 0020
SR 0300
RU 1465
HO 0010

SR AFAP As Fast As Possible
RD 0950
HO 0100
SR 0200
RD 0800
HO 0010
SR 0300
RD 0100
EN 0000

6 bytes per step, and easy to interpret...

OK, I gotta slow down and Read The Code. I worked with a guy at IBM who had over 100 patents. He would start a project meeting with, "OK, first thing is, what have other people been thinking about with this? It's dumb not to use a good idea, just because it wasn't YOURS!"

UPDATE After beginning research on multi-zone kilns, I have added a command to set the proportioning of power input to the three zones: Top, Mid, Bot

EP 0333 Set Element Power Proportioning Lid-Mid-Bot

This takes 3 integers [0..9] and finds a proportion value for each zone.

Hi,

The Common Ground Point and Optical Isolation worked! When I had my major flash-bang-100-amp-short-circuit (see above) the Arduino Mega and components survived with no damage.

Update: The kiln was received and set up. Rewired to new controller. Running 2 zones: Main and Lid, each 240V 12 Amps. The controller runs both well and different duty cycles.

No EMC problems apparent: Ran several hours at 5% duty cycle with both elements constantly power on and off.

Next: Type K thermocouples and then more software development.

Updated the WIKI info.

Hi, Terry. Seems to be quite a large project! I am close to finishing a conversion of a 1950's 500 watt dryer oven to Arduino control. The biggest problem was getting the initial heating of the oven. The heat elements are in steel with fins all over them. Big lag time between applying power and getting heat to the temp sensor. We are looking for 85C for circuit board drying and 125C for IC baking if we need it, and then maintaining 4-5C at the set point.

Good luck with your oven!

Paul