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

    Auto tuning the bed heater

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    2
    5
    2.2k
    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.
    • RodFundefined
      RodF
      last edited by

      I thought I would change the bed heating from bang-bang to PID. It took me a while working through the documentation and the G code wiki to sort out what M code to send. After a couple of false starts I got a result. Actually I got 2 results so I am wondering which one to send with M304.
      M307 H0
      Heater 0 model: gain 361.6, time constant 647.2, dead time 9.3, max PWM 1.00, mode: PID
      Setpoint change: P34.3, I0.053, D223.6
      Load change: P34.3, I1.119, D223.6

      Warning: Heater 0 appears to be over-powered and a fire risk! If left on at full power, its temperature is predicted to reach 381C.
      Auto tune heater 0 with PWM=0.25 completed in 1797 sec, maximum temperature reached 103.5C
      Use M307 H0 to see the result

      M303 H0 P0.25 S120
      Auto tuning heater 0 - do not leave printer unattended

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

        You don't need to use M304 at all. Just put the M307 command with the specified gain, time constant and dead time parameters in config.g. Or, if you are running firmware 1.17 then after running auto tuning you can run M500 to write the M307 command to config-override.g.

        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
        • RodFundefined
          RodF
          last edited by

          Thanks for that dc42. I used M500 and here is my config-override file.

          ; This is a system-generated file - do not edit
          ; Heater model parameters
          M307 H0 A350.2 C637.4 D6.0 S1.00 B0
          M307 H1 A340.0 C140.0 D5.5 S1.00 B0
          M307 H2 A340.0 C140.0 D5.5 S1.00 B0
          M307 H3 A340.0 C140.0 D5.5 S1.00 B0
          M307 H4 A340.0 C140.0 D5.5 S1.00 B0
          M307 H5 A340.0 C140.0 D5.5 S1.00 B0
          M307 H6 A340.0 C140.0 D5.5 S1.00 B0
          M307 H7 A340.0 C140.0 D5.5 S1.00 B0
          ; Z probe parameters
          G31 T1 P500 X0.0 Y0.0 Z2.25
          G31 T3 P500 X0.0 Y0.0 Z0.70
          G31 T4 P500 X0.0 Y0.0 Z0.00

          If I do a M307 H0 I still get the bang-bang values.

          M307 H0
          Heater 0 model: gain 90.0, time constant 700.0, dead time 10.0, max PWM 1.00, mode: bang-bang

          I assume config-override overrides config.g. Is there any way of telling?

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

            Config-override.g should be invoked by putting a M501 command near the end of config.g. See https://duet3d.com/wiki/Configuring_RepRapFirmware_for_a_Cartesian_printer#Epilogue.

            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
            • RodFundefined
              RodF
              last edited by

              Great thanks dc42 that's done the trick.

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