Skip to Content

How To Manually Tune a PID 3D Printer

Master manual PID tuning for 3D printers: Follow our step-by-step guide to optimize temperature control, enhance print quality, and stability

Written by:
Ben
Last updated:
11/23/2023

FDM 3D printers often need auto or manual PID (Proportional Integral Derivative) tuning if the printing temperature fluctuates constantly or frequently. Also, you may have to calibrate the PID values for a heated bed and a new extruder, hotend, or even a nozzle.

To manually PID tune a 3D printer, You can use Pronterface or similar software to run, monitor, and tune the g-code. Obtain, enter, and save the new PID values for the extruder and heated bed. Review the tuning effects and manually change the new PID values. 

Some 3D printers, like the Prusa models featuring firmware 2.0.12 and later versions, offer a convenient auto-tuning option through the LCD Menu. However, not all printers have this feature. Read on to learn how to manually tune a PID 3D printer, irrespective of the brand.

1. Prepare the 3D Printer for Manual PID Tuning

PID tuning is a vital calibration process. So, for the best results, you should not randomly calibrate settings like the PID values without preparing the 3D printer for the procedure. 

Here are the steps to prepare for tuning the PID of your 3D printer manually:

  1. Turn off the 3D printer and cool the heated bed/hotend. Disconnecting the power cable isn’t necessary.
  2. Unload the filament and remove any bits and pieces from the extruder. Ensure the 3D printer is clean and dry and in the location where you routinely print.
  3. Maintain normal ambient conditions, including temperature and wind, just like how it will be during a printing session. Breezes and drafts might interfere with PID tuning, so turn off your fans and close your windows.

2. Connect the 3D Printer To Your Computer

To manually tune your printer, you’ll need to access its live g-code during a test.

You may use a computer or another compatible device to interact with the 3D printer firmware. A laptop may be more convenient than a smartphone, tablet, or Raspberry Pi. You will need the 3D printer’s USB cable to connect to your computer as it runs the chosen software – more on that in a minute.  

3. Use Software To Access a G-Code Terminal

Manually tuning the PID settings of a 3D printer requires access to a g-code terminal. G-code access is necessary for all brands and models unless you use a turnkey PID auto-tuning feature.

You may use Pronterface, which has the most uncomplicated g-code console. Pronterface is a free, open-source application, so you won’t have to pay anything to use it.

No matter which slicer you use for your 3D printer, including OctoPrint, PrusaSlicer, Ultimaker Cura, etc., you can still use Pronterface to tune the PID settings manually. I don’t recommend Pronterface as a replacement for any slicer software because it isn’t the best or the fastest.

Here’s a Pronterface download and installation video to help you get started if you aren’t familiar with the application or its user interface:

Once you install Pronterface on your computer, use the USB to connect the terminal to your 3D printer. Verify that the 3D printer extruder or hotend is room temp, and ensure the bed is cool. Then, turn on the 3D printer with the filament already unloaded.

4. Obtain the Current PID Values (Optional Step)

Open Pronterface after connecting the computer and your 3D printer. You can obtain the current PID values if you wish to make a note of them. 

The current PID values can help you compare the new Proportional, Integral, and Derivative figures after tuning.

Such a comparison may not be necessary for everyone. Still, if you want to figure out how or why your 3D printer’s extruder or heated bed temperature fluctuated, tallying the current, old, and new PID values will likely offer valuable insight.

Besides, the current or old values will be handy if the new PID settings don’t pan out as you expected after tuning. 

Here are the steps to obtain the current PID values of an FDM 3D printer:

  1. Open the Pronterface application on your computer and ensure the connected 3D printer is on.
  2. Access the g-code terminal on Pronterface in your command console on the right.
  3. Type the code M503 in the terminal to obtain the current 3D printer settings.
  4. The PID values will appear as Kp or kP, Ki or kI, and Kd or kD.
  5. You can record these values elsewhere on your computer or paper for later reference.

5. Tune the 3D Printer Extruder’s PID Values

After you obtain the current PID values in the optional step 4, you can change these figures and feed them manually into your 3D printer firmware or mainboard. 

There’s an ongoing debate among 3D printer users about the accuracy or effects of the various firmware self-assessments and the resulting PID tuning. 3D printer brands and their experts are often noncommittal about auto and manual tuning of PID for Marlin-based firmware and others.

Still, an assessment or self-diagnosis run by the firmware is the best way to let the 3D printer figure out the required Proportional, Integral, and Derivative values.

When manually tuning your 3D printer, the basic formula you need to enter is M303 Ex Sx Cx, where x represents any number. 

Here’s what that means: 

  • M303 starts the test. M303 is the g-code to initiate the PID self-tuning process by your 3D printer firmware. 
  • E stands for the heated bed. If you want to tune the heated bed, insert a -1 or -2 after the E, which will initiate the tuning. However, if you test and tune the hotend, leave the E value at 0. 
  • S stands for the print temperature or hotend temperature. To set your ideal print temp, insert the desired degrees value after the S. The objective is to establish a target temperature you will frequently use for 3D printing. In this example, 210° C, or S210, is for PLA. If you print with ABS or PETG, choose those printing temperatures with S in the code. Hence, you may use S260 for ABS, S250 for PETG, etc.
  • C stands for the cycle. C represents the times your printer will check and adjust the temperature within a given time frame. You can select anywhere from 3 to 10 cycles, so use C3 or C10 based on your needs. Increasing the cycle count will prolong the PID tuning process for any FDM 3D printer.

In this example, let’s assume you have a standard FDM printer and predominantly print with PLA. The value you will likely want to enter is: 

  • M303 E0 S210 C5. You can change this example code M303 E0 S210 C5 as you deem fit for your purpose.

Once the PID tuning process is over, you will see the new values displayed in the command console. But these steps or the code need slight modification if you want to tune a heated 3D print bed’s PID.

6. Manually Tune a 3D Printer’s Heated Bed’s PID Values

You can use Pronterface and the same code format, M303 E S C, to tune a 3D printer’s heated bed’s PID values. However, the E and S values will change based on the heated bed’s target temperature. 

Here’s a step-by-step guide to manually tune a heated bed’s PID settings for a 3D printer:

  1. Follow all the preparing and setting up steps discussed above in this guide. Ensure the heated print bed is level, and there’s no breeze or other external influence.
  2. On the Pronterface command console, type and enter the code M303 E-1 S70 C5.
  3. E-1 is the default code for tuning the PID of a 3D printer’s heated bed, but not always. In some odd instances, people have encountered an error with E-1 in the tuning code. Check with your 3D printer or the manufacturer if there’s nothing in the owner’s manual. For some Prusa 3D printers, an anomaly changed the heated bed to E-2 instead of E-1. So, if you have any issues, toggle these E-1 and E-2 combinations in the tuning code.
  4. You can select S50, S60, S90, or S100, depending on the target temperature in Celsius.
  5. You can increase or reduce the cycles in the code to C10 or C3 for the desired accuracy.

Pronterface will return the new PID values for the 3D printer’s heated bed in the same console, as you would get the figures for the extruder hotend.

7. Note Down and Enter the New PID Values

When you see the new PID values on Pronterface, you can note them somewhere or directly copy the figures and enter them into the required code to feed the information to the 3D printer.

The code to enter new PID values is M301. The complete code is M301 Pxx.xx Iyy.yy Dzz.zz. The corresponding PID values you obtain after the tuning completes are the x, y, and z. 

The values are usually displayed up to two decimal places. You can use the same in the code.

Suppose the new PID values after tuning are:

  • Kp or kP: 33.00
  • Ki or kI: 3.30
  • Kd or kD: 82.46

Thus, the code to enter these values will be M301 P33.00 I3.30 D82.46. 

Type the code with the exact single spacing among M, P, I, and D numbers, and without any special characters other than the decimal points, as I have written in this example. Send the code to the 3D printer.

8. Save the New PID Values in the Mainboard

Entering the new or tuned PID values will only save the information on a memory card or drive if one is connected to the 3D printer. The M301 code is an interim step to feed the data, not save the tuned PID values to the 3D printer mainboard. You need to use the M500 code for that.

The M500 code saves the new information so that the firmware doesn’t restore the defaults as you restart the 3D printer or remove the memory card, flash drive, or stick. 

After you complete the M303 and M301 processes to tune the PID and enter the new values, enter M500 on the Pronterface g-code console and send it to the 3D printer. 

You don’t need to add anything to M500 to confirm and save the new PID values. 

As a standalone code, M500 won’t confirm anything if a preceding M301 step doesn’t feed the new PID values after the tuning process with M303. So, if you make a mistake, nothing will change. 

9. Review the Calibration Effects of PID Tuning

If you execute steps 1 through 8 in this guide sans any errors, you should be able to tune your 3D printer’s PID settings without any unexpected issues. 

This process applies to extruders or hotends and heated print beds. Still, 3D printers aren’t always predictable, so test the effects.

You may select a printing temperature or turn on the heated bed to see if there is any significant fluctuation on the LCD or through another user interface, like the slicer. A perfect PID tuning process can calibrate the settings so that the temperature won’t oscillate.

Of course, you may have some minor changes in a few moments while printing, especially when a cooling fan comes on or if there is any external influence. Any constant or severe fluctuation of the temperature of the extruder and hotend or the heated bed calls for further investigation. 

10. Adjust or Manually Change the New PID Values

The mainboard stores the new PID values you enter and saves them after tuning them as firmware default settings for your 3D printer. 

The calibrated PID settings will apply to your printing temperatures over time. 

However, you can manually adjust or change the old and even the new PID values based on the 3D printer’s performance. Some 3D printer enthusiasts take the default PID values and rely on the Zeigler-Nichols method to tune the settings. 

Here’s how a few people tune the classic PID parameters to print with some overshoot using the Zeigler-Nichols method:

  • New P value or modified kP (Kp): Kp or kP Classic x 0.55.
  • The I value remains unchanged, so Ki or kI Classic is used.
  • New D value or modified kD (Kd): Kd or kP Classic x 8/3.

The formula to tune PID for no overshoot 3D printing according to the Zeigler-Nichols method is:

  • The new kP is kP Classic / 3.
  • The new kI is kI Classic.
  • The new kD is kD Classic x 8/3.

Similarly, some 3D printer users change the PID values to tune the 3D printer based on hotend specs. 

So, suppose you upgrade from a 40W hotend to an 80W piece. Since the new hotend is twice as powerful, you can reduce the old PID values by half.

Running the PID tuning codes with Pronterface and saving the new values, as I have explained earlier in this article, should work for your 3D printer unless something is amiss.

Final Thoughts

Steps 1 through 8 shouldn’t take longer than a couple of minutes if you have all the essentials ready. However, PID tuning doesn’t solve all 3D printing temperature problems. Fluctuations more significant than +/- 5 °C may also be due to fans, thermistor wire or connector, and other issues.

Written by:
Ben
Last updated:
11/23/2023

About Ben

I started 3D printing since 2013 and have learned a lot since then. Because of this I want to share my knowledge of what I have learned in the past years with the community. Currently I own 2 Bambulab X1 Carbon, Prusa SL1S and a Prusa MK3S+. Hope you learn something from my blog after my years of experience in 3D printing.