Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emergency_shutoff_temp doesn’t currently shut off heaters? #17

Closed
tanaes opened this issue Apr 12, 2021 · 48 comments
Closed

emergency_shutoff_temp doesn’t currently shut off heaters? #17

tanaes opened this issue Apr 12, 2021 · 48 comments

Comments

@tanaes
Copy link

tanaes commented Apr 12, 2021

Amazing project! I'm thinking about implementing this for one of the kilns at our maker space.

I was browsing the code, and noticed that although there is a emergency_shutoff_temp wisely defined with a note that SSRs can fail closed, it looks like all this does when tripped is to reset the Pi, which if I understand correctly would leave heater energized via the failed SSR.

If this is indeed the case, what about adding a failsafe mechanical NO relay that is controlled from the RPi via a GPIO pin only enabled on successful startup?

If I'm missing something and this would be redundant let me know, otherwise I'm happy to submit a PR with the functionality if we implement it.

Thanks for sharing this great project!

@Giterd
Copy link

Giterd commented Apr 12, 2021

Related to this request, to avoid the "run forever" scenario, can a timeout feature be included? My Paragon kiln controller does this, from its manual:

FtL / Fired Too Long
This message appears when both of the following conditions are met:
■ The temperature rise is less than 27°F / 15°C per hour.
■ The firing is 2 hours longer than programmed.

From config.py:

"# If the kiln cannot heat or cool fast enough and is off by more than
"# kiln_must_catch_up_max_error the entire schedule is shifted until
"# the desired temperature is reached. If your kiln cannot attain the
"# wanted temperature, the schedule will run forever.
"kiln_must_catch_up = True
"kiln_must_catch_up_max_error = 10 #degrees"

@murraycs
Copy link

The optimal solution is to have a physical backup that is unrelated to the Pi, similar to what some Kiln Masters include. Twist a dial timer, and when it ends the kiln shuts off. Additionally, having a cone set on the physical switch is also advisable. Relying entirely on software for a fire hazard is risky at best.

@Giterd
Copy link

Giterd commented Apr 12, 2021

I agree that a hardware shutoff is good practice. I would still like the software timeout, to provide redundancy.

@tanaes
Copy link
Author

tanaes commented Apr 12, 2021

Thanks for the great ideas! The advantage of having a normally open mechanical relay 'deadman switch' is that it must be actively engaged by Pi, so in the event of either a failure detected by the controller (e.g. SSR stuck on) or a failure of the controller, it will not energize the heating circuit. (I suppose that it is technically possible that the transistor controlling the relay and the SSR would simultaneously fail closed, but that's rather far down my list of concerns!)

Mostly, I'm a bit worried about the documentation implying a safety behavior that doesn't actually seem to be provided by the current code:

# emergency shutoff the kiln if this temp is reached.
# when solid state relays fail, they usually fail closed. this means your
# kiln receives full power until your house burns down.
# this should not replace you watching your kiln or use of a kiln-sitter
emergency_shutoff_temp = 2250

@Giterd the software time out is also a great idea, I can implement this as well.

@murraycs I'm afraid I'm on the electronics side of things at our space rather than the ceramics side. :D What do you mean by 'having a cone set on the physical switch'? Is it possible to have high cone positioned in such a way that, if it were to melt, would interrupt a physical circuit?

@murraycs
Copy link

@tanaes this video of setting up a Kiln Sitter gives a better visual explanation than I could write out in text: https://youtu.be/8wo5W3vI8Ec

Timecode 1:20 shows the piece I’m referring to.
Since Cones are a function of temperature and time, this should also be a backup even if the kiln never reaches full temp. Make sure if you have any holds that you have a high enough cone it won’t cause a premature shutdown.

Some models of Kiln Sitters also include the mechanical timer I mentioned, going up to 24 hours. If for some reason you need longer you just twist the dial partway through.

@tanaes
Copy link
Author

tanaes commented Apr 13, 2021

Oh very cool! Thanks for linking that video. Serious Marty Stouffer vibes from that narrator!

Our ceramics area captain informs me that the kiln already has a kiln sitter, so we are indeed backed up. :)

@jbruce12000
Copy link
Owner

If the temperature in the kiln exceeds emergency_shutoff_temp, a few things happen and none of them would kill the power to a potentially shorted SSR. To be clear, the PI is NOT RESET, but the current profile is stopped and messages are logged.

I have had requests for a safety relay in the past, but I don't have one so I can't test that. I have a kiln-sitter, so that is my failsafe. If you want to add settings and code for a safety relay, submit a pull request and I'll check it out.

@jbruce12000
Copy link
Owner

jbruce12000 commented Apr 14, 2021

@Giterd As far as a firing timeout, this should be pretty easy to implement. I think I'd implement that as a timeout in total hours instead of hours past the length of firing profile. what do you think?

@jbruce12000
Copy link
Owner

I see what you're saying about the wording of "emergency shutoff". Maybe this should change, but I think what folks should really keep in mind is... if there is a short, all control is lost.

@jbruce12000
Copy link
Owner

Mostly, I'm a bit worried about the documentation implying a safety behavior that doesn't actually seem to be provided by the current code

@tanaes how would you change the wording? remember that this feature does do what it says, but if it cannot control the SSR because it failed, all bets are off.

@tanaes
Copy link
Author

tanaes commented Apr 14, 2021

I would probably just add what you said above! That if this temperature is reached, the profile is turned off. BUT if the reason the temp was reached is because the SSR shorted closed, that it can not do anything to cut power to it, and so it's a good idea to have a redundant backup of some sort.

Thanks! I will submit a PR if I can get the safety relay implemented successfully.

@jbruce12000
Copy link
Owner

ok, I'll change that wording.

@Giterd
Copy link

Giterd commented Apr 14, 2021

@Giterd As far as a firing timeout, this should be pretty easy to implement. I think I'd implement that as a timeout in total hours instead of hours past the length of firing profile. what do you think?

Different profiles have different run times, so personally I would prefer a timeout set as hours past the current profile total time. However, I can see that this might not be ideal if there is an extended controlled cooldown at the end. But a simple, fixed (in config.py) time will also work and I expect easier to implement.

@jbruce12000
Copy link
Owner

I don't think implementation would be too hard either way. ok, I'll add the firing timeout sometime this week.

@kayak01
Copy link

kayak01 commented Apr 14, 2021 via email

@tanaes
Copy link
Author

tanaes commented Apr 14, 2021

Might be worth adding a contactor inline with the ssr as a backup? If the kiln is not responding open the contactor?

Yup that's my plan! I'll have it wired to the normally open terminal, and add an enable output from a RPi GPIO under the run loop. That way if the loop breaks due to an over temp condition, or the Pi looses power or something, it cuts power to the SSR.

@kendrick90
Copy link

Any progress on this? I'm working with a different kiln controller that uses an ESP32 but I'm interested in trying out this project too. I would like to include an electro-mechanical relay like this one as a fail safe. The whole reason I'm looking into these things is that my kiln was having the SSR stuck on problem. It's scary to see it much hotter than it's supposed to be! Not to mentioned the ruined work... My kiln also has a switch attached to the door that opens the EMR when the door is opened.

@tanaes
Copy link
Author

tanaes commented May 30, 2021 via email

@marktilles
Copy link

marktilles commented Jun 9, 2021

Regarding an emergency overheat shut off, I simply took a cheap Rex-100 style PID controller and solid-state relay, ran an extra thermocouple and cable to the kiln, and tied these in to the original contactor which I left in my kiln. I can set this device easily to any temperature, so if overheating ever exceeds my desired maximum temperature that separate device will shut down the contactor. I also require a push button to initiate the circuit, as this makes sure that a power outage in my house will never let anything start up in an unknown state. I did this by looping one terminal of the relay coil through the extra unused pair of control terminals on the contactor, and having a separate momentary pushbutton trigger the contactor to the on position. Problem solved.

@marktilles
Copy link

@Giterd As far as a firing timeout, this should be pretty easy to implement. I think I'd implement that as a timeout in total hours instead of hours past the length of firing profile. what do you think?

Different profiles have different run times, so personally I would prefer a timeout set as hours past the current profile total time. However, I can see that this might not be ideal if there is an extended controlled cooldown at the end. But a simple, fixed (in config.py) time will also work and I expect easier to implement.

In my case, my large Chematex oven can't keep up with the profile curve we enter at the top ends of our firings. I therefore use the new "catch-up" feature to ensure our firings actually reach the top temperature. However, I need to add a few minutes (ca 5 extra minutes) of flat temperature time into the top end of the curve to allow the kiln to actually catch up to the top temp, since the profile would otherwise stop when the target temp reaches its value, regardless if how many catch-up degrees the actual sensor temp lags behind. My firings thus routinely take longer than the estimated firing time when the profiles are started. Sure, I can always go in and adjust my curves to more closely match the heating capacity of the oven at its higher temps, to ensure the estimated time more closely matches the actual. But unless one does this then deciding on a "fixed" amount of "too much runtime" for any particular kiln and firing curve, well in my mind, this could add yet another variable that would require even more explanation to the user.

One idea I have to improve the overheating safety options is as follows (I am already doing something similar with a separate REX-controller, with its very own thermocouple, but the Raspberry Pi could perform this function as well):
A Raspberry Pi based overheating device interlock circuit could be controlled using a GPIO as defined in the config.py file. This circuit could control a dedicated SSR that feeds A/C power to a physical contactor that all the heater SSRs are routed through. So, when an overheating condition occurs not only would the profile be canceled but this GPIO would shut down the contactor circuit as well.

@felixn-unity
Copy link

Hi

I don't see any "emergency_shutoff_temp" in the latest code?

Thanks

@marktilles
Copy link

marktilles commented Aug 5, 2021

It’s actually in there, in oven.py - and seems to work when testing - but its hard coded slightly differently In picoreflow so the web interface doesn’t reflect real life operation. I’m a programming amateur and hacking my own changes to the system with a variety of web interface mods, and have made my own branch of the code to share, which you are welcome to look through, but I need to finish writing up my notes documenting my reasons for my changes.
Mark

@felixn-unity
Copy link

Thanks I am working with master branch and have not yet tried it on real Kiln, but thermocouple seems til work. I would be interested to see what changes you made. I would like to get the opendoor to work.

I will try it out on my sisters Kiln in a few days - and crossing fingers :)

Thanks

@marktilles
Copy link

marktilles commented Aug 6, 2021 via email

@FGMarshall
Copy link

Since I have cheaper power at night I would like to set a delay period between when I load the kiln and the power on time. It would help to have a box on the web page where I could set a delay before the schedule starts.
I see I can set a dead delay at the start of each stored schedule but that takes longer than just filling in a box on the home page.
Where in the code can I add this please?

@marktilles
Copy link

Since I have cheaper power at night I would like to set a delay period between when I load the kiln and the power on time. It would help to have a box on the web page where I could set a delay before the schedule starts.
I see I can set a dead delay at the start of each stored schedule but that takes longer than just filling in a box on the home page.
Where in the code can I add this please?

Hi Marshall,

You know, I am a hacker type of user and I haven’t interfaced with Jason’s code base. I have my own branch of his code hanging out there under my own login, and I just last night got that feature working. My interface is a hell of a lot more feature rich than the original, but the only way that I could say right now that you could get it going would be to download a copy of my code and talking with me. Like I said, I’m not a true programmer but I managed to get things to work the way I like them too. I would be happy to hook you in online temporarily to my oven so you could see these different features I put in. You can email me at [email protected] or text me on iMessage or WhatsApp at +46730264112. I am in Stockholm Sweden, so a bit different time zone then maybe you are in.

@tanaes
Copy link
Author

tanaes commented Oct 4, 2021

I've been working on an add-on board for a Raspberry Pi to simplify the retrofitting of our makerspace's kiln: https://github.com/tanaes/KilnHat

Now that the hardware prototype is together, I'll be working on adding some of these features to my fork of this repository. @marktilles I'd be interested in talking to you about some of the features you've added! Maybe I can help to merge them into the main branch.

@marktilles
Copy link

marktilles commented Oct 4, 2021 via email

@marktilles
Copy link

marktilles commented Oct 4, 2021 via email

@iog-creator
Copy link

iog-creator commented Oct 5, 2021 via email

@marktilles
Copy link

Just to be clear: I just now spoke to a programming expert friend of mine. The way I have hacked my timer function into the system should be considered "unreliable" in that the function is run in the browser's javascript instance, not on the server's backend. He is going to help me push it into the python backend so one can even shut off the web browser computer and the kiln controller backend will run the firing process when it was told to do so. Nevertheless, again, what I made does work if you leave the web browser running on your computer until the kiln heating process starts up. I'll be updating my GitHub as improvements are made. // Mark

@marktilles
Copy link

My kiln controller project.pdf

Guys and gals, I have finally updated my notes (to a certain degree) regarding my branch of the project, to try to offer a better idea what I have been doing. During my personal "hacking" of the code I have tried to remark those places where most of my additions or changes have been made, and any good programmer will probably be able to make some sense of it. One day with help from a programmer friend of mine I hope to have the code in a shape I would not be embarrassed for experienced programmers to read through. Anyway, this PDF file has multiple screenshots showing the results of what I've done. Hope this helps those who are interested.

@jbruce12000
Copy link
Owner

wow. ok. lots of changes... way to many to accept into master all at once. I need changes in reviewable chunks that are logically ordered. I really like the work you've done and would love to incorporate the changes. Can you submit PRs for this?

An example of a PR that is in a logical reviewable chunk might be fixing the kwh cost estimate.

Does this make sense? I don't want to close this yet because it has some cool stuff in it that others will like.

@tanaes
Copy link
Author

tanaes commented Oct 21, 2021 via email

@marktilles
Copy link

marktilles commented Oct 21, 2021

wow. ok. lots of changes... way to many to accept into master all at once. I need changes in reviewable chunks that are logically ordered. I really like the work you've done and would love to incorporate the changes. Can you submit PRs for this?

Hi Jason, I’m glad you like what I’ve done, but just as I’ve mentioned before I just hacked my way through it to get what I want to work – work. I’ve got a programming buddy that’s eventually going to help clean up my code, and maybe then figure out how to put my changes into small sections for updating your mainstream repository. The first thing he’s going to do is push my delay timer into the backend, and then I will look at taking the time to go back and figure out all the small changes. Were I a true programmer, I would have hung off of your code and done it the right way.

If any of you others out there want to take it upon yourself with chunks of my corrections and improvements and push them in on your own, please help yourselves. I have tried to comment my code with my name so that you should be able to find most of the places these changes were made and what they were for. This will surely get done much more quickly and that way, and I am here and can check in and offer my feedback if there is confusion.

if any of you would like to take a look at my interface irl, email me directly and I can temporarily plug you into the web interface so you can look around. Markt3AAAATTTtilles.net and we can also chat or speak on WhatsApp.

@marktilles
Copy link

marktilles commented Nov 14, 2021

@jbruce12000 @adq @tanaes @iog-creator @elixn-unity

Hi again, my buddy Marko B. has just today begun to go through my code to assist me to clean up and correct its code. He will follow standard procedures to propose my improvements and changes to your main branch by performing pull requests, one for each feature to add or change. Please stand by, I’m a creative thinker and think much of what I have to offer will be of interest to the kiln community.

@tanaes
Copy link
Author

tanaes commented Nov 14, 2021

@jbruce12000 @adq @tanaes @iog-creator @elixn-unity

Hi again, my buddy Marko B. has just today begun to go through my code to assist me to clean up and correct its code. He will follow standard procedures to propose my improvements and changes to your main branch by performing pull requests, one for each feature to add or change. Please stand by, I’m a creative thinker and think much of what I have to offer will be of interest to the kiln community.

That's great news! Looking forward to seeing the results.

Just got my controller wired up this morning and hope to turn it on later today for testing. image

@marktilles
Copy link

marktilles commented Nov 14, 2021

Wow Looks pretty fancy. Is it based upon the 31856 or 31855? And are those two displays the sensor and target temps?

And I’m wondering, ATX style power supplies from computers are a dime a dozen. Could this system be made to accept the power plug from an ATX desktop computer power supply?

@tanaes
Copy link
Author

tanaes commented Nov 14, 2021 via email

@iog-creator
Copy link

iog-creator commented Nov 14, 2021 via email

@tanaes
Copy link
Author

tanaes commented Nov 14, 2021 via email

@marktilles
Copy link

marktilles commented Nov 14, 2021 via email

@iog-creator
Copy link

iog-creator commented Nov 14, 2021 via email

@bjornicus
Copy link

bjornicus commented Dec 18, 2021

Something I've been thinking about while developing and using a very similar setup to this project (https://github.com/bjornicus/kilntrol, I only just found out about this project today from @marktilles) is having it it notify me (probably by text message using twillio) when something unexpected happens (or something expected that you want to be notified about). That could be useful as another way to help not burn the house down or ruin your firing. I'll be sure to share if I do find time to figure that out, but thought I'd share the idea in case it inspires someone else.

@marktilles
Copy link

Jon, I like the idea of the emergency shutoff relay mod, but it might be worth noting in your release notes or instructions that in case of a power glitch or any CPU hang, you're still relying on the Pi system ti reset the GPIO. The "ideal" backup safety will always be a completely independent safety system.
Mark

@rondoc
Copy link

rondoc commented Jan 22, 2022

I am new to this but I am an EE and have been a potter for over 70 years! My kiln is a rotary one with a single silicon carbide element. works well and very reliable. The current control is manual with 16 levels of heating by a hard logic chip set up doing a PWM synced to the line frequency. I know this is off topic but I am trying to use JB's controller as is. Is there a way to use a test run to set up the PID numbers? I think I saw something but running loads of tests seems a bit much for me. AS far as safety goes the only safe method would IMNSHO be a completely separate cutoff with its own thermocoouple. It could be an external one if you knew the relationship between kiln temp/ time/ external skin temp...after all you want to prevent damage in rare event of s a shorted SSW. BTW my switch has been running for 35 years , made by Westinghouse. Use a voltage rating double the peak of the line input and a current also double your max and it will be very reliable. The isolator is a MOC 3060 and I use a back to back SCR module. sorry to ramble...
ronald.

@rondoc
Copy link

rondoc commented Jan 22, 2022

PS I built the kiln myself, extremely efficient 8 cu ft.

@jbruce12000
Copy link
Owner

@rondoc see https://github.com/jbruce12000/kiln-controller/blob/master/docs/pid_tuning.md#the-tuning-process for the autotuner. I tried it and it was close, but not perfect. It involves one test to 400 degrees which produces a csv file. That file is used to calculate the PID parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests