Marlin PID Autotune

3,810 views
Skip to first unread message

Eugene B

unread,
Mar 13, 2013, 6:07:29 PM3/13/13
to trinityl...@googlegroups.com
When I execute M303 S180 I get
PID Autotune start
PID Autotune failed Temperature to high  [sic]

If I just to M303 Marlin returns
16:04:23.022 : Error:checksum mismatch, Last Line: 137
16:04:23.024 : Resend: 138
16:04:26.085 : Error:Line Number is not Last Line Number+1, Last Line: 137
16:04:26.087 : Resend: 138
16:04:29.142 : Error:Line Number is not Last Line Number+1, Last Line: 137
16:04:29.144 : Resend: 138
16:04:32.195 : Error:Line Number is not Last Line Number+1, Last Line: 137
16:04:32.197 : Resend: 138

Does autotune also set values for the build bed heater or just the extruder?

Eugene

Tim Hester

unread,
Mar 13, 2013, 6:20:01 PM3/13/13
to Eugene B, trinityl...@googlegroups.com
Eugene, this thread in general, but this post in particular, may be of help;


In short, you may not be sending enough data to the M303 command since Marlin can support PID on the hotend and the bed. Try this;

M303 E-0 C8 S180

E-0= hot end
E-1= bed 

C = number of tuning cycles

S = target temperature




Eugene

--
You received this message because you are subscribed to the Google Groups "trinitylabs-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trinitylabs-ta...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Eugene B

unread,
Mar 13, 2013, 6:35:43 PM3/13/13
to trinityl...@googlegroups.com, Eugene B
Thank you.

I same new values using M304 and M500.

The bed still takes many minutes to heat up. It gets up with a degree and takes 20 min to reach the 70°C set point. The new PID values don't seem to have changed it.

Eugene

Eric Sorensen

unread,
Mar 13, 2013, 8:05:40 PM3/13/13
to trinityl...@googlegroups.com
I find that auto tuning usually gets me close to the right values, but I often end up tweaking them manually to get them just right.

Too much overshoot? Increase D, decrease P.
Response too damped? Increase P
Steady state error (like you are seeing)? Try increasing the I constant.

The values I have on the latest version of Marlin have been working well for me with the printers at our office. You can find it them at http://docs.trinitylabs.com. (I'm on my phone or I'd cut and paste them here..)

As a personal preference, I remove almost all temperature control from Slic3r. Other than having it turn off the heaters at the end of a print I don't have it set any temperatures at all. I don't find it inconvenient to set the bed temperature in pronterface and I like the flexibility of being able to start a print when I want to and change the temperature without being overridden at the start of a print.

-Eric


Eugene B

unread,
Mar 13, 2013, 10:08:59 PM3/13/13
to trinityl...@googlegroups.com
Eric,

Thanks for the link. My next unknown is trying to tackle loading and updating the configuration.h file. The updating_firmware document may come in handy.

When you suggest increasing and decreasing, are you talking 5%, 10%??

Interesting behavior... When the bed comes up from cold, it seems to hit the set point faster than when it is already warm. I have been trying to quickly move into the next print in an effort to reduce the warm-up time. Apparently, this has been detrimental. I don't quite understand why and how to over come it. I tried over-setting the temp manually, but this did not seem to help.

Eugene

John D

unread,
Mar 14, 2013, 2:02:19 AM3/14/13
to trinityl...@googlegroups.com
Eugene -

So I'm a bit confused - the autotune parameters are designed to manage temperature around a fixed point - that's their only purpose.  Are you saying if you set your bed at 110 it never goes past 70?

Eugene B

unread,
Mar 14, 2013, 10:27:28 AM3/14/13
to trinityl...@googlegroups.com
BEAUTIFUL, Eric. Increasing the I-value did the trick.

I still need to do some tweaking, but it is heating like 400 W should.

BTW, when I reset, it loses the settings. I guess that the bed PID needs to be set in the Marlin configuration.h. -- One more thing to learn.

Eugene

Eugene B

unread,
Mar 14, 2013, 10:35:05 AM3/14/13
to trinityl...@googlegroups.com
John,

When coming up from room temp, the bed would take 10 to 15 min to reach 70°C. If the bed was already warm, it would take 45 min to reach 70°C. I even trimmed the PTFE off of the thermistor. Once it got to the set temp, it was stable, but the warm up time was ridiculous.

Eugene

Sean Mitchell

unread,
Mar 14, 2013, 11:02:33 AM3/14/13
to Eugene B, trinitylabs-talk
Disclaimer: I have never tuned my PID, but this is based on other values stored in EEPROM and this will most likely apply to your problem...

After changing it via the M303, this is saved in your running config.

When you power your printer on, it loads the "saved config" into the "running config", which is why you are losing the setting when you reset.

If you modify the Configuration.h, this will only change your "factory default config", not your saved config or running config.

After tuning the values, enter M500 as you did before, which takes your running config and saves it as your startup config.

If you change it in Configuration.h and power your printer on, you should notice no change - the change only happens after "reverting to factory defaults" (via M502) but again, these would be lost on printer restart unless you save with M500.

tl;dr:  tune your values to how you want them, then enter M500.



--
You received this message because you are subscribed to the Google Groups "trinitylabs-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trinitylabs-ta...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
========
Sean Mitchell
50668 Köln

Germany
echo "zvgp...@tznvy.pbz" | tr '[a-m][n-z][A-M][N-Z]' '[n-z][a-m][N-Z][A-M]'

Eugene Bodrero

unread,
Mar 14, 2013, 11:53:52 AM3/14/13
to nospam20061...@muzik.ca, trinitylabs-talk
I understand your logic, but my observations were different. My heated bed PID settings would not stick with an M500. The behavior change is night and day. The nozzle PID values were retained, but the bed heater values were not. After a reset, the old values were used.

While I can numerically validate the nozzle PID values with M503, I don't know of a way to check the bed values (M304). So, in other words, I could be dreaming. But, following a failure to heat, killing the job, executing M304 and M500 with new values, the bed heated like a champ. After a reset, the old behavior returned, rinse and repeat.

One user mentioned that the bed heater was introduced later and M500 does not act on the bed PID values.

Eugene



On 3/14/2013 9:02 AM, Sean Mitchell wrote:
Disclaimer: I have never tuned my PID, but this is based on other values stored in EEPROM and this will most likely apply to your problem...

After changing it via the M303, this is saved in your running config.

When you power your printer on, it loads the "saved config" into the "running config", which is why you are losing the setting when you reset.

If you modify the Configuration.h, this will only change your "factory default config", not your saved config or running config.

After tuning the values, enter M500 as you did before, which takes your running config and saves it as your startup config.

If you change it in Configuration.h and power your printer on, you should notice no change - the change only happens after "reverting to factory defaults" (via M502) but again, these would be lost on printer restart unless you save with M500.

tl;dr:  tune your values to how you want them, then enter M500.

Jon Bondy

unread,
Mar 14, 2013, 10:02:55 PM3/14/13
to trinityl...@googlegroups.com
This link shows how to perform the PID tuning, and then use Repetier Host to permanently enter the new values into the EPROM:

http://www.soliwiki.com/PID_tuning

djam

unread,
Mar 14, 2013, 10:31:11 PM3/14/13
to trinityl...@googlegroups.com

Hi Jon,

I believe it is the Bed temp that is/was not stored rather then the extruder. The link looks
to only include the extruder details.

Jon Bondy

unread,
Mar 15, 2013, 8:29:48 AM3/15/13
to trinityl...@googlegroups.com
Sadly, I believe you are correct.  RH allows you to save the extruder PID information to EPROM, but not the bed PID.

Dave

unread,
Apr 23, 2013, 10:07:04 PM4/23/13
to trinityl...@googlegroups.com

I trace my adventures with this particular bit of arcana in this thread:

https://groups.google.com/forum/?fromgroups=#!topic/trinitylabs-talk/-x_W6LKeYv4

In short, running this autotune routine is easy, and probably pretty important.  I found significantly different values for P, I and D depending on temperature setting, so I will be using custom gcode to set them, based on the printer setting in Slic3r. 

Consider this a bump for this important topic, and a "me too" as well.

Dave

Reply all
Reply to author
Forward
0 new messages