Day 2 and the honeymoon may be over
So I had a heater panic yesterday, but after a reset, all was good. This morning though, man alive it's a grumpy little git. Anyhow, there is no PID calibration setting on the calibration menu like the web pages suggests, but I did one manually, (with the sock on) and I put the M301 command in the filament start GCode as well as the printer start Code (cuz it still failed). I can see the command being sent, but the first spike always overruns a lot, and then dips a lot, then stabilises out to +/- 0.1 degrees for the first layer.
The first dip after getting to 215 demanded, always seem to be 209. Sometimes it panics, sometimes not - I guess the difference is a resolution thing. 209.49 panic, 209.51 no panic.
Oh, don't know whether it's important, but there is a little indicator over the temperature when printing that says "Tune" does that means it has been tuned, or needs it? Or just that it happens to be a Saturday?
I have checked the thermistor cable at the board and wiggled the cables at the thermistor end, but nothing seems to happen - no spurious values.
Is there a way to eas up on the sensitivity, or add a delay at the beginning to let the print stabilise a bunch more?
RE: Day 2 and the honeymoon may be over
Interestingly, the MK3 seems to wobble around the temp before starting the print, but the Mini seems to be off on the first approach.
RE: Day 2 and the honeymoon may be over
Yes, my machine also stop printing at the start (while printing the skirt) when the temp unstably drop from 215 to 209 within these few days.
RE: Day 2 and the honeymoon may be over
Yeah, I've tracked the issue down to the PID tuning algorithm. When you to the M109 (wait for temp) it just waits until the first occurrence and carries on. A simple fix would be to wait for the second approach and carry on, but I fixed it by Putting a demand of 210, waiting for that, then wait 5 more seconds, before going to full temp. This gives the PID algorithm a better approach so it doesn't drop so far. Any better suggestions welcome 😀
RE: Day 2 and the honeymoon may be over
If anyone else is interested, in the printer start gcode there are these lines:
M104 S[first_layer_temperature] ; set extruder temp
M109 S[first_layer_temperature] ; wait for extruder temp
I just updated it to the following:
M104 S210 ; set interim extruder temp
M109 S210 ; wait for interim extruder temp
G4 P5000 ; wait for a peak
M104 S[first_layer_temperature] ; set final extruder temp
M109 S[first_layer_temperature] ; wait for final extruder temp
This seems to give the PID algorithm a better chance and doesn't drop so far on the first layer - 30 prints so far not a single panic. The overshoot on the second layer is only about 3 degrees.
I did do 30 cycles of PID tuning though so it's as stable as a rock once it's done.
RE: Day 2 and the honeymoon may be over
Yeah, I've tracked the issue down to the PID tuning algorithm. When you to the M109 (wait for temp) it just waits until the first occurrence and carries on.
Slightly confused here. PID tuning means determining the P,I,D values for the PID controller. It seems like what you describe is how the algorithm is supposed to work, it's called the "Relay method". The output is flipped between two set points over a few cycles.
Normally you would do several cycles, one is probably not enough. Are you saying you needed to add more cycles to the PID tuning?
Edit: ok, so I think you are not talking about PID tuning, but bodging the run time operation to avoid overshoot. It would be better to run a real PID tune.
RE: Day 2 and the honeymoon may be over
@bobcousins
Sorry, didn't mean the tuning algorithm, I meant the PID algorithm and how a steady state is tested for in the M109.
I did a PID tune over 30 cycles in the end. You can see that there is very little wobble after the first couple approaching temp.
For info, doing a PID tune over any number of cycles twice refuses to give similar values anyway 🙂 I did a PID tune with 10 cycles 4 times and got different vales each time - as much as 30% different in the I term.
The problem with the PID algorithm and a fast approach to the desired value, means it will always overshoot a little the first time (cuz it only does one integration, and you need the rate of change of the rate of change to get better values, but I diregress)... in whichever direction... the Proportional bit is very offset by the Integral bit (I think it's that way round), anyhow it needs that history to ensure a steady-state and the closer to the demanded value you are, the better it is at maintaining it. This is not really a problem in the real world when you implement a feedback controller since you would generally wait a little bit for the stability to set in and you would generally control the change mechanisms for the parameter - in this case heat: slower heater and better insulation slow the change in both directions. I want it fast, but I do have a silicon sock on, which on its own didn't help the rate of temp drop.
The issue in this real-world example though is that the first dip is very close to the panic point of the system and you end up with false positives in my case.
Anyhow, the system here doesn't check for a panic state while it's heating as long as the temp is rising I think, so all I'm trying to do here is set a first point a bit lower so it can approach the desired temp a little gentler so it won't dip so hard and panic. So far, so good.
I hope I wrote what I meant. The PID feedback loop is designed to keep a steady state, not to get you there as smoothly as possible.