You Are Here: Home » 3D Printers » PID calibration for Prusa i3 MK2S/MK3 3D Printer

PID calibration for Prusa i3 MK2S/MK3 3D Printer


PID calibration for a Prusa i3 MK2S 3D printer.  This procedure will calibrate the extruder PID and heatbed PID and make the temperatures much more stable and static, avoiding large temperature swings of 4, 5, 6 or more degrees away from your normal printing temperature.

You will see that in the examples below I am using Octoprint to send commands to the Prusa i3 MK2S printer via its Terminal command tab, which also displays the results of those commands.  But you can use Pronterface or similar program to send commands and see the output.

The procedure:

Step 1: Enter the command “M503”

The M503 command reports the current settings that are in non-volatile EEPROM (the settings that stay after powering down and restarting your printer).  In the middle of these settings you will find the current PID settings for the extruder, highlighted in bold below.

Send: M503
Recv: echo:Steps per unit:
Recv: echo: M92 X100.00 Y100.00 Z400.00 E169.79
Recv: echo:Maximum feedrates (mm/s):
Recv: echo: M203 X500.00 Y500.00 Z12.00 E120.00
Recv: echo:Maximum Acceleration (mm/s2):
Recv: echo: M201 X9000 Y9000 Z500 E10000
Recv: echo:Acceleration: S=acceleration, T=retract acceleration
Recv: echo: M204 S1000.00 T1500.00
Recv: echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)
Recv: echo: M205 S0.00 T0.00 B20000 X10.00 Y10.00 Z0.20 E2.50
Recv: echo:Home offset (mm):
Recv: echo: M206 X0.00 Y0.00 Z0.00
Recv: echo:PID settings:
Recv: echo: M301 P14.91 I1.03 D54.03
Recv: echo:PID heatbed settings:
Recv: echo: M304 P126.13 I4.30 D924.76
Recv: echo:Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)
Recv: echo: M207 S3.00 F2700.00 Z0.00
Recv: echo:Recover: S=Extra length (mm) F:Speed (mm/m)
Recv: echo: M208 S0.00 F480.00
Recv: echo:Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries
Recv: echo: M209 S0
Recv: echo:Filament volumetric settings: Disabled
Recv: echo:Filament Runout Sensor: Disabled
Recv: ok

We’ll do the PID calibration on the extruder first.
Step 2: Enter the command “M303 E0 S190 C8”

The M303 command with parameter “E0” will start the “PID Autotune” procedure for the extruder.  This will heat up the extruder to the temperature defined in the S parameter, eg, 190°C (“S190”) 8 times (“C8”) and report the result.  I would recommend choosing the same temperature that you intend to use when printing your filament.

Send: M303 E0 S190 C8
Recv: PID Autotune start
.
.
.
Recv: bias: 98 d: 98 min: 185.91 max: 194.54
Recv: Ku: 28.92 Tu: 27.69
Recv: Classic PID
Recv: Kp: 17.35
Recv: Ki: 1.25
Recv: Kd: 60.05
Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from above into Configuration.h
Recv: ok

To apply the new PID settings, use the M301 command along with the Kp, Ki and Kd values reported above, replacing the letters “Kp” with “P”, “Ki” with “I” and “Kd” with “d”.  Finally use the M500 command to store those settings to the EEPROM so that they are remembered for the future.

Step 3: Enter these commands “M301 P17.35 I1.25 D60.05
“M500”

You can finally use the M503 command again to check that the new values have been stored to EEPROM.

Send: M503
Recv: echo:Steps per unit:
Recv: echo: M92 X100.00 Y100.00 Z400.00 E169.79
Recv: echo:Maximum feedrates (mm/s):
Recv: echo: M203 X500.00 Y500.00 Z12.00 E120.00
Recv: echo:Maximum Acceleration (mm/s2):
Recv: echo: M201 X9000 Y9000 Z500 E10000
Recv: echo:Acceleration: S=acceleration, T=retract acceleration
Recv: echo: M204 S1000.00 T1500.00
Recv: echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)
Recv: echo: M205 S0.00 T0.00 B20000 X10.00 Y10.00 Z0.20 E2.50
Recv: echo:Home offset (mm):
Recv: echo: M206 X0.00 Y0.00 Z0.00
Recv: echo:PID settings:
Recv: echo: M301 P17.35 I1.25 D60.05
Recv: echo:PID heatbed settings:
Recv: echo: M304 P126.13 I4.30 D924.76
Recv: echo:Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)
Recv: echo: M207 S3.00 F2700.00 Z0.00
Recv: echo:Recover: S=Extra length (mm) F:Speed (mm/m)
Recv: echo: M208 S0.00 F480.00
Recv: echo:Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries
Recv: echo: M209 S0
Recv: echo:Filament volumetric settings: Disabled
Recv: echo:Filament Runout Sensor: Disabled
Recv: ok

The PID settings are now stored.

Great, now let’s do the PID calibration for the heatbed.
Step 4: Enter the command “M303 E-1 S55 C8”

The M303 command with parameter “E-1” will start the “PID Autotune” procedure for the heatbed.  This will heat up the heatbed to the temperature defined in the S parameter, eg, 55°C (“S55”) 8 times (“C8”) and report the result.

Send: M303 E-1 S55 C8
Recv: PID Autotune start
.
.
.
Recv: bias: 77 d: 77 min: 53.82 max: 55.73
Recv: Ku: 102.20 Tu: 44.40
Recv: Classic PID
Recv: Kp: 61.32
Recv: Ki: 2.76
Recv: Kd: 340.33
Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from above into Configuration.h
Recv: ok

To apply the new PID heatbed settings, use the M304 command along with the Kp, Ki and Kd values reported above, replacing the letters “Kp” with “P”, “Ki” with “I” and “Kd” with “d”.  Finally use the M500 command to store those settings to the EEPROM so that they are remembered for the future.

Step 5: Enter these commands “M304 P61.32 I2.76 D340.33
“M500”

You can finally use the M503 command again to check that the new values have been stored to EEPROM.

Send: M503
Recv: echo:Steps per unit:
Recv: echo: M92 X100.00 Y100.00 Z400.00 E169.79
Recv: echo:Maximum feedrates (mm/s):
Recv: echo: M203 X500.00 Y500.00 Z12.00 E120.00
Recv: echo:Maximum Acceleration (mm/s2):
Recv: echo: M201 X9000 Y9000 Z500 E10000
Recv: echo:Acceleration: S=acceleration, T=retract acceleration
Recv: echo: M204 S1000.00 T1500.00
Recv: echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)
Recv: echo: M205 S0.00 T0.00 B20000 X10.00 Y10.00 Z0.20 E2.50
Recv: echo:Home offset (mm):
Recv: echo: M206 X0.00 Y0.00 Z0.00
Recv: echo:PID settings:
Recv: echo: M301 P17.35 I1.25 D60.05
Recv: echo:PID heatbed settings:
Recv: echo: M304 P61.32 I2.76 D340.33
Recv: echo:Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)
Recv: echo: M207 S3.00 F2700.00 Z0.00
Recv: echo:Recover: S=Extra length (mm) F:Speed (mm/m)
Recv: echo: M208 S0.00 F480.00
Recv: echo:Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries
Recv: echo: M209 S0
Recv: echo:Filament volumetric settings: Disabled
Recv: echo:Filament Runout Sensor: Disabled
Recv: ok

You should now have a nice stable set of temperatures the next time you print at your normal settings.

Related Posts:

  • No Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.