RUG/Pennsylvania/State College/PID

From RepRap
Revision as of 18:38, 3 May 2014 by Jarred (talk | contribs)
Jump to: navigation, search

Introduction

Many of the printers in 312 have extremely unstable temperature swings. This is in fact not normal, and it leads to requiring preheating of extruders. It would be much easier to have this more stable if ever we want to leave the printers alone while printing. One of the best ways to make your extruders heat to a constant temperature is to tune your PID settings.

PID stands for proportional, integral, and derivative. It is a control algorithm used for controlling the heaters in the printers used.

Reasoning

Tuning your PID settings will in most cases eliminate the need for commenting out gcodes and preheating the extruder. A more stable temperature also means more stable extrusion. This is a good step to take for fine tuning your printer.

How to find the correct settings

Start by keeping in mind your print temperature. For the purpose of this exercise I will call this temperature 210C. Use your temperature when entering these gcodes!

Heat the extruder to twenty degrees below the target temperature. In this example the target temperature is 210C, so you should heat to 190C.

Enter the gcode which tells the machine to autotune PID settings:

 M303 S210 C5

Note that the number 210 following the 'S' correlates to your extruder's temperature. C5 means to cycle five times. More cycles means more accurate reported measurements. In this case five cycles should suffice.

You will get a lot of output in the terminal window about PID settings. Do not send any new commands, unplug the printer, unplug the computer, etc. until you see this line:

 PID Autotune finished! Place the Kp, Ki and Kd constants in the configuration.h

Above that line will be your P, I, and D settings:

 bias: 92 d: 92 min: 196.56 max: 203.75
 Ku: 32.59 Tu: 54.92
 Clasic PID
 Kp: 19.56
 Ki: 0.71
 Kd: 134.26
 PID Autotune finished ! Place the Kp, Ki and Kd constants in the configuration.h

To temporarily change the PID settings used for heating, use the below gcode. Again, the numbers following P, I, and D should coresspond with the settings you got from the autotune process:

 M301 P19.56 I0.71 D134.26

This setting will be erased upon powering off the printer. Since they are unique to each printer it is recommended you custom tailor the configuration.h in the firmware.