Extruder dead-time temperature occasionally out of control

I'm overhauling a Rostock Max delta printer and am having a dramatic problem with the extruder hot-end temperature going out of control, seemingly at random. The temperature seems well controlled for a while, but then the heater PWM output seems to get "stuck" at a certain position, resulting in temperature falling below extrudability or (worse) rising rapidly and uncontrollably. The problem seems to be with the firmware logic, as the firmware is reporting high or low PWM output and reasonable temperatures throughout. When the heater gets stuck on, I usually notice the smell before anything else! Here are a couple of screenshots of Repetier Host to illustrate:




This printer was in a working condition, according to the previous owner, and it was running Repetier Firmware 0.91. However, I have upgraded to 1.0.3 to try to get bed auto-levelling working with the printer's inductive bed sensor. I'm certain that the hot-end thermistor is not well-calibrated.

The printer is running off 24 V but seems to have 12 V heating elements, so I have set the PWM heater limits to 64. What's particularly concerning is that I have seen the firmware drive the PWM output to 255. I wonder how that's possible, assuming I've set the PWM limits correctly.

Here are the current EEPROM settings:

EPR:0 1028 255 Language
EPR:2 75 115200 Baudrate
EPR:3 129 0.611 Filament printed [m]
EPR:2 125 2573 Printer active [s]
EPR:2 79 6000000 Max. inactive time [ms,0=off]
EPR:2 83 600000 Stop stepper after inactivity [ms,0=off]
EPR:3 11 80.0000 Steps per mm
EPR:3 23 500.000 Max. feedrate [mm/s]
EPR:3 35 100.000 Homing feedrate [mm/s]
EPR:3 39 80.000 Max. jerk [mm/s]
EPR:3 133 0.000 X min pos [mm]
EPR:3 137 0.000 Y min pos [mm]
EPR:3 141 0.000 Z min pos [mm]
EPR:3 145 160.000 X max length [mm]
EPR:3 149 160.000 Y max length [mm]
EPR:3 153 288.455 Z max length [mm]
EPR:3 1056 0.000 Park position X [mm]
EPR:3 1060 10.000 Park position Y [mm]
EPR:3 1064 10.000 Park position Z raise [mm]
EPR:1 891 70 Segments/s for travel
EPR:1 889 180 Segments/s for printing
EPR:3 59 1000.000 Acceleration [mm/s^2]
EPR:3 71 1000.000 Travel acceleration [mm/s^2]
EPR:3 881 304.500 Diagonal rod length [mm]
EPR:3 885 131.000 Horizontal rod radius at 0,0 [mm]
EPR:3 925 100.000 Max printable radius [mm]
EPR:1 893 0 Tower X endstop offset [steps]
EPR:1 895 63 Tower Y endstop offset [steps]
EPR:1 897 151 Tower Z endstop offset [steps]
EPR:3 901 210.000 Alpha A(210):
EPR:3 905 330.000 Alpha B(330):
EPR:3 909 90.000 Alpha C(90):
EPR:3 913 0.000 Delta Radius A(0):
EPR:3 917 0.000 Delta Radius B(0):
EPR:3 921 0.000 Delta Radius C(0):
EPR:3 933 0.000 Corr. diagonal A [mm]
EPR:3 937 0.000 Corr. diagonal B [mm]
EPR:3 941 0.000 Corr. diagonal C [mm]
EPR:3 1024 0.000 Coating thickness [mm]
EPR:3 808 1.450 Z-probe height [mm]
EPR:3 929 20.000 Max. z-probe - bed dist. [mm]
EPR:3 812 10.000 Z-probe speed [mm/s]
EPR:3 840 200.000 Z-probe x-y-speed [mm/s]
EPR:3 800 -27.000 Z-probe offset x [mm]
EPR:3 804 15.000 Z-probe offset y [mm]
EPR:3 816 0.000 Z-probe X1 [mm]
EPR:3 820 90.000 Z-probe Y1 [mm]
EPR:3 824 45.000 Z-probe X2 [mm]
EPR:3 828 -78.000 Z-probe Y2 [mm]
EPR:3 832 -45.000 Z-probe X3 [mm]
EPR:3 836 -78.000 Z-probe Y3 [mm]
EPR:3 1036 0.000 Z-probe bending correction A [mm]
EPR:3 1040 0.000 Z-probe bending correction B [mm]
EPR:3 1044 0.000 Z-probe bending correction C [mm]
EPR:0 880 1 Autolevel active (1/0)
EPR:3 976 0.000000 tanXY Axis Compensation
EPR:3 980 0.000000 tanYZ Axis Compensation
EPR:3 984 0.000000 tanXZ Axis Compensation
EPR:1 1048 55 Bed Preheat temp. [???C]
EPR:0 106 0 Bed Heat Manager [0-3]
EPR:0 107 64 Bed PID drive max
EPR:0 124 80 Bed PID drive min
EPR:3 108 196.000 Bed PID P-gain
EPR:3 112 33.000 Bed PID I-gain
EPR:3 116 290.000 Bed PID D-gain
EPR:0 120 64 Bed PID max value [0-255]
EPR:3 200 168.000 Extr.1 steps per mm
EPR:3 204 25.000 Extr.1 max. feedrate [mm/s]
EPR:3 208 0.500 Extr.1 start feedrate [mm/s]
EPR:3 212 9000.000 Extr.1 acceleration [mm/s^2]
EPR:1 294 100 Extr.1 Preheat temp. [???C]
EPR:0 216 3 Extr.1 heat manager [0-3]
EPR:0 217 64 Extr.1 PID drive max
EPR:0 245 1 Extr.1 PID drive min
EPR:3 218 8.0000 Extr.1 PID P-gain/dead-time
EPR:3 222 1.0000 Extr.1 PID I-gain
EPR:3 226 1.0000 Extr.1 PID D-gain
EPR:0 230 64 Extr.1 PID max value [0-255]
EPR:2 231 0 Extr.1 X-offset [steps]
EPR:2 235 0 Extr.1 Y-offset [steps]
EPR:2 290 0 Extr.1 Z-offset [steps]
EPR:1 239 1 Extr.1 temp. stabilize time [s]
EPR:1 250 110 Extr.1 temp. for retraction when heating [C]
EPR:1 252 5 Extr.1 distance to retract when heating [mm]
EPR:0 254 255 Extr.1 extruder cooler speed [0-255]
I've tried compiling with Arduino IDE 1.0.5 and 1.8.8 in case it might be due to a compiler bug, but the behaviour is unchanged. Can I turn on additional debugging output? Is there further testing or information that I can send that might be helpful?

Thanks!

Comments

  • That version has improvements for PID control. That unfortunately caused the dead time to have a test period of 1s instead of 0.3s as before so it did not work as good as before. There are tries to improve it, but these cause your overshoot. Add
    #define SKIP_DEADTIME_ADJUSTMENT
    to disable them. Guess it will get some better but not as good as before.

    I would suggest select PID controller instead which is now working much better and use

    - M303 P<extruder/bed> S<printTemerature> X0 R<Repetitions> C<method>- Auto detect pid values. Use P<NUM_EXTRUDER> for heated bed. X0 saves result in EEPROM. R is number of cycles.

    method 0 = classic, 1 = some overshoot, 2 = no overshoot, 3 = pessen, 4 = Tyreus-Lyben

    and use the one you like best.
  • Prompt and helpful as always, thank you!

    Tomorrow I will try SKIP_DEADTIME_ADJUSTMENT and confirm whether that avoids the problem, and try switching to the improved PID control.

    I was surprised that the firmware didn't clip the PWM output to the PID max value - is that by design? Under what circumstances would it output 255 despite a limit of 64?
  • Normally it does clip, but the deadtime adjustments changes it I think. SO not really happy with that solution.
  • edited February 2019
    Just confirming that adding
    #define SKIP_DEADTIME_ADJUSTMENT
    makes the temperature control a whole lot more sane! (although rather more "bang-bang" in behaviour)

    The PID heat manager also seems to be working very well. I've tried the classic, no overshoot, and Pessen auto-tuning methods. I still got overshoot with the "no overshoot" method, but the constants provided by the Pessen method seem to give tight regulation without too much oscillation. I've also calibrated the thermistor with a custom table, and printing temperatures are more reasonable now too.

    Many thanks for the help!
Sign In or Register to comment.