PID tuning and heater control
-
hello,
I have a duet D 6HC board and am having issues tuning my H1 extruder. I have run the PID tuning program several times and then yesterday I added this line to my config is:
M570 H1 P8 T25This worked for a single print then things got worse and now it charges right past my set temp and I get an Error: Heater 1 fault: heater monitor 0 was triggered. (previously I got the error that prompted me to add the M570 line.
Here is what I get when I run an M307 h1
Heater 1: heating rate 3.203, cooling rate 1.805, dead time 18.22, max PWM 1.00, mode PID, calibrated at 24.1V
Predicted max temperature rise 152°C
PID parameters: heating P3.1 I0.107 D39.0, steady P3.1 I0.117 D39.0It seems I need some additional help with my tuning` process, Here is my config info in case it is needed:
; Configuration file for Duet 3 MB 6HC (firmware version 3.3) ; executed by the firmware on start-up ; generated by RepRapFirmware Configuration Tool v3.3.13 on Wed Oct 05 2022 20:45:45 GMT-0400 (Eastern Daylight Time) ; General preferences M575 P1 S1 B57600 ; enable support for PanelDue G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Duet 3" ; set printer name M669 K1 ; select CoreXY mode ; Drives M569 P0.0 S1 ; physical drive 0.0 goes forwards M569 P0.1 S1 ; physical drive 0.1 goes forwards M569 P0.2 S0 ; physical drive 0.2 goes backwards M569 P0.3 S0 ; M569 P0.4 S0 ; physical drive 0.4 goes backwards M584 X0.0 Y0.1 Z0.2:0.3 E0.4 ; set drive mapping M671 x3:360 y200:200 ; Lead screw probing locations M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400.00 E932.00 ; set steps per mm M566 X900.00 Y900.00 Z180.00 E720.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z900.00 E1200.00 ; set maximum speeds (mm/min) M201 X3000.00 Y3000.00 Z500.00 E250.00 ; set accelerations (mm/s^2) M906 X800 Y800 Z800 E800 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X-3 Y-35 Z-0.5 S1 ; set axis minima M208 X393 Y355 Z395 S0 ; set axis maxima ; Endstops M574 X1 S1 P"io1.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin io1.in M574 Y1 S1 P"io2.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io2.in M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Z-Probe M558 P8 C"io3.in" H5 F900 T6000 ; set Z probe type to unmodulated and the dive height + speeds G31 P50 X-23 Y21 Z3.15 ; set Z probe trigger value, offset and trigger height M557 X15:370 Y35:320 S40 ; define mesh grid ; Heaters M308 S0 P"temp0" Y"thermistor" T100000 B3950 ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0 M307 H0 R0.548 K0.441:0.000 D4.48 E1.35 S1.00 B0 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S125 ; set temperature limit for heater 0 to 100C M308 S1 P"temp1" Y"thermistor" T100000 B4616 C9.145674e-8 ; configure sensor 1 as thermistor on pin temp1 M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S285 ; set temperature limit for heater 1 to 285C M570 H1 P8 T25 ; An anomaly on heater 1 must persist for 8 seconds, and must be greater or less than 25C from the setpoint, to raise a heater fault. ; Fans M950 F0 C"out7" Q500 ; create fan 0 on pin out7 and set its frequency M106 P0 S0.5 H-1 ; set fan 0 value. Thermostatic control is turned off ; Tools M563 P0 S"h2_direct drive" D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ; Custom settings are not defined ; Miscellaneous M501 ; load saved parameters from non-volatile memory M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss T0 ; select first tool
I use the config override file too so here is my heater update:
; config-override.g file generated in response to M500 at 2022-10-16 21:08 ; This is a system-generated file - do not edit ; Heater model parameters M307 H0 R0.548 K0.441:0.000 D4.48 E1.35 S1.00 B0 M307 H1 R3.203 K1.805:0.000 D18.22 E1.35 S1.00 B0 V24.1
Please let me know fi I can provide any additional information.
thank you
-
What tuning command did you use?
What does the heater graph look like?
What kind of heater is it? -
M303 H1 S210
The heater came with the BTT H2 V2S Lite:
Heater info:
Thermistor Type: NTC100K
Heater Cartridge Power: 70W
Heater Cartridge Voltage: 24VNo silicone sleeve so I used PTFE tape
-
@dmbe11 said in PID tuning and heater control:
Heater Cartridge Power: 70W
Oh my. That's a lot of wattage.
What does the heater graph look like during the tuning and when it errors?
-
@Phaedrux
It looks like a rocket. However last night I was trying to print something and I found this Gcode command, which I must admit I don't fully understand so it was pretty dumb to try it, but being who I am I did it anyway. I did keep my hand close to the abort switch.Here is the code:
M307 H0 R0.560 K0.379:0.000 D3.94 E1.35 S1.00 B0
code_text
The result is usable but as you can see it adds about 9c to my set temp of 205 c. So I know it is not correct. I provided it as it might be a clue to help you determine what my issues are.
-
@Phaedrux here is the graph and error
As you are likely aware, the drop at the end of the graph was after the error and lasted the time it took me to find my screenshot app and click the button, thus the final dropping curve
-
Can you try this tuning command?
M303 T0 S260
That should tune it as a tool with associated hotend fan to account for it's effects.
It's also a higher temp to give it a bit more runway.
Can you capture the graph for that one?
-
the error was monitor 0 was triggered
-
That's the graph and error from the tuning command I showed?
-
@dmbe11 Monitor 0 will be triggered because the temperature reached 312 and I expect the maximum heater temperature command is on the default (290C)
https://docs.duet3d.com/User_manual/Reference/Gcodes#m143-maximum-heater-temperatureThat said the issue is you have 40+C overshoot during tuning which is so much that the tuning algorithm throws an error
The M303 command does not have a setting to allow for a wider range as far as i can see:
https://docs.duet3d.com/User_manual/Reference/Gcodes#m303-run-heater-tuningYou can try tuning with a lower PWM (e.g. setting the P parameter to 0.7 or 0.5) however presumably you have such a high power heater because you are going for extremely high flow rate so you need the full 70W when extruding fast?
Maybe @dc42 has a suggestion on how to tune in this scenario.