Jump to content
jbruce

Geeks only - Raspberry PI controlled kiln

Recommended Posts

I'm glad you came here to collaborate, this is a great place do it!  As you know, one of the main reasons developers choose to make their software open source is to draw on the knowledge and abilities of a community to make the project better, the same can be said of the hardware in this case.  I'm excited that this has the potential to turn my manual old 75 dollar kiln into something I can control as well as a newer 2500 dollar kiln.  I'll be doing this project eventually and without you coming here, sharing, and being humble and open to criticism, it just wouldn't happen.  So thank you!  And thank you to everyone else who has contributed here!

Edited by liambesaw

Share this post


Link to post
Share on other sites

@jbruce

just my opinion, still a nice project, alpha stage as you say and has brought forward many suggestions. In the end these are all opinions and one can argue often informed by different life experiences and backgrounds.  Folks offering advice based upon their experience is always valuable in my opinion and can help  shed new light on a particular issue or simply be dismissed as being incorrect which usually can be disproven or tested to invalidity.

I am not a big fan of adding exculpatory clauses to everything that I may say or others may say to protect an opinion. I have struggled with this in teaching at the college level in that it tends to stifle creativity, critical thought and the energy to take on new things.

I think sharing your experience and getting quality feedback or opinions from a diverse group has value. Asking moderators to be accountable to correct incorrrect opinions is impossible. Knowingly providing misinformation is key here.

to me you are on a good path and now hopefully will put more energy and research into taking the project to beta stage and folks can continue to provide conscientious criticism or suggestions.

My opinion, project is fine, moderators fine, everyone with a concerned opinion fine. 

Just my thoughts though

 

Share this post


Link to post
Share on other sites
1 hour ago, Bill Kielb said:

@jbruce

Asking moderators to be accountable to correct incorrrect opinions is impossible. Knowingly providing misinformation is key here.

 

It's not that we are held accountable, we're just supposed to do our best to make things safe, based on the knowledge we have. We aren't expected to know everything, and the terms of use say to use the information on the forum at your own risk. We're just trying to make it less risky.

@jbruce I still think this is a great project, and like I said before, it's even better because we are discussing the safety issues. Carry on!

Share this post


Link to post
Share on other sites
On 1/11/2019 at 3:52 PM, jbruce said:

@High Bridge Pottery Are you deciding if you should turn the relay off or on every 2 seconds?

Yes.  This is a configurable parameter. The code originally made this decision every .5s and that duty cycle was too high for kilns.  I have heard some folks going as high as 10s.  Since it is configurable, you decide the value that works best for your kiln.

How did you come up with the PID values to use?

I read many articles discussing PID tuning.  Some were complex algorithms, some simple.  I tried to find the simplest method that could be done in a few hours.  The process I used is described here... https://github.com/jbruce12000/kiln-controller/blob/master/docs/pid_tuning.md

The tuning it provided the first time around is good for my use.  If you find a simpler, better tact, post a PR and I'll check it out.

I read a few things on pid tuning and was very confused on what to do, the one you posted looks a little easier for kilns specifically. I just ended up using the pid code to read the temperature difference from setpoint + actualtemp with  p=1 i=0 d=0. 

Does 2 seconds not get the relay to cycle on and off a lot? Maybe that has a lot to do with my pid use :lol: I ended up deciding every 60 seconds if the power should be on for 1/6th of the 60 seconds up to 6/6th. That got things to work pretty well and only turn on and off once in 60 seconds.

 

Share this post


Link to post
Share on other sites

PID loop tuning is a bit of an art and understanding the thermodynamic lag within a system is helpful. There are several ways to approach this and there has been two basic formulaic approaches  over many years. Many devices with pid control provide auto tune functions. Often a stand alone pid auto tune can be used to develop data that otherwise is tedious to do manually.

an effective article published by Omega engineering is here: https://www.omega.com/temperature/z/pdf/z115-117.pdf

it is generally viewed by those not accustomed to working with these processes as tedious and difficult.

Good PID loop tuners are still hard to find in the real world.

an interesting observation: the Bartlett controller currently in many kilns has an option for SSRs in their gen 700 and above controllers. Their relay cycle time I believe is once every 200 milliseconds. Early on in this thread I asked if these were zero crossing and if so, this along with some reasonable time addded for delays likely establishes the bare minimum switching time.

Tuning a pid is not necessarily how fast your switching loop is,  or how fast you can turn something physically on and off, it is more about the thermodynamics  and thermal inertia of the entire system.

ultimately no matter the method, we do not want significant overshoot, oscillation or excess undershoot.

Edited by Bill Kielb

Share this post


Link to post
Share on other sites

@High Bridge Pottery With a cycle time of 2s my controller switches on about 11,000 times in a 13 hour firing.  I'm not sure what "a lot" means to you.  I'm not worried about the number of switching cycles - as long as I keep my SSR cool - it will have a long life.

If you're switching using a mechanical relay or contactor, I would set the cycle time to at least 10s.  I'm not sure about 60s... I'd have to test that.  By experience, my kiln drops a F degree per second when not being heated at 2000 degrees or more.  Setting a cycle time of 60s means the temp swing could be 30-40 degrees or more.  I want to be more precise than this.  I think a 3  degree swing is acceptable.

Edited by jbruce

Share this post


Link to post
Share on other sites

A lot to me is just more than my old commercial kiln would click the relays. I am using mechanical relays so I guess it is much easier to hear it. Do you think as long as you can keep it cool then there is not much to worry about with SSR's?

In this picture you can see my test, it does wobble a little on the climb so could be much better but it is pretty close. It does get worse as it goes up and I have never tested past 900c so some tuning is needed. I just had no idea how so bodged this way. The big rise/drop is because I didn't code going from on for 60's to off for 60's right and it stuck on so I pulled the control wire. That setup was one big safety issue in the corner of my bedroom. Only tried once, it gave me a headache. 

421632263_Screenshotfrom2018-05-0122-43-12.png.235ddac7ab5a222379496a4b907f53ab.png IMG_0938.JPG.c68ff783b004f28603bfcf6beac61acc.JPG

 

Edited by High Bridge Pottery

Share this post


Link to post
Share on other sites

I think a cooled solid state relay will have long life.  Wear and tear on SSRs is mainly from heating (expansion) / cooling (contraction) of the components in the package.

The increasing amplitude of the waveform as your kiln gets hotter is due to cooling because of the 60s cycle time.  A faster cycle time would be harder on your mechanical relays, but would yield more accurate ramps / soaks.

 

WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!

  • running a kiln in an enclosed space is extremely dangerous.  some fumes are noxious. please dont.
  • running a kiln within 8 feet of anything flammable is extremely dangerous.  please dont.

WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!

 

This is the pot calling the kettle black (because I made some mistakes too), but the best thing you could do if you choose to run this in its current location & state is to automate a call to 911 when it starts. :-)

Share this post


Link to post
Share on other sites
1 minute ago, jbruce said:

 

WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!

  • running a kiln in an enclosed space is extremely dangerous.  some fumes are noxious. please dont.
  • running a kiln within 8 feet of anything flammable is extremely dangerous.  please dont.

WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!

8 feet eh, I dont think my kiln would fit anywhere on my property haha, my plate says 10 inches from flammables, that's kinda like 8 feet!

Share this post


Link to post
Share on other sites

Interesting thought, our gas kilns are in a dock and as such occasionally garbage cans are rolled in waiting to be thrown out which immediately attracts more cardboard boxes, etc... Folks most comfortable with firing have done it so many times often have to be reminded to police this entire are before lighting up one of these kilns. Their comfort level has made them somewhat oblivious. So awareness and training always goes hand in hand with proper design but complacency often leads to true accidents.

Most folks have trouble with ventilation as well so in addition to fumes, they often fail to adequately account for waste heat in an enclosed area. I just went through this issue with a new anagama installed in a barn. Folks just don't have a good idea of the waste heat and heat by radiation is often a giant mystery. We see this with folks who do not understand the major role radiation and conduction play late in firings and how convection becomes very minor until we point out that you can pull a kiln plug at 2000 degrees on your electric kiln and not get a blast of hot air out of it.

When I was teaching I would take an ordinary thermometer and show that as long as the glass bulb could see the glowing element it was recording much higher temperatures than just the ambient air around it. Instant infrared confirmation!

Share this post


Link to post
Share on other sites

I shoot for 18 inches from flammable walls, 12 inches from concrete. Wood floors are okay if you put down two layers of cement board that extend at least a foot beyond the edge of the kiln.

I once worked on a kiln at a school that was on a carpeted floor in their paper storage room. We had a nice discussion about not endangering the lives of hundreds of children. The worst part, though, was that the manual for their old kiln didn't say anything about what type of flooring the kiln should sit on.

When I built my gas kiln at my last shop, the fire marshal and building inspector didn't care at all about the safety systems on my kiln burners, probably because it was a concrete free-standing building. What they did care about, however, was the venting system. They considered air quality to be much more of an issue than the flame, because it can hurt/kill you without you realizing it.

Share this post


Link to post
Share on other sites

Great project!   I'm really enjoying following along with your progress. ;)    

Just some comments from an artist (not an electrical engineer);   the metal box to me looks very scary if it's not grounded.  My kiln draws ~22 amps and I made sure the exposed metal sides of the kiln has a good ground path to earth that will easily dump enough current to allow the main breaker to go. (checkout ground bond testing)

It looks like the AC power runs very close to the TC cable?   to reduce noise you could try and keep the AC line away from the TC cable and also using a shielded TC cable.   The TC anomalies (open / short) could be linked to the i2c  library?  the library not accounting for clock stretching maybe?    as a workaround you could discard the values and perform another couple of temperature readings after a short delay and only branch your logic if multiple bad readings are present.

When i built my own controller I too was getting noise;  what I did was i took a few TC readings and discarded the upper and lower values,  then I did a check to see if the readings were stable within a +- 1c value;  if not,  I output a buzzer tick noise;  this greatly improved my temperature readings,  and what I noticed was on odd occasions and when my hot water boiler came on the ignition caused a lot of noise on the TC wires,  the noise was enough to throw a reading wildly off, but with the software error correction logic it simply just waits a couple of powerline cycles and takes another series of samples,  this for me works really well. 

When I read up about PID for my own controller I didn't really understand it, so i just rolled my own code;  I can't remember exactly how it works without checking the code but 
the thermal hysteresis for me was only an issue at the kilns lower temperatures,  after the kiln got hot it wasn't an issue, so my code logic just switched to a different mode when the kiln hits a certain temperature.
 

Not sure if that was helpful lol but keep up the great work!

Edited by Ju00Ls

Share this post


Link to post
Share on other sites

Might be the only way. He was getting RFI when he logged in to the web server. Typically this high freq. stuff is filtered just ahead of the differential amplifier for the thermocouple. Since this is a board he purchased it would be hard to add your own filter and they should have a scheme in place that filters this out based on the chip series they are using. I believe he tried twisted pair at this point but if MHZ stuff, not likely to be removed by twisted pair.

your way might be a reasonable practical way to ignore the noise.

Edited by Bill Kielb

Share this post


Link to post
Share on other sites

@Ju00Ls Hi. Glad you're following and glad you're no longer just a lurker.

The metal box looks scary, but it is grounded. Aluminum boxes are common for electronics projects.  In this case I chose it for its thermal properties and ability to quickly absorb lots of heat and transfer it from the SSR.

The high voltage/high current cable is close to the thermocouple, but I'm not getting noise from that.  The noise I'm seeing comes when a client connects to the server running on the PI.  I believe that connections cause a spike in the processor which draws more current which impacts the 5v power supply connected to the PI.  I think the problem is easily solved by using a larger PI power supply. This is a common PI problem. I have not proven this theory because the TC noise has zero impact on firing.  The primary reason it has not had an impact is that the software reads the TC five times during it's duty cycle (2s by default) and uses the highest value.

PID control is fascinating.  Spend some time up front to tune it, and it stays amazingly close to the set point.  All I keep thinking about is my wife's oven and the fact that it varies like 50F from the set point. To have such fine grained control and oversight of a kiln that a few months ago was just "Low, Medium, High" is awesome and has given me the ability to learn from mistakes faster by gathering lots of evidence with each firing.  Having control over cooling of the kiln is nice too.  I've never worked with crystalline glazes, but I'm already seeing small crystals and more character in the pieces I've glaze fired.  Maybe I'll do crystalline glazes someday.

It's also nice to be able to start a firing automatically on a schedule I choose using the api.  I can also stop and restart at any point in a schedule which has been useful for skipping the last part of a soak you don't need [because the cone is at perfect 90]... or conversely going back to the beginning of a soak because it was about to start cooling and the cone wasn't quite perfect.

I have a 19 lb Maine Coon named Snickers.  What's yours?

Share this post


Link to post
Share on other sites

@jbruce     Great stuff!   I only mentioned the ground as I couldn't see any ground in your pic, so I thought I would just mention it.

Yes,  it is such great fun controlling a kiln, the most enjoyable bit for me was the first ever firing,  and taking the pieces out the kiln ;) 

lol, that's a huge cat!   the pic is our Russian blue but we also have Siamese.  

yes, I do tend to "lurk" but only because i'm a bit dyslexic so I don't particularly enjoy reading or writing;   thankfully coding and glancing over a few ic datasheets doesn't really count.  lol

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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