Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    M303 PID Tuning Fails - "bad curve fit"

    Tuning and tweaking
    3
    3
    100
    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.
    • Tryptamine
      Tryptamine last edited by Tryptamine

      Hey guys,

      My printer is using a 12V heating patron on a 24V PSU.
      Suboptimal, i know, but hard to change due to the design of my printer.
      According to ohms Law, the heat output is 4 times higher as if used with 12V, which i could compensate for with a PWM Duty cycle of 0.25.

      I used RepRap 2.x before. Back then i was able to autotune the Heater and it was completely stable.
      In RRF 3.x this changed.

      I updated firmware and PID tuned, which oddly worked back then and lead to stable temps. Settings were:

      M307 H1 R10.72 C150.0 D3.34 S0.60 V24.0
      

      Today the temp overshot by 20ish Degrees. So i tried to autotune again and again, using

      M303 T0 P0.5 S220 A24
      

      and i always get

      Warning: Auto tune of heater 1 failed due to bad curve fit (R=10.395, 1/C=0.0067:0.0127, D=3.3)
      

      Also for P of 0.3, 0.6, etc.
      Using the report I calculated C to be 113.996. With the settings

      M307 H1 R10.395 C113.996 D3.3 S0.50 V24.0
      

      I get a perfectly flat curve at 220°C, if heated from like 200. If i heat from ambient, i overshoot by 20 degrees and the printer shuts down.

      Why so?
      Are the M307 settings of config.g used when i run M303?
      Can i somehow fit a model by myself?
      I can't find a proper explaination for R,C,D and how they relate to P,I,D so i can maybe tune them manually.

      Any help is greatly appreciated.

      Phaedrux dc42 2 Replies Last reply Reply Quote 0
      • Phaedrux
        Phaedrux Moderator @Tryptamine last edited by

        @tryptamine said in M303 PID Tuning Fails - "bad curve fit":

        My printer is using a 12V heating patron on a 24V PSU.
        Suboptimal, i know, but hard to change due to the design of my printer.

        Suboptimal is an understatement. It's downright dangerous. Reducing the PWM doesn't turn 24v into 12v, it just applies 24v a quarter of the time it normally would. If the controller or mosfet were to fail in a closed state your 12v heater would probably melt your block and start a fire.

        Is the heater really impossible to switch out? If so using a separate 12v supply and a relay would be a safer option.

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 1
        • dc42
          dc42 administrators @Tryptamine last edited by

          @tryptamine, as @Phaedrux says running a 12V heater from 24V is very dangerous. RRF has estimated that the hot end would reach a temperature of over 1550C if the heater was run at full power. You should replace the hot end heater by a 24V one if possible; otherwise, use a 12V PSU and connect the heater between +12V and the negative output of the heater port you are using.

          You could probably fool RRF into accepting parameters close to those, although I don't recommend it. You would need to reduce the R value to about 10 to bring the predicted temperature increase below 1500, and temporarily use M143 to make 1500C an acceptable temperature before the M307 command.

          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
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA