vitormhenrique / OctoPrint-Enclosure

OctoPrint Enclosure Plugin
GNU General Public License v3.0
396 stars 201 forks source link

Not sure if this would be a bug report or feature request........ #449

Open poppabear1000 opened 2 years ago

poppabear1000 commented 2 years ago

I noticed that on "Outputs" if I have lets say a temp alarm that turns on an output above some temperature, that once it turns on, it does not turn off once it drops below that temperature again.

I.E. I have an exhaust fan, that if my chamber is set to 70C, but for some reason the heater overshoots that temp, and my temp alarm is set to 72C, so the then the exhaust fan turns on, to help bring the temp in the chamber back to 70C, but once the temp drops below 72C the fan (temp alarm) does not turn off, so then the heater has to "Fight" the exhaust fan.
I have another temp alarm (similar situation) set that turns off a second relay for the heater power (to act as a heat run-away safety), again once it turns on (which turns off the heater via the second relay in the series), it will not turn back off once the temp drops below 75C. I also tried installing "Cooling" as a way to do the above, but it conflicts and does not really work.

Or.......... could you perhaps put a "second", temperature in the ENC G-code command that lets say I am setting my Temp alarm 1 (fan cooling) to turn on at 72 degrees, and have a second Temp command that then when the temp reached lets say 71 degrees it would turn that fan off. i.e. lets say my temp alarm is id 5, ENC O5 S72 K71 (the K value would be "Kill", thus the fan would turn on at 72 degrees due to heater overshoot or the like, then once it brought the temp down to 71C (or lower, the Kill temp) it would turn off the gpio that controls that fan.

Also, would there be a way to add/install a PID loop on the heater output? Mine is currently Bang/Bang (on/off to heater unit), would there be a way to add a PID loop control on the heater output, (or is there already one in the software)? (currently driving a SSR to run my enclosure heater).

One other thing, on the heater off for "Auto Shutdown", would there be a way to do a heat vs time ramp down process? i.e. you could had a setting that say, drop 5 degrees, and hold for 30 seconds, then repeat for some number of iterations, so that you could bring the temp down slowly in a controlled manner to hopefully avoid fast temp drops that might warp the print (i.e. PEEK, PC, etc...)?

vitormhenrique commented 2 years ago

The alarm is only a "shot once" thing, you really don't need to have an exaust fan to bring the temperature down.

after few seconds after the heater is off it should cool down by it self.

That being said, it is possible to create the type of logic that you want on the future.

poppabear1000 commented 2 years ago

Yes I would like the ability to be able to bring the temperature down in steps, for example, print finishes then the a ramp-down/cool-down cycle begins. perhaps an "ENC" command type, that you could set the temperature drop per time in that step. If I wanted to have 20 steps (down), each step dropping the enclosure temp by 5C, for 120 seconds, then it would drop down to the next lower step, (dropping 5C more, and holding it at that temp for 120 seconds), this would continue stepping down till it finished the 20 steps down, then the heater would cut off (cycle done). does your plug in, have a PID loop for heater control? I was/am assuming it is the Bang/Bang type? since in the plugin config, we set a Hysteresis value around the target temp, for on/off of the heater. If you do have a PID loop for temp control in the plugin, is there a way to do an "Auto tune" of it, or is there a place or way to set the PID values?

BTW: I program in C, C++, VB, WxLua and have started the learning process of Python, I am willing to help if you have small "module" type programming you need done, and are not under a time crunch for them. I don't fool with Git-hub at all other than this board/we-page, so not sure how to get your source code, so I can lend a hand on the parts you need worked on. Further, full disclosure I am a "Hobbyist" type programmer, mostly for doing my DIY projects, NOT a pro programmer here.