Strange Bed PID tune

edited July 6 in Repetier-Firmware
So i wanted to pid tune my rebuild printer before i start the task of collecting Z distortion data

when i pid tune at 90 degree it works ok, but when i try to tune for 100 it never stops and i get a timeout. it starts by heating and stops heating 2 times but after that it just heats and the temp slowly goes up. i use the C8 parameter in both cases.

Q... how much above does it need to go for being successful? what i think is that it just cant get high enough above 100 for a successful tune

Command send: M303 P1 S100 C8


13:18:10.272 : Info:PID Autotune start
13:19:43.100 : bias: 165 d: 89 min: 99.18 max: 100.48
13:20:10.939 : bias: 234 d: 20 min: 99.22 max: 100.55

after that the bed LED just blinks and the temp hovers arround 102... if i dont reset the printer it will timeout

what could be wrong here?

settings in firmware:

pid drive min: 80
pid drive max: 255

bed pid max value: 255

i tried to let the pid tune run, if going for 100 degrees it will at least reach 110 before timeout

13:55:34.902 : Info:PID Autotune start
14:03:59.665 : bias: 175 d: 79 min: 99.15 max: 100.48
14:04:30.651 : bias: 235 d: 19 min: 99.15 max: 100.58
14:14:31.986 : Error:PID Autotune failed! timeout


  • It is not a question of how much but more a question of how long. But a slong a syou can exceed the temperature you should be able to autotune it. From your log I see that you even got the first 2 iterations, but then it seems to not swing any more so you get the timeout after 10 minutes (dev 20 minutes).
  • yep... after the 2 iterations is stays pretty much at 101-102

    is there anything i can do to "fix" it ?
  • I think you are hanging here:

            if(heating == true && currentTemp > temp)   // switch heating -> off
                if(time - t2 > (controllerId < NUM_EXTRUDER ? 2500 : 1500))
                    pwm_pos[pwmIndex] = (bias - d);
                    t1 = time;
                    t_high = t1 - t2;

    You have set it to cooling with pwm pwm_pos[pwmIndex] = (bias - d); whcih is enough to keep > 100 so it never goes down. So I guess the algorithm does not work for that timing and you can do nothing.

    YOu might try with 95°C and use these values. SHould be pretty close.
  • oki... will try that (95 degrees)

    just curious is this a software bug or is it my hardware that somehow plays a trick on me?
  • so i send M303 P1 S95 C8

    same thing happend. and just before timeout temp was 108-109

    will try to load dev version and see if its the same thing
  • hmmm... just going through firmware settings

    could it have anything to do with HEATER_PWM_SPEED ?
  • same thing on dev version, but the timeout is not 20 mins. its the same 10 mins

    but then i  tried M502 and M500 to make sure eeprom is not screwed up

    sucess at 95 degrees
  • no success at 100 so think this is as far it goes

  • It is no software bug. It is how this pid tuning works. In the code part I shows you see it uses results from previous iterations to adjust. So heater off is not off just lower power - and in your case enough to not go down to < 100 which is why it times out. So just a not working combination between speed/max temperature/algorithm. Does not mean pid doe snot work with 100°C just autotune does not work at that high level.
Sign In or Register to comment.