Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    New heater tuning algorithm

    Scheduled Pinned Locked Moved
    Beta Firmware
    33
    131
    15.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jbarrosundefined
      jbarros
      last edited by jbarros

      Just to add some data into this, I just performed pid tuning on a new printer I'm finishing, new heater model so I don't have a baseline for it.

      Heater: Keenovo 240V 750W 300x300mm
      Bed: 310x310x4mm

      RepRapFirmware for Duet 3 MB6HC version 3.2-beta4 running on Duet 3 MB6HC v1.01 or later (standalone mode)
      
      M308 S0 P"temp0" Y"thermistor" T100000 B3950       ; configure sensor 0 as thermistor on pin temp0 - 100k beta 3950 1% thermistor (Used in Keenovo AC silicone mats)
      
      28/11/2020, 22:47:58 M307 H0
      Heater 0 model: heating rate 0.911, cooling time constant 393.9, dead time 1.81, max PWM 1.00, calibration voltage 24.1, mode PIDComputed PID parameters: setpoint change: P108.5, I4.069, D137.1, load change: P108.5, I13.719, D137.1
      28/11/2020, 22:47:53 M303
      Heater 0 tuning succeeded, use M307 H0 to see result
      28/11/2020, 22:44:05 Warning: heater behaviour was not consistent during tuningAuto tuning heater 0 completed after 30 cycles in 1711 seconds. This heater needs the following M307 command: M307 H0 R0.911 C393.9 D1.81 S1.00 V24.1
      Edit the M307 H0 command in config.g to match this.
      28/11/2020, 22:42:06 M303
      Heater 0 is being tuned, phase 4 of 4
      28/11/2020, 22:18:24 Auto tune starting phase 3, fan off
      28/11/2020, 22:17:03 Auto tune starting phase 2, heater settling
      28/11/2020, 22:16:29 M303
      Heater 0 is being tuned, phase 2 of 4
      28/11/2020, 22:15:39 Auto tune starting phase 1, heater on
      28/11/2020, 22:15:33 M303 H0 S80
      Auto tuning heater 0 using target temperature 80.0°C and PWM 1.00 - do not leave printer unattended
      
      1 Reply Last reply Reply Quote 0
      • hmortensenundefined
        hmortensen
        last edited by

        Hi

        I've tried tuning my hotend heater after updating to 3.2b4, but this step "Auto tune starting phase 3, fan on" ran for 45 min without finishing, and then I turned it off.

        Is something wrong, or should it take this long?

        Attached snip of temp chart and console log.

        Screenshot 2020-11-29 200054.png

        11/29/2020, 7:47:45 PM	M303
        Heater 1 is being tuned, phase 5 of 5
        11/29/2020, 7:37:59 PM	M303
        Heater 1 is being tuned, phase 5 of 5
        11/29/2020, 7:11:50 PM	M303
        Heater 1 is being tuned, phase 5 of 5
        11/29/2020, 7:07:56 PM	M303
        Heater 1 is being tuned, phase 5 of 5
        11/29/2020, 7:05:29 PM	Auto tune starting phase 3, fan on
        11/29/2020, 7:04:57 PM	M303
        Heater 1 is being tuned, phase 4 of 5
        11/29/2020, 7:02:30 PM	M303
        Auto tune starting phase 3, fan off
        Heater 1 is being tuned, phase 4 of 5
        11/29/2020, 7:01:05 PM	Auto tune starting phase 2, heater settling
        11/29/2020, 7:01:03 PM	M303
        Heater 1 is being tuned, phase 2 of 5
        11/29/2020, 6:58:30 PM	M303
        Heater 1 is being tuned, phase 2 of 5
        11/29/2020, 6:58:05 PM	Auto tune starting phase 1, heater on
        11/29/2020, 6:58:00 PM	M303 T0 S250
        Auto tuning heater 1 using target temperature 250.0°C and PWM 1.00 - do not leave printer unattended
        11/29/2020, 6:57:47 PM	Connection established
        11/29/2020, 6:57:46 PM	Connection interrupted, attempting to reconnect...
        HTTP request timed out
        11/29/2020, 6:57:36 PM	Upload of config.g successful after 0s
        11/29/2020, 6:56:36 PM	M303 T0 S250
        Error: M303: heater 1 target temperature must be below the temperature limit for this heater (250.0C)
        11/29/2020, 6:44:03 PM	M122
        === Diagnostics ===
        RepRapFirmware for Duet 2 WiFi/Ethernet version 3.2-beta4 running on Duet WiFi 1.02 or later
        Board ID: 08DGM-917NK-F2MS4-7JTDJ-3SS6J-KWVNH
        Used output buffers: 3 of 24 (15 max)
        === RTOS ===
        Static ram: 24108
        Dynamic ram: 104312 of which 40 recycled
        Never used RAM 1588, free system stack 188 words
        Tasks: NETWORK(ready,148) HEAT(blocked,294) MAIN(running,459) IDLE(ready,20)
        Owned mutexes: WiFi(NETWORK)
        === Platform ===
        Last reset 00:46:27 ago, cause: software
        Last software reset details not available
        Error status: 0x00
        MCU temperature: min 28.1, current 28.9, max 29.4
        Supply voltage: min 23.9, current 24.0, max 24.3, under voltage events: 0, over voltage events: 0, power good: yes
        Driver 0: position 0, standstill, SG min/max not available
        Driver 1: position 0, standstill, SG min/max not available
        Driver 2: position 0, standstill, SG min/max not available
        Driver 3: position 0, standstill, SG min/max not available
        Driver 4: position 0, standstill, SG min/max not available
        Driver 5: position 0
        Driver 6: position 0
        Driver 7: position 0
        Driver 8: position 0
        Driver 9: position 0
        Driver 10: position 0
        Driver 11: position 0
        Date/time: 2020-11-29 18:43:55
        Cache data hit count 4294967295
        Slowest loop: 259.02ms; fastest: 0.19ms
        I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
        === Storage ===
        Free file entries: 10
        SD card 0 detected, interface speed: 20.0MBytes/sec
        SD card longest read time 4.6ms, write time 39.8ms, max retries 0
        === Move ===
        Hiccups: 0(0), FreeDm: 169, MinFreeDm: 169, MaxWait: 0ms
        Bed compensation in use: none, comp offset 0.000
        === MainDDARing ===
        Scheduled moves 0, completed moves 0, StepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
        === AuxDDARing ===
        Scheduled moves 0, completed moves 0, StepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
        === Heat ===
        Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
        === GCodes ===
        Segments left: 0
        Movement lock held by null
        HTTP is idle in state(s) 0
        Telnet is idle in state(s) 0
        File is idle in state(s) 0
        USB is idle in state(s) 0
        Aux is idle in state(s) 0
        Trigger is idle in state(s) 0
        Queue is idle in state(s) 0
        LCD is idle in state(s) 0
        Daemon is idle in state(s) 0
        Autopause is idle in state(s) 0
        Code queue is empty.
        === Network ===
        Slowest loop: 1754.37ms; fastest: 0.00ms
        Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions
        HTTP sessions: 1 of 8
        - WiFi -
        Network state is active
        WiFi module is connected to access point 
        Failed messages: pending 0, notready 0, noresp 0
        WiFi firmware version 1.24
        WiFi MAC address 60:01:94:2e:a5:fa
        WiFi Vcc 3.40, reset reason Turned on by main processor
        WiFi flash size 4194304, free heap 23840
        WiFi IP address 192.168.1.7
        WiFi signal strength -64dBm, mode none, reconnections 0, sleep mode modem
        Clock register 00002002
        Socket states: 0 0 0 0 0 0 0 0
        11/29/2020, 6:43:25 PM	M115
        FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.2-beta4 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2020-11-26
        11/29/2020, 6:41:14 PM	Connected to 192.168.1.7
        
        
        dc42undefined 1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators @gloomyandy
          last edited by

          @gloomyandy said in New heater tuning algorithm:

          @dc42 said in New heater tuning algorithm:

          Thanks; but I'd rather try my other suggestion, i.e. do idle cycles until the on-time settles (or a limit is reached). That way it should usually do less than 7 idle cycles.

          Hi I'll be interested to see how well that works. I did play around with something along those lines but could not find a good stability test that only needed a small number of cycles. I should also have said that in the my test version if the overall results are stable after 5 cycles then it will use those results (as it does now), the extra cycles are only used if things are not stable.

          Let me know if you want me to give anything a try.

          I've implemented that algorithm, and it works well on my bed heater that previously needed all 30 cycles. Now it needs 7 idle and 5 tuning cycles. The temperature graph clearly shows that the cooling time increases steadily through the idle cycles.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators @hmortensen
            last edited by

            @hmortensen said in New heater tuning algorithm:

            Hi

            I've tried tuning my hotend heater after updating to 3.2b4, but this step "Auto tune starting phase 3, fan on" ran for 45 min without finishing, and then I turned it off.

            Is something wrong, or should it take this long?

            The tuning algorithm does two idle cycles and up to 30 tining cycles until the data becomes stable. Yout heater struggles to reach 250C, so each cycle is taking 2 minutes. Therefore it could take a little over an hour. You could try using a lower target temperature.

            The next update uses a modified algorithm that often reduces the number of cycles needed in cases like yours.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            hmortensenundefined 1 Reply Last reply Reply Quote 0
            • hmortensenundefined
              hmortensen @dc42
              last edited by

              @dc42 said in New heater tuning algorithm:

              @hmortensen said in New heater tuning algorithm:

              Hi

              I've tried tuning my hotend heater after updating to 3.2b4, but this step "Auto tune starting phase 3, fan on" ran for 45 min without finishing, and then I turned it off.

              Is something wrong, or should it take this long?

              The tuning algorithm does two idle cycles and up to 30 tining cycles until the data becomes stable. Yout heater struggles to reach 250C, so each cycle is taking 2 minutes. Therefore it could take a little over an hour. You could try using a lower target temperature.

              The next update uses a modified algorithm that often reduces the number of cycles needed in cases like yours.

              Is it possible to control the fan when tuning? I rarely use it at 100% when printing, but the tuning turns it fully on.
              Can I see how many cycles it has run so far?
              Would the result be usefull at all, if I let it finish, or should I just wait for the next algorithm update?

              dc42undefined 1 Reply Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators @hmortensen
                last edited by

                @hmortensen said in New heater tuning algorithm:

                Is it possible to control the fan when tuning?

                No.

                I rarely use it at 100% when printing, but the tuning turns it fully on.

                When printing, the heating algorithm takes account of using the fan at reduced PWM.

                Can I see how many cycles it has run so far?

                Only by counting the cycles on the temperature graph.

                Would the result be usefull at all, if I let it finish, or should I just wait for the next algorithm update?

                Yes it would be useful; however the next version is likely to be available 1 to 2 days from now, so you may prefer to wait.

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                hmortensenundefined 1 Reply Last reply Reply Quote 0
                • hmortensenundefined
                  hmortensen @dc42
                  last edited by

                  @dc42 said in New heater tuning algorithm:

                  @hmortensen said in New heater tuning algorithm:

                  Is it possible to control the fan when tuning?

                  No.

                  I rarely use it at 100% when printing, but the tuning turns it fully on.

                  When printing, the heating algorithm takes account of using the fan at reduced PWM.

                  Can I see how many cycles it has run so far?

                  Only by counting the cycles on the temperature graph.

                  Would the result be usefull at all, if I let it finish, or should I just wait for the next algorithm update?

                  Yes it would be useful; however the next version is likely to be available 1 to 2 days from now, so you may prefer to wait.

                  Redid the tuning after updating to beta 4.1. This time it did finish after 45 min but with a warning.
                  Then I tried with S230 instead, and that took around 11 min and no warning.
                  Any guidelines to which temperature to tune at?

                  After saving with M500, it also rewrote the M307 for bed heater. I didn't retune bed heater yet. Is that normal?

                  1 Reply Last reply Reply Quote 0
                  • Exerqtorundefined
                    Exerqtor
                    last edited by

                    Just did a new tuning run on my hotend after finally recieving the magnum heatbreak for my mosquito, and well it for sure took a while.

                    It also ended with a warning:

                    5.12.2020, 00:43:25	M500
                    5.12.2020, 00:41:51	Warning: heater behaviour was not consistent during tuning
                    Auto tuning heater 1 completed after 3 idle and 30 tuning cycles in 3905 seconds. This heater needs the following M307 command:
                     M307 H1 R1.216 C265.2:232.2 D8.18 S1.00 V12.5
                    Send M500 to save this command in config-override.g
                    4.12.2020, 23:50:07	Auto tune starting phase 3, fan on
                    4.12.2020, 23:46:14	Auto tune starting phase 3, fan off
                    4.12.2020, 23:43:18	Auto tune starting phase 2, heater settling
                    4.12.2020, 23:36:50	Auto tune starting phase 1, heater on
                    4.12.2020, 23:36:45	M303 T0 S280
                    Auto tuning heater 1 using target temperature 280.0°C and PWM 1.00 - do not leave printer unattended
                    4.12.2020, 23:35:48	Connection established
                    

                    The setup is a Mosquito Magnum with a 12v / 50w heater, silicone sock, 40mm fan for hotend cooling and a "fang-style" part cooler powered by a 12v 5015.

                    1 Reply Last reply Reply Quote 0
                    • sozkanundefined
                      sozkan @dc42
                      last edited by sozkan

                      @dc42 said in New heater tuning algorithm:

                      @LB, I suggest you try the new algorithm on your bed heater. The new algorithm doesn't need the long cooldown period at the end, so it won't necessarily take longer.

                      Hi,
                      In my case, it took more than 2 and a half hours as seen 🙂 I have to give up and postpone for later.
                      prev.png

                      How many times it cycles I don`t know.
                      IT might be from our bed size; WhatsApp Image 2020-12-07 at 20.13.38.jpeg

                      However, the previous PID was very short. The reason I am doing it again because it fail to start heating after the firmware upgrade.

                      By the way on PID, Dyze dual heater and dual sensor kind of struggling me.
                      https://docs.dyzedesign.com/typhoon.html#liquid-cooling
                      It keeps failed. All was working on Duet2and3Firmware-3.1.1

                      Kind Regards

                      sozkanundefined 1 Reply Last reply Reply Quote 0
                      • sozkanundefined
                        sozkan @sozkan
                        last edited by

                        @sozkan Hi,
                        It is my second attempt at the trial of Autotuning heater 0.
                        It is started at 7:55 and it is still continuing now at 12:55. Isn`t something wrong?

                        The latest deal of; 12/8/2020, 9:13:27 AM Autotune starting phase 3, fan off. It keeps cycling heat on and off!

                        it is Duet 2 WiFi/Ethernet 3.2-beta4 (2020-11-26) installed on Duet2Wifi board.

                        jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                        • jay_s_ukundefined
                          jay_s_uk @sozkan
                          last edited by

                          @sozkan it will go to a maximum of 30 i think.
                          because your bed is so large i would just leave it to keep going

                          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                          sozkanundefined 1 Reply Last reply Reply Quote 0
                          • dc42undefined
                            dc42 administrators
                            last edited by

                            Beta 4.1 has an improved algorithm, that is sometimes much faster on large bed heaters.

                            Duet WiFi hardware designer and firmware engineer
                            Please do not ask me for Duet support via PM or email, use the forum
                            http://www.escher3d.com, https://miscsolutions.wordpress.com

                            1 Reply Last reply Reply Quote 1
                            • sozkanundefined
                              sozkan @jay_s_uk
                              last edited by

                              @jay_s_uk
                              Basically, it keeps cycling at stage 3. It was started at 7:56 and come to stage 3 at 9:13 the time now 15:44. I don't see any reason to continue for now.

                              Is there any way to set manually? I appreciate it if you suggest the changes because for me to figure out will take more time.

                              You can see on the table I define 5 important stages as I thought.
                              The recorded variables;
                              4Kw HeatBed.png

                              1 Reply Last reply Reply Quote 0
                              • dc42undefined
                                dc42 administrators
                                last edited by dc42

                                It will cycle for at most 30 cycles in stage 3. But the algorithm used in RRF 3.2beta4.1 is often quicker.

                                If it is now cooling down again, it has finished and you should see a result in the console. Send M303 without parameters to check.

                                Duet WiFi hardware designer and firmware engineer
                                Please do not ask me for Duet support via PM or email, use the forum
                                http://www.escher3d.com, https://miscsolutions.wordpress.com

                                sozkanundefined 1 Reply Last reply Reply Quote 0
                                • sozkanundefined
                                  sozkan @dc42
                                  last edited by sozkan

                                  @dc42 said in New heater tuning algorithm:

                                  It will cycle for at most 30 cycles in stage 3. But the algorithm used in RRF 3.2beta4.1 is often quicker.

                                  If it is now cooling down again, it has finished and you should see a result in the console. Send M303 without parameters to check.

                                  My heating table heats for about 3 minutes. from 35 to 40celsius. But cooling is 43 minutes on average due to the insulation and volume. In total each cycle taking 55 minutes on average. If 30 cycles, it is mean it should take more than 28 hours to complete.
                                  @sozkan
                                  By the way, this is the preview of the incomplete test of 4.0;
                                  prev2.png

                                  So I should go for 4.1 then immediately and share the results.
                                  Thanks for the help.

                                  1 Reply Last reply Reply Quote 0
                                  • dc42undefined
                                    dc42 administrators
                                    last edited by

                                    If it takes 43 minutes to cool by 5C but only 3 minutes to heat up, perhaps you have too much insulation? With most print surfaces, you need the bed to cool down before you can release the print.

                                    Why are you using such a low target temperature (40C)? All the materials I print with need 60C or more indicated temperature.

                                    Duet WiFi hardware designer and firmware engineer
                                    Please do not ask me for Duet support via PM or email, use the forum
                                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                                    sozkanundefined 2 Replies Last reply Reply Quote 1
                                    • sozkanundefined
                                      sozkan @dc42
                                      last edited by

                                      @dc42 you right but, It is just fresh to build a handcrafted heated bed with high voltage. I am afraid to run a higher temperature for safety concerns. therefore, I am aiming to test it first at low temperatures. But I cannot test before it runs smoothly, later I can PID for normal operating temperatures again.

                                      1 Reply Last reply Reply Quote 0
                                      • sozkanundefined
                                        sozkan @dc42
                                        last edited by sozkan

                                        @dc42 I was testing Autotuning with firmware latest 4.1 version, It took 7 hours, but still did not complete. The thing I have faced again, the motor cracking sound with this version too.
                                        So I revert back to firmware 3.2.3b that works smoothly on the motor axis. But the temperature tuning things that I have seen, not for my machine type. I am trying to figure out the M301, M303, M307 M950 parameters to set up manually with the values I find. If you could help me with it I appreciated.
                                        By the way, these parameters not valid in this firmware, wich was Firmware version 3.1.1 AutoTuning found values

                                        M307 H0 A233.3 C508.3 D1.3 S1.00 V24.3 B0
                                        

                                        4Kw HeatBed.png

                                        Thanks.

                                        1 Reply Last reply Reply Quote 0
                                        • jay_s_ukundefined
                                          jay_s_uk
                                          last edited by

                                          I am beta4.1 on a Duet 3 running in standalone mode.
                                          I have retuned my bed using the new algorithm.
                                          Whenever I heat up the bed to print, it faults with heating slower than expected.
                                          Here is my M307

                                          M307 H0 R1.468 C146.948:146.948 D2.43 S1.00 V27.0 B0
                                          

                                          I have a 500mm bed (10mm aluminium) running a 240v 2kw heater.
                                          Anything else I can provide?
                                          It takes the full 30 cycles to tune and fails.

                                          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                                          1 Reply Last reply Reply Quote 0
                                          • jay_s_ukundefined
                                            jay_s_uk
                                            last edited by

                                            I've rolled back to beta 2 to be able to tune the bed with the old algorithm and this was the result.

                                             M307 H0 A63.2 C50.0 D1.9 S1.00 V27.0
                                            

                                            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA