1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Odd PID Auto Tune Values

Discussion in 'Troubleshooting' started by JeffreyB, Jun 27, 2017.

  1. JeffreyB

    JeffreyB Member

    Joined:
    Mar 25, 2016
    Messages:
    71
    Likes Received:
    29
    After not being able to hit 90 degs or above on the bed temp without an "Unhandled communication error" , Robo Support suggested I run the PID Autotune. I had to keep lowering the target value because the auto tune kept failing with a "time out error", until I got down to 75 degs. It finally completed but came up with these suggested PID values: Kp 393.35, Ki 72.75, Kd 531.7. I've never seen suggested PID values this far out. The bed PID values that came with the R2 were Kp 107.41, Ki 21.29, Kd 135.50. Does this indicate anything that might point to why the bed won't go above 89 degs?

    Thanks,
    Jeff
     
  2. Ed Ferguson

    Ed Ferguson Active Member

    Joined:
    Sep 21, 2016
    Messages:
    272
    Likes Received:
    220
    Jeff - FWIW, I just set my R2 bed temperature to 90 deg manually via the LCD (1st time I've had it over 60). From ambient to 90 took 14.5 minutes.

    Maybe try repeating my test and let's compare the times just to see if we're in the same ballpark.

    Also, the bed resistance, as measured with my Fluke multimeter, is 4 Ohms. P = V^2 / R. Assuming Robo is using the full 24 volts from the power supply, the bed calculates to be 144 Watts.
     
    #2 Ed Ferguson, Jun 27, 2017
    Last edited: Jun 27, 2017
  3. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Are your PID values for the bed anything close to the defaults. If you look at their current GITHUB source code for Marlin look at these lines in Configuration.h (https://github.com/Robo3D/Marlin/blob/R2/Marlin/Configuration.h)
    Code:
      #define  DEFAULT_bedKp 107.41
      #define  DEFAULT_bedKi 21.29
      #define  DEFAULT_bedKd 135.50
    I have found that running PID tuning then inserting the values using M301 H0 P1 I2 D3 then rerunning PID again inserting the resulting values and then a third time will usually get you very close to very usable and accurate PID values. The PID routines in Marlin are not exact so there is some variance from true PID values. But it is good enough to get you very close.

    Note when using M301 the Hnnn parameter will allow you to enter PID values for either the bed (H0) or the hotend (H1, H2, ...) Once you are sure that you have good PID values make sure you either modify the source, recompile and reupload or use M500 to store the values in EEPROM.
     
  4. JeffreyB

    JeffreyB Member

    Joined:
    Mar 25, 2016
    Messages:
    71
    Likes Received:
    29
    Not even close to the defaults. I'll try running several times, storing and re-running. And as I suspected and you confirmed, there is a timeout if the temp isn't moving upward. I'll need to increase the "WATCH_TEMP_PERIOD 20".

    Thanks!
     
  5. daniel871

    daniel871 Well-Known Member

    Joined:
    Apr 18, 2015
    Messages:
    1,322
    Likes Received:
    510
    What about a simple Gcode file with this in it and you just run the file to your heart's content?

    If PIDTEMPBED is enabled
    Code:
    M303 C5 E0 S230 U1
    M303 C5 E-1 S90 U1
    M500
    And just this if PIDTEMPBED is disabled
    Code:
    M303 C5 E0 S230 U1
    M500
    For reference: http://marlinfw.org/docs/gcode/M303.html
     
  6. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Yes the U1 parameter would also work to automatically place the values in memory then your M500 would store those. I would still run it multiple times using the new parameters each time. I might modify your code as follows
    Code:
    M303 C5 E-1 S90 U1
    M303 C5 E-1 S90 U1
    M303 C5 E-1 S90 U1
    M500
     
  7. daniel871

    daniel871 Well-Known Member

    Joined:
    Apr 18, 2015
    Messages:
    1,322
    Likes Received:
    510
    These files should work for any printer running Marlin, then (using the one that applies to whether the bed PID is enabled or not--hopefully the filename makes it obvious which is which).
     

    Attached Files:

    mark tomlinson likes this.

Share This Page