Tips for autotuning a very large heated chamber?
-
I've got a very large chamber that I'm trying to autotune the PID settings but I keep getting "Autotune cancelled because target temperature was not reached"
I'm trying this command:
M303 H0 P1 S250 Y2 Q1 A25As you can see below, I've attempted to combine my bed and chamber heaters in an attempt to resolve this issue, however, I still get the same error. Any suggestions? The temperature of the chamber is rising, albeit very slowly.
config.g
; Configuration file for Duet 3 MB 6XD (firmware version 3.5.0 Release Candidate 2) ; executed by the firmware on start-up ; generated by RepRapFirmware Configuration Tool v3.3.15 on Fri Dec 09 2022 12:10:26 GMT-0600 (Central Standard Time) ; General preferences M575 P1 S1 B57600 ; enable support for PanelDue G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"MyPrinter" ; set printer name ; Declare global variables if !exists(global.T1ActuationDist) global T1ActuationDist = 17 global T2ActuationDist = {global.T1ActuationDist} global T12FeedRt = 1000 global T1ZOffset = -6.34 ; used to be 7.55 global T2ZOffset = {global.T1ZOffset} + 0.11 global layerSpeed = 2400 global primaryFanSpeed = 0 global mosqFanSpeed = 0 global vacZone1Pin = "1.out2" global vacZone2Pin = "2.out0" global vacZone3Pin = "2.out1" global vacZone4Pin = "2.out2" global pressureAdvanceT0 = 0 global pressureAdvanceT1 = 0.25 global pressureAdvanceT2 = 0.25 global probeCycles = 5 global probeSpeedFast = 300 global probeSpeedSlow = 50 global errorFlag = false global bedStripTempMin = 0 global bedStripTempMax = 0 global bedStripErrorCount = 0 global heaterFaultBedEnabled = true global chamberCoilTempMin = 0 global chamberCoilTempMax = 0 global chamberCoilErrorCount = 0 global heaterFaultChamberEnabled = true global lockStatus = "" else set global.T1ActuationDist = 17 set global.T2ActuationDist = {global.T1ActuationDist} set global.T12FeedRt = 1000 set global.T1ZOffset = -6.34 set global.T2ZOffset = {global.T1ZOffset} + 0.11 set global.layerSpeed = 2400 set global.primaryFanSpeed = 0 set global.mosqFanSpeed = 0 set global.vacZone1Pin = "1.out2" set global.vacZone2Pin = "2.out0" set global.vacZone3Pin = "2.out1" set global.vacZone4Pin = "2.out2" set global.pressureAdvanceT0 = 0 set global.pressureAdvanceT1 = 0.25 set global.pressureAdvanceT2 = 0.25 set global.probeCycles = 5 set global.probeSpeedFast = 300 set global.probeSpeedSlow = 50 set global.errorFlag = false set global.bedStripTempMin = 0 set global.bedStripTempMax = 0 set global.bedStripErrorCount = 0 set global.heaterFaultBedEnabled = true set global.chamberCoilTempMin = 0 set global.chamberCoilTempMax = 0 set global.chamberCoilErrorCount = 0 set global.heaterFaultChamberEnabled = true set global.lockStatus = "" ; Wait a moment for the CAN expansion boards to start G4 S2 ; Drive Setup M98 P"DriveSetup.g" ; run default setup of motion system ;Bed Leveling M671 X1205:1205:-285.1:-285.1 Y-207.2:1451.4:1451.4:-207.2 S1.5 P5 F1.0 ;Define Z screw X Y locations, max correction, pitch, fudge factor ; Axis Limits M208 X0 Y0 Z-10 U0 V0 W0 S1 ; set axis minima M208 X1184 Y1175 Z1200 U17 V17 W100 S0 ; set axis maxima true X max is 1204 so we are using 1184 for safety. true Y max is 1195 so we are using 1175 for safety ; Z-Probe ; servo pin defined in accessories section ; create servo pin for BLTouch M558 P8 C"!0.io8.in" H5 F{global.probeSpeedFast}:{global.probeSpeedSlow} T99999999 R0.5 A{global.probeCycles} S0.03 ; set Z probe type and the dive height + speeds R0.5 b/c probe needs time to deploy without triggering. G31 P1000 X-47.8 Y15.2 Z4.1 ; set Z probe trigger value, offset and trigger height for 1mm nozzle M557 X-37.8:1126.2 Y25.2:1180.2 P21:21 ; define mesh grid ; Heaters M308 S0 P"0.temp0" Y"PT1000" A"Bed Inner" ; configure bed A sensor 0 as thermistor on pin temp0 M308 S7 P"0.temp2" Y"PT1000" A"Bed Outer" ; configure bed B sensor 9 as thermistor on pin temp2 ;M950 H0 C"0.out0" T0 ; create bed heater output on out0 and map it to sensor 0 ;M307 H0 R0.033 K0.020:0.000 D182.23 E1.35 S1.00 B0 ; disable bang-bang for bed and set pwm ;M140 P0 H0 S0 R0 ; bed heater 0 uses heater 0 ;M143 H0 S255 P0 T0 A2 C0 ; Max heater temp: Heater number, max temp, monitor number, sensor number, action, condition M308 S1 P"0.temp1" Y"PT1000" A"Chamber Inner" ; configure chamber A sensor 1 as thermistor on pin temp1 ;M308 S8 P"0.temp3" Y"PT1000" A"Chamber Outer" ; configure chamber B sensor 10 as thermistor on pin temp3 ;M950 H1 C"0.out1" T1 ; create chamber heater output on out1 and map it to sensor 1 ;M307 H1 R0.175 K0.200:0.000 D43.89 E1.35 S1.00 B0 ; disable bang-bang for chamber and set pwm ;M141 P0 H1 S0 R0 ; chamber heater 1 uses heater 1 ;M143 H1 S255 P0 T1 A2 C0 ; Max heater temp: Heater number, max temp, monitor number, sensor number, action, condition ; Test of combined bed and chamber heaters M950 H0 C"0.out0+0.out1" T1 Q10 ;M307 H0 M141 P0 H0 S0 R0 M143 H0 S255 P0 T1 A2 C0 M308 S2 P"3.spi.cs0" Y"rtd-max31865" A"myprinter Top" ; configure primary sensor top as PT100 on pin spi.cs0 M950 H2 C"3.out6" T2 ; create primary heater output on out3 and map it to sensor 2 M307 H2 A940 C810 D22 S1.0 B0 ; disable bang-bang for primary and set pwm M143 H2 S480 P0 T2 A2 C0 ; Max heater temp: Heater number, max temp, monitor number, sensor number, action, condition M308 S3 P"3.spi.cs1" Y"rtd-max31865" A"myprinter Middle" ; configure primary sensor bottom as PT100 on pin spi.cs1 M950 H3 C"3.out7" T3 ; create primary heater output on out4 and map it to sensor 3 M307 H3 A940 C810 D22 S1.0 B0 ; disable bang-bang for primary and set pwm M143 H3 S480 P0 T3 A2 C0 ; Max heater temp: Heater number, max temp, monitor number, sensor number, action, condition M308 S4 P"4.spi.cs0" Y"rtd-max31865" A"myprinter Nozzle" ; configure primary sensor nozzle as PT100 on pin spi.cs0 M950 H4 C"4.out8" T4 ; create primary heater output on out0 and map it to sensor 4 M307 H4 A795 C920 D10 S1.0 B0 ; disable bang-bang for primary and set pwm M143 H4 S480 P0 T4 A2 C0 ; Max heater temp: Heater number, max temp, monitor number, sensor number, action, condition M308 S5 P"3.temp1" Y"PT1000" A"Mosquito 1" ; configure mosquito sensor top as PT1000 on pin 3.temp0 - other thermistor is shorted M950 H5 C"3.out0+out1" T5 ; create primary heater output on out3 and map it to sensor 2 M307 H5 R2.262 K0.361:0.160 D7.99 E1.35 S1.00 B0 V24.1 ; disable bang-bang for primary and set pwm M143 H5 S505 P0 T5 A2 C0 ; Max heater temp: Heater number, max temp, monitor number, sensor number, action, condition M308 S6 P"4.temp0" Y"PT1000" A"Mosquito 2" ; configure mosquito sensor top as PT1000 on pin 3.temp0 M950 H6 C"4.out0+out1" T6 ; create primary heater output on out3 and map it to sensor 2 M307 H6 R2.364 K0.493:0.022 D7.12 E1.35 S1.00 B0 V24.1 ; disable bang-bang for primary and set pwm M143 H6 S505 P0 T6 A2 C0 ; Max heater temp: Heater number, max temp, monitor number, sensor number, action, condition ; Heater Faults M570 H0 P60 T15 R10 ;M570 H1 P60 T15 R10 ;commented out because of test of combined heaters M570 H2 P60 T15 R10 M570 H3 P60 T15 R10 M570 H4 P60 T15 R10 M570 H5 P60 T15 R10 M570 H6 P60 T15 R10 ; Redundant Sensors M308 S9 P"2.temp0" Y"PT1000" A"Bed Strip 1" ; configure bed strip array 1 sensor M308 S10 P"2.temp1" Y"PT1000" A"Bed Strip 2" ; configure bed strip array 2 sensor M308 S11 P"2.temp2" Y"PT1000" A"Bed Strip 3" ; configure bed strip array 3 sensor M308 S12 P"1.temp0" Y"PT1000" A"Chamber Coil 1" ; configure chamber coil 1 sensor M308 S13 P"1.temp1" Y"PT1000" A"Chamber Coil 2" ; configure chamber coil 2 sensor M308 S14 P"1.temp2" Y"PT1000" A"Chamber Coil 3" ; configure chamber coil 3 sensor ; Outputs M950 F0 C"0.out7" ; create chassis fan 0 on relay M106 P0 S255 H-1 C"Chassis Fan" ; set fan 0 value, thermostatic control off M950 F1 C"0.out8" ; create chamber fan 1 on relay M106 P1 S0 H12:13:14 T50 C"Chamber Fan" ; set fan 1 value, thermostatic control from sensor 1 M950 F2 C"0.out2" ; create primary pc fan 2 M106 P2 S0 H-1 C"myprinter Fan" ; set fan 2 value, thermostatic control off M950 F3 C"1.out1" ; create mosquito pc fan 3 M106 P3 S0 H-1 C"Mosquito Fan" ; set fan 3 value, thermostatic control off M950 P0 C{global.vacZone1Pin} ; create bed vac valve 1 M42 P0 S0 ; set output value to off M950 P1 C{global.vacZone2Pin} ; create bed vac valve 2 M42 P1 S0 ; set output value to off M950 P2 C{global.vacZone3Pin} ; create bed vac valve 3 M42 P2 S0 ; set output value to off M950 P3 C{global.vacZone4Pin} ; create bed vac valve 4 M42 P3 S0 ; set output value to off M950 P4 C"2.out6" ; create door locks on relay M42 P4 S0 ; set output value to off M950 F4 C"2.out4" ; create radiator on relay M106 P4 S1 H2:3:4:5:6 T50 C"Radiator" ; set fan 8 value, thermostatic control on M950 P5 C"1.out4" ; create probe on relay M42 P5 S0 ; set output value to off M950 P6 C"2.out3" ; create venturi valve was 1.out0 M42 P6 S0 ; set output value to off M950 F5 C"4.out6" ; create head electronics fan M106 P5 S255 H-1 C"Head Fan 1" ; set fan 12 value, thermostatic control off M950 F6 C"4.out7" ; create head electronics fan M106 P6 S255 H-1 C"Head Fan 2" ; set fan 12 value, thermostatic control off M950 P7 C"1.out8" ; create yellow stack led M42 P7 S0 ; set output value to off M950 P8 C"1.out7" ; create green stack led M42 P8 S0 ; set output value to off M950 P9 C"1.out6" ; create white stack led M42 P9 S0 ; set output value to off M950 P10 C"1.out3" ; create beep stack led M42 P10 S0 ; set output value to off M950 P11 C"2.io1.out" ; create secondary extruder reverse for mosquito 1 M42 P11 S0 ; set output value to off M950 P12 C"2.io2.out" ; create secondary extruder reset/forward for mosquito 1 M42 P12 S0 ; set output value to off M950 P13 C"2.out7" ; create chamber lights M42 P13 S0 ; set output value to off M950 P14 C"2.io4.out" ; create secondary extruder reverse for mosquito 2 M42 P14 S0 ; set output value to off M950 P15 C"2.io5.out" ; create secondary extruder reset/forward for mosquito 2 M42 P15 S0 ; set output value to off M950 P16 C"2.out5" ; create garage door on/off M42 P16 S0 ; set output value to off M950 P17 C"1.out5" ; create garage door direction M42 P17 S0 ; set output value to off M950 P18 C"121.out1" ; create speaker wait sound - Fur Elise M42 P18 S0 ; set output value to off M950 P19 C"2.out8" ; create speaker startup sound - Call M42 P19 S0 ; set output value to off M950 P20 C"121.out0" ; create speaker notification sound - Chime M42 P20 S0 ; set output value to off M950 P21 C"1.out0" ; create speaker alarm sound - London Bridge M42 P21 S0 ; set output value to off ; Trigger Inputs M950 J0 C"2.io0.in" ; assign input J0 to 2.io0.in for emergency stop M581 P0 T0 S0 R0 ; configur external trigger, pin 0, trigger 0, inactive-active, any time M950 J1 C"2.io1.in" ; assign input J1 to 1.io1.in for pause button M581 P1 T1 S0 R1 ; configure external trigger, pin 1, trigger 1, inactive-active, during print ; Other Inputs M950 J3 C"1.io0.in" ; create door lock 1 gpio input M950 J4 C"1.io1.in" ; create door lock 2 gpio input M950 J5 C"1.io2.in" ; create door lock 3 gpio input M950 J6 C"1.io3.in" ; create door lock 4 gpio input M950 J7 C"1.io4.in" ; create door lock 5 gpio input M950 J8 C"1.io5.in" ; create door lock 6 gpio input ; Tools M563 P0 S"myprinter" D2 H2:3:4 F2 ; define tool 0 as primary, extruder 2, Heaters 2 3 4, Fan 2 M568 P0 R0 S0 ; set tool 0 active and standby temperatures to 0C G10 P0 X0 Y0 Z0 U0 V0 W0 ; set tool 0 axis offests M563 P1 S"Mosquito 1" D0 H5 F3 ; define tool 1 as Mosquito 1, extruder 0, Heaters 5, Fan 3 was H5:6 M568 P1 R0 S0 ; set tool 1 active and standby temperatures to 0C G10 P1 X-71.815 Y-10.976 Z{global.T1ZOffset} U0 V0 W0 ; set tool 1 axis offests M563 P2 S"Mosquito 2" D1 H6 F3 ; define tool 2 as Mosquito 2, extruder 1, Heaters 6, Fan 3 was H7:8 M568 P2 R0 S0 ; set tool 2 active and standby temperatures to 0C G10 P2 X-71.815 Y41.411 Z{global.T2ZOffset} U0 V0 W0 ; set tool 2 axis offests ; Custom settings are not defined ; Miscellaneous G4 S1 T0 ; switch to T0 when first booting up M98 P"0:/sys/startup.g" ```M303 H0 P1 S250 Y2 Q1 A25
-
@p8blr How long does the tuning wait before giving the error? Is the temperature still increasing? Is the chamber able to reach 250C?
I think because you have commented out the existing M307 commands for the two heaters, it is now using the default values. If you send M307 H0 it will report the values being used. I think you will need to increase the D parameter (dead time) to a much longer period. The M307 settings for bed and chamber used before had D182.23 and D43.89 respectively, so perhaps D200.
I can see the point of tuning the bed and chamber together as one heater, as you are mostly likely going to turn them both on at the same time, but then won't it require a macro to separate them into two heaters again, once the chamber is to temperature and before printing starts?
Ian
-
@p8blr After speaking to @dc42, there is a time limit in the auto-tuning for a heater to get up to temperature of 30 minutes for bed/chamber heaters, and 7 minutes for hot end heaters, after which tuning will cancel; I assume you are hitting this time limit. This can only be changed by modifying the firmware.
There are a number of workarounds:
- Set a lower target temperature, that can be achieved within 30 minutes. This should still be enough to characterise the heater.
- Start auto-tuning at a higher temperature, such that the target temperature can be reached within 30 minutes, and use M303 with an A parameter.
Currently, the time limit is only applied to heaters being tuned on the mainboard.Incorrect, the timer is implemented on expansion boards.- How long do you need for the heater to get to temperature? Would 45 minutes be long enough? @dc42 has suggested he can increase the timeout for the next release.
Ian
-
@droftarts Looking at the console, it takes exactly 30 minutes before giving this error. At that point the temperature has risen to 121C. The temperature is still increasing, just not fast enough for the firmware.
I can try starting with the PID values from the chamber alone, increase the dead time, and try PID tuning again.
Yes I think if this process works, I'll have to make a macro or something that will heat the chamber and then separate the bed so it's temp can drop to the chamber temp.
-
@droftarts the 30 minute time limit makes sense, I expect I will need a lot longer than that just due to the amount of air, and thermal mass of the bed + the inner walls of the chamber.
I'll give your suggestions a shot and post an update. It's tough to say how long I'll need, I'm trying to do the calculations to find the heat capacity of the entire system and my heat losses. Perhaps the time to heat limit could be a user parameter? We've actually been trying to compile the firmware ourselves, but we're not very familiar with compiling for arm32 and it's been a challenge to get it to compile without errors.
-
@p8blr I've raised a feature request to add a parameter to override the default timeout: https://github.com/Duet3D/RepRapFirmware/issues/948
That doesn't help you immediately, though!We've actually been trying to compile the firmware ourselves, but we're not very familiar with compiling for arm32 and it's been a challenge to get it to compile without errors.
I've asked @dc42 for information on what needs changing in the firmware to change the timeout. If you are having trouble compiling, post a new thread with the errors you are getting. I assume you have seen this page? https://github.com/Duet3D/RepRapFirmware/wiki/Building-RepRapFirmware
Ian
-
@droftarts I'll have to get back to you on the compiling errors, but yes we're using that page as a guide.
On a different note, I attempted to autotune to 60C today, it hit that temperature very quickly, but got stuck in phase 3 and DWC stopped working. Refreshing the page gets to the "connecting" page but that's it. I've tried different phones/PCs but all get stuck at connecting. This has happened a lot before, but I figured it was a normal bug, but now I've noticed that it's correlating with me combining the heaters. It messes it up to the point that when I reboot the printer, that it won't connect again until I pull out the sd card, modify config.g and then start it up again.
Both versions of my config.g are over 2000 characters so I'm just attaching them
workingconfig.g
brokenconfig.g
DriveSetup.g
startup.g
daemon.gI should also note that I'm running a raspberry pi 4 in sbc mode with a fast 32gb samsung evo card, and I'm on release candidate 2 (same issue with 1)
-
@p8blr Can you press F12 or open the dev tools in your browser session and check for potential errors in the console? If nothing shows up there, can you please check the duetcontrolserver log? See the section about
journalctl
in https://github.com/Duet3D/DuetSoftwareFramework/wiki/SBC-Setup-Guide#increasing-log-level.It doesn't look like DSF loses connection to the Duet so I suspect something else is going on.
-
@chrishamm I'll have to put that code back and run a PID autotune again, I'll get back to you with an update.
-
@chrishamm I changed the settings and restarted and got the error, I didn't even have to autotune.
journalctl -u duetcontrolserver -f
Also I should mention that putty freezes up very frequently when this error happens.
-
@p8blr If PuTTY freezes as well that probably means the Pi stops working at some point. In that case I'd rather check the electronics again. Are you operating the Pi from the Duet's 5V rail? If yes, consider removing the 5V -> SBC jumper and hook up the Pi to an external 5V PSU.
-
@chrishamm I'm powering the pi via a usb C supply. My suspicion is that because the freezing happens at a regular pace, perhaps it has to do with the daemon.g. Is that possible?
-
@p8blr I need the full DuetControlServer log to answer that. Your excerpt didn't show anything significant.
-
@chrishamm How do I generate that?
-
@p8blr
journalctl -u duetcontrolserver --no-pager -b
-
-
-
@chrishamm I can, I'll get back to you on it...
-
@chrishamm So far I'm not getting any more issues connecting to the web interface with the heaters combined now, just errors that the DWC versions don't match.
-
@p8blr have you refreshed page? this bites me on occasion on upgrades!