Jump to content

Geeks only - Raspberry PI controlled kiln


jbruce

Recommended Posts

I got tired with going down to the basement to make sure my kiln was working properly and running on schedule so I started (forked) a project to control my KS-1018 using a raspberry pi. With this I can:

  • monitor my kiln from anywhere using any device that has a web browser (phone/tablet/computer)
  • easily create new schedules, edit existing schedules, including infinite ramps & soaks
  • accurate PID control
  • get schedule cost estimates and actuals

If anyone is interested, here is the github link... https://github.com/jbruce12000/kiln-controller

The cost for everything I bought was under $200.00, but my time investment has been high.  Again, this is for geeks that were born with a soldering iron in one hand.

Edited by jbruce
Link to comment
Share on other sites

I like your idea. Did the same for a studio in Illinois and they get great use in teaching. One thought, I created it with PLC so fairly cheap, off the shelf, web enabled, remote enabled, data storage ........ blah, blah, blah. But less time developing!

I chose to make them control their kiln manually as they reduction fire and the accuracy, liability and cost for accurate feedback in an old kiln was unacceptable to me. As a teaching and learning aid I have found it vastly superior.

if firing an electric, then likely no issues and knowing PID programming will likely make this very accurate. I did some research on correlation with cones and can say that the last 200- 250 degrees of firing controlled rate approach is likely the simplest in my view. Look at the Bartlett schedules, they have done this for so long they really simplified this.  You might get some ideas.

With respect to liability, it is a real valid concern in my view.

 

8905C9FB-238F-4E33-BE06-D89FA7329B2E.jpeg.91ebda19e9d21b5de30985586129a3f6.jpeg

Link to comment
Share on other sites

Hi Bill,

Cool project! and great to meet you.  That looks like a lot of work too!  So, you're regulating a gas kiln!  What kind of regulator/actuator do you use to control the gas pressure?

My kiln is an old Skutt kiln sitter so it is electric. I hope to have the kiln firing in the next two weeks.  We'll see how busy things get with the holidays coming up.

 

Thanks for the suggestion on Bartlett schedules. I'll check them out. I've found a couple schedules and they all advocate a slow approach to the final temperature.  I plan to soak for as long as it takes for the witness cone to reach 90.

 

Everything in the project is released under the gnu gpl license, so liability will not be an issue for me (as far as others using the code or ideas in github).  If I was to implement this for say... a school... especially if I charged for my work, I could be held liable... but this is my personal kiln.

Link to comment
Share on other sites

16 minutes ago, jbruce said:

Hi Bill,

Cool project! and great to meet you.  That looks like a lot of work too!  So, you're regulating a gas kiln!  What kind of regulator/actuator do you use to control the gas pressure?

My kiln is an old Skutt kiln sitter so it is electric. I hope to have the kiln firing in the next two weeks.  We'll see how busy things get with the holidays coming up.

 

Thanks for the suggestion on Bartlett schedules. I'll check them out. I've found a couple schedules and they all advocate a slow approach to the final temperature.  I plan to soak for as long as it takes for the witness cone to reach 90.

 

Everything in the project is released under the gnu gpl license, so liability will not be an issue for me (as far as others using the code or ideas in github).  If I was to implement this for say... a school... especially if I charged for my work, I could be held liable... but this is my personal kiln.

No control, only monitor for  liability  reasons. If we were to take control all the factory safety would remain and we would use standard linear actuators for the dampers (spring return and travel maximum limitited)  and spring return rotary for the existing hand operated gas valves. We also  monitor kiln pressure, gas pressure, upper and lower temperatures and oxygen. . All the temperatures are standard thermocouple (k type existing)  except for the S type built into the O2 probe. All of those are standard current loop with transducers  for accuracy and the distance to the monitor. We decided NOT to control the kiln for liability reasons and to force folks to learn how to  properly manage their firing.  The monitor is a great aid for them to learn by seeing and doing as well as recording their data or serving the screen you saw up on their IPad, Android, remote monitor etc... it truly has sped up the learning curve for all who have used it. I no longer have to show them how to calculate their rate using their smartphone timer. 

When I have automated large machines in the  past  I have always relied upon the factory operation controls provided and all the designed safety’s to avoid designing my own safety scheme. If there was a start switch I simply had the automation enable it with the existing stop and safety circuits intact and in ultimate control.. I suggest you do the same with your kiln control on your personal kiln and for sure any you might install for others.

as an example, I would maintain the existing kiln sitter if present and enable through a relay. If the kiln had a safety timer this would remain in series as well else I would need to redesign and theoretically get my safety systems approved by UL, CSA , NFPA, etc..... systems that have been approved have already been thoroughly tested by these agencies to qualify.

just a thought on safety and reliability. Sounds like fun though the Arduino is very attractive.

 

A little background on me I was fortunate enough for 20 plus years to teach part time at a local junior college and even authored a couple courses in DDC ( direct digital control) in the early days of HVAC automation, so this has been a professional interest for some time. PLC stuff is old but widespread, cheap and reliable so my decision to use PLC was an easy one.

best of luck with your project and stay safe.

Link to comment
Share on other sites

Thanks with regards to safety.  I'll continue to use both the kiln sitter (with one cone above intended firing temp), and safety timer so that I don't burn down the house.  When solid state relays fail, they usually fail with a short circuit... so the kiln get's full power.  The safety I have in place today is...


1. warning if temp is N degrees outside of schedule

2. software shutdown if max temp limit is reached

3. kiln sitter

4. kiln timer

and of course walking down to the basement to check near end of schedule

 

 

Edited by jbruce
Link to comment
Share on other sites

Google error codes for Skutt or L&L and you'll see that there are a ton of error codes that will shut the kiln down.  Most are there so that the kiln doesn't try to keep firing when it's not able to, wasting time and electricity. The commonly seen is Error 1, which simply means the kiln isn't getting hot as fast as the program wants it to. Most of the others are variations of that, with slightly different parameters like whether or not it was during a ramp or cool or hold. Other important codes are if the kiln is hotter than it should be, or one section is hotter than it should be, which indicates a relay that is stuck in the 'on' position. Shutting down the firing with the controller won't stop the stuck relay, but it will shut down the other relays, which will usually prevent an overfiring situation. If you're using a single relay system in an external controller, though, it's not going to help, so second 'safety' or main power relay would be good.

Link to comment
Share on other sites

52 minutes ago, jbruce said:

Thanks with regards to safety.  I'll continue to use both the kiln sitter (with one cone above intended firing temp), and safety timer so that I don't burn down the house.  When solid state relays fail, they usually fail with a short circuit... so the kiln get's full power.  The safety I have in place today is...


1. warning if temp is N degrees outside of schedule

2. software shutdown if max temp limit is reached

3. kiln sitter

4. kiln timer

and of course walking down to the basement to check near end of schedule

 

 

Just a quick note. Orton  cones will fall at their prescribed temperature if they fire at a certain rate within approximately  the last 250 degrees of the  firing. The common way to manage this is to create a cone table and reduce the speed of your firing accordingly during this period. A 108 degree per hour last segment is common but Orton produces data  for 68 degree per hour through 270 degree per hour final firing rate.

cones are actually glaze with a flux ratio of approximately  0.3:/0.7 rated approximately 6 cones below maturity. I believe Seeger actually developed the cone theory and Orton simply brought them to the States.

the point being  calculating actual accumulated  heat work is pretty difficult  throughout an entire firing. Most pottery wares are fired at a maximum rate to limit cracking and heating unevenly at too high of a rate for common wares. There is also a practical limit to maturing glazes and claybodys  wherein they will not mature as intended unless given enough time for the silica and alumina to fully mature. Remember Silica and alumina do not melt without flux below 3000 degrees so time at a particular temperature is very relevant.

the point of all this is that most computerized controllers rely on cone tables and some established rates  to simplify their calculated outcomes and adjust their pid parameters according to the thermodynamic range of a particular kiln. (Thermal mass , available input power, radiation rates for a given size kiln and elements installed) at the top end of firing radiation then conduction are the main components in heating.

At those temperatures the atmosphere is very thin and convection does not provide a significant path towards getting this energy to the pots. Hence when you pull a port plug at 2000 degrees, no blast of air outward is encountered in an electric kiln. Convective paths do still provide a free path for heating so offset stacking  etc.... is still usually the suggested loading norm to keep zones as even as practical. Offset stacking actually provided a radiant path as well. 

I bring all this up because using the cone table approach and slowing your firing down in the last approximate two hours of firing is an easy way to get your kiln to end at the desired cone. I also bring this up because I encounter many folks who have intuitive ideas about kiln operation, usually good, but not always correct enough for computer control.

glad to hear you have the factory timer and cone sitter in series. Neil is correct in that there can be many reasons to abort a firing for convenience and cause and stuck relays (closed), while not nearly as common as open, do happen. If you ever use a solid state relay they can fail closed (more so) as well and require another form of positive disconnect to ensure safety. Usually a main contactor for power to the kiln relays, including lid switch and manual operator reset after the safety circuit trips.

Bartlett for years has produced their base V6CF controller for almost every common major kiln manufacture that you can think of rebranded by the manufacture with minor alterations in keyboard placement etc.... You might want to google their new Genesis controller and look at the firing schedules in their manual. They are extensive and include glass and other interesting schedules. A nice resource for sure.

still best of luck, sounds like a boatload of fun learning about and creating something that will no doubt help you in future firings. Hopefully all my bloviating will save you some program and discovery time.

Link to comment
Share on other sites

I test fired my kiln with the new controller to 1000F last night.  It included some fast ramps of 1200F/hour to 800F and from there 600F/hour to 1000F plus a soak of a few minutes.  This was just to work out any glitches before I do a bisque fire.  The software is configured to run every 2s and I grabbed some stats from that...

average error in degrees F 0.7665486726
solid state relay cycles 977
schedule length in hours 1.00
elements on (s) 1934.91
element percent on 53.75
element watts 9640
cost per kwh 0.126
schedule total cost $0.65

I'll pack the kiln today and bisque fire tomorrow.  I'll post details after that.

Link to comment
Share on other sites

On 12/15/2018 at 8:20 AM, jbruce said:

I test fired my kiln with the new controller to 1000F last night.  It included some fast ramps of 1200F/hour to 800F and from there 600F/hour to 1000F plus a soak of a few minutes.  This was just to work out any glitches before I do a bisque fire.  The software is configured to run every 2s and I grabbed some stats from that...

 

average error in degrees F 0.7665486726
solid state relay cycles 977
schedule length in hours 1.00
elements on (s) 1934.91
element percent on 53.75
element watts 9640
cost per kwh 0.126
schedule total cost $0.65

I'll pack the kiln today and bisque fire tomorrow.  I'll post details after that.

How did it go? I'm very curious because I recently got a kiln with a kiln sitter and would like to do controlled cooling in the future.  Am handy with programming and willing to learn the electronics, already have a pi

Link to comment
Share on other sites

Firing went well. It was a slow bisque fire.  Here are the stats...

schedule name cone-05-long-bisque-no-evap
schedule date 12/17/2018
average error in degrees F 0.74
solid state relay cycles 11249
schedule length in hours 13.35
elements on (s) 22197.33
element percent on 46.19
element watts 9640
cost per kwh 0.126
schedule total cost $7.49

I'm really happy with the PID accuracy.  The stats above include the thermocouple spikes, so the actual average error was less.

Here is a screenshot after the schedule ended.  I stopped it 12 minutes into a soak at 1888F.  This is when the cone 05 cone was almost touching the shelf.  In the screenshot, the kiln has already cooled a few hundred degrees.

bisque.png.cfce21387ccdc5c3d5bd59c7caa2be7f.png

I had some problems with thermocouple noise as you can see in the downward spikes shown in the graph.  I need to work on fixing that.  Also had some strange thermocouple errors in the last 100 degrees that I need to investigate.  The software is dependable.  I connected three computers, my phone, and my tablet to the rpi during the day and no glitches or problems with it.

 

I did realize I'm eventually gonna need to add a new feature to restart at a specific point in a firing.  I need to think about how I want to code that for the next couple days.  I need this in case I accidently hit the STOP button, or if there is a power outage.

Link to comment
Share on other sites

11,000 relay cycles, is that ok?  How many cycles are they generally rated for?  Might want to see if you can get away with floating average instead of being super precise.  Is it because it was a slow firing with the elements crAnked to high?  Surprised how cheap those relays are, this is something I'd like to do, where was the cost of 200 dollars to you?  

Sorry for all of the questions, thanks.

Link to comment
Share on other sites

Pretty nice data! I will look at noise issue, seem to remember reading  type K and Rasberry Pi . Fairly small voltages so twisted pair in a shield (single end ground) might remove enough for a short run. I am not that guy though and have resisted these things in favor of PLC and temp  controllers.

  • 46% duty cycle looks nice to me.
  • pid error looks great (is this indicatative of Pv vs Sv?)

I would be curious of the temperature rise across the SSR for general heat sink sizing and  if pulse width modulated, is this a zero crossing SSR? Seems minimum cycle width would be 1/2 cycle with a max freq. of 120hz.  I am not an SSR guy though so most of this stuff maybe sorted out already. 

Finally - yes, restart for a number of reasons always addressed in almost all processes especially thermodynamic ones.

This is really nice, I am pretty lazy and have utilized off the shelf controllers and have recently been looking at WiFi enable stuff for an economically viable kiln control with web interface and logging. Right now still hundreds of dollars and hard to compete with the Bartlett genesis drop in approach using existing relays and multiple zones.

Looks great so far, thanks for sharing!

Link to comment
Share on other sites

1 hour ago, liambesaw said:

11,000 relay cycles, is that ok?  How many cycles are they generally rated for?  Might want to see if you can get away with floating average instead of being super precise.  Is it because it was a slow firing with the elements crAnked to high?  Surprised how cheap those relays are, this is something I'd like to do, where was the cost of 200 dollars to you?  

Sorry for all of the questions, thanks.

Relays cheap, almost always need decent heat sink and the probability that they can fail  (shorted) in general requires fail safe electromechanical safety so that usually adds to the cost. A slick pseudo method has been to safety enable the existing kiln relays and feed the SSR downstream. We  Often  see a kiln lid switch inserted in series with this circuit as well. Everything in this loop is generally powered to be safe, interruption anywhere in the safety circuit stops the kiln and terminates the program. Manual operator reset and restart required for many errors accept maybe power outage. 

  I think this relay is pulse width modulated and fires at zero crossing. Right now it appears he is firing 11000 cycles over about 48000 seconds or let’s say one cycle every four seconds average. This is a pretty slow thermodynamic process with a lot of  thermodynamic inertia. At just short of 10,000 watts available heating I would be surprised if this does become an issue. Just a gut feeling though, his data will direct him.

Edited by Bill Kielb
Link to comment
Share on other sites

I'm not really worried about the number of SSR switching cycles. SSRs use a few really large transistors to switch the current on & off, so as long as you keep them cool, that is what they are designed to do.  My particular SSR is zero crossing, so this also reduces wear and tear.

The cycle time I use is two seconds and can be changed in the config file.  Every 2s, a decision is made about how long to turn the elements on for that interval.  Sometimes the elements are not on at all, sometimes they are on for the whole two seconds.  If you were genuinely worried about switching cycles, sensor_time_wait is the number to change.

Not sure about the elements being "Cranked too high".  The elements are all set on high using existing switches on the kiln and controlled by software / SSR.  If the set value is 250F, the elements are turned on every 20s or so.  If the set value is 1888, the elements are on a little more than half the time.

Here are the things I bought:

  • rpi3 with power supply = $48.99 (you could get an rpi zero with a header here for much less)
  • max31855 thermocouple amp = 15.69*2 = $32 (blew one up)
  • gpio breakout board = $8.00
  • k type thermocouple = $30.00
  • 50 amp ssr = $23.50
  • leviton 50amp nema 6/50 female connector = $13.00
  • eaton nema 6/50 male connector = $12.00
  • aluminum bud box = $35 (you could use something smaller here, but this acts as a partial heatsink for my project.  big aluminum boxes love to absorb heat!)
  • package of 300 transistors = $8 (only 299 left to use)
  • package of random resistors = $7 (only 996 left to use)

for a total of $217 if my math is right.

Hi Bill, yes, the average error in degrees F listed in the stats is the average difference between the PV and SV recorded every 2s during the schedule.  I'm not using PWM, just simple on/off for 0 to 100% of every two seconds. It is a zero crossing relay which helps reduce noise caused by switching high currents.

I think if you really squeezed the budget and bought just what was necessary from the cheapest sources, you could make this for $100, but some of these components offer convenience or peace of mind or extras that I will use later.

Link to comment
Share on other sites

@liambesaw

The Picker SSR I chose to use does not have mean time between failure (mtbf) information on their spec sheet.  They mention UL testing at 100k cycles, but have no details.

If you want to believe Crydom, the largest SSR manufacturer, they estimate 2 million hours as their MTBF.  This would be for an SSR under consistent use and switching often enough to minimize expansion and contraction of components inside the package.  Two million seems a little high to me, haha, 228 years.

So, worry about other things, like safety.

Link to comment
Share on other sites

I found sometimes the MAX31855 spits out NAN when reading the thermocouple. Were they the kind of errors you were getting? @jbruce

Have you seen the MAX31856 chip that can be used with all thermcouple types? https://www.adafruit.com/product/3263

Edited by High Bridge Pottery
Link to comment
Share on other sites

13 minutes ago, jbruce said:

I'm not really worried about the number of SSR switching cycles. SSRs use a few really large transistors to switch the current on & off, so as long as you keep them cool, that is what they are designed to do.  My particular SSR is zero crossing, so this also reduces wear and tear.

The cycle time I use is two seconds and can be changed in the config file.  Every 2s, a decision is made about how long to turn the elements on for that interval.  Sometimes the elements are not on at all, sometimes they are on for the whole two seconds.  If you were genuinely worried about switching cycles, sensor_time_wait is the number to change.

Not sure about the elements being "Cranked too high".  The elements are all set on high using existing switches on the kiln and controlled by software / SSR.  If the set value is 250F, the elements are turned on every 20s or so.  If the set value is 1888, the elements are on a little more than half the time.

Here are the things I bought:

  • rpi3 with power supply = $48.99 (you could get an rpi zero with a header here for much less)
  • max31855 thermocouple amp = 15.69*2 = $32 (blew one up)
  • gpio breakout board = $8.00
  • k type thermocouple = $30.00
  • 50 amp ssr = $23.50
  • leviton 50amp nema 6/50 female connector = $13.00
  • eaton nema 6/50 male connector = $12.00
  • aluminum bud box = $35 (you could use something smaller here, but this acts as a partial heatsink for my project.  big aluminum boxes love to absorb heat!)
  • package of 300 transistors = $8 (only 299 left to use)
  • package of random resistors = $7 (only 996 left to use)

for a total of $217 if my math is right.

Hi Bill, yes, the average error in degrees F listed in the stats is the average difference between the PV and SV recorded every 2s during the schedule.  I'm not using PWM, just simple on/off for 0 to 100% of every two seconds. It is a zero crossing relay which helps reduce noise caused by switching high currents.

I think if you really squeezed the budget and bought just what was necessary from the cheapest sources, you could make this for $100, but some of these components offer convenience or peace of mind or extras that I will use later.

Looks pretty nice!

I am still curious how hot the SSR gets since we have been debating on retrofitting a kiln or two with ssr replacements downstream of the existing relays. The relays would only serve as an enable during operation or a positive means of disconnect under alarm. My limited research has always indicated the use of a fairly significant heat sink install.

Your SSR I believe is rated at about 12000 watts controlling approximately 10000 watts of load so not grossly over sized. At this point it looks like you could fire and be successful with about 6000 watts of power - interesting!

snce this is zero crossing it should be kinder to the elements  since no 177v peak starts, ever!

two thoughts:

  • do you currently have shielded cable for the thermocouple leads?
  • did you install fuse protection for the SSR

occasionally in some kilns it is possible to have an element short depending upon how much they have been allowed to crawl out and where they touch.

 

Link to comment
Share on other sites

I'm getting two errors, both thermal related and increasing in frequency with temperature.

  • Thermocouple short to ground (starting at 1657F)
  • Thermocouple short to Vcc (starting at 1832F)

I'm sure I don't have either a short to ground or vcc. It's something else. I need to go back and read the spec sheets for the Max31855K.  I've read they recommend using capacitors on the thermocouple.  Maybe that's the problem?

Edited by jbruce
Link to comment
Share on other sites

@Bill Kielb I have the SSR attached to an aluminum bud box with thermal paste in between.  With the elements 100% on, the temperature of the box is just warm, not hot.  I have not measured this temperature.

I don't have shielded SSR leads.  I used the leads I got from auber instruments with my thermocouple.  I've read that I can:

  • use shielded leads and ground the cold side
  • twist the leads once every 2 to 6 cm to reduce noise

I don't have fuse protection on the SSR. There is fuse protection on the circuit feeding the kiln rated at 50A.  It's likely that my SSR would survive a kiln element short.  The SSR UL testing shows 100k cycles at 50A resistive load.

Link to comment
Share on other sites

Old general filter was to add a small rc filter network to both legs of the thermocouple. They needed to be identical to offset the error and also needed decent capacitors. I was hoping shielded thermocouple would solve your noise issue. Hard to tell from the data you have what magnitude the noise is but likely microvolt average on a .6 to 52 millivolt signal..

Does the thermocouple board auto detect shorted and open circuit thermocouple failures? I only ask because in PLC land temperature transmitters do this for us so we need not have to worry.

all still looks great BTW, under three hundred with a decent web server interface! Cool!

Edited by Bill Kielb
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.