If the printing temperature varies too much during printing, it might leave behind artefacts, lines or gaps and other similar issues. To prevent that, you should perform PID tuning/calibration. The printer will "learn" how to heat up the nozzle to keep it at a stable temperature.

More and more printers have PID tuning already built-in. For printers without the tuning option, you can run the appropriate commands manually and still achieve the same benefits.

Before you begin, raise the hotend away from the bed by at least 10cm.

Original Prusa printers

If your printer is on firmware 2.0.12 or later, then it already has the ability to perform fully automated PID calibration. You can find out which firmware version you have by going into the Help menu. You should always keep your firmware up to date; you can find the latest version on Prusa drivers page.

If you have an older firmware, scroll down to the manual calibration section.

From the main menu of your printer, go to the Calibration page and then select PID calibration. Select the temperature at which you print most of the time.

The printer will then run the PID calibration automatically. You can see it working by observing the hotend temperature; it should rise and fall a few times (it typically does 5 cycles). When it completes, the temperature will no longer rise and you can continue to use your printer normally; no further changes are necessary.

PID tuning effect on printing temperature. Image by Prusa Research.

You can always re-run the calibration later if you decided to change your typical temperatures (when changing materials, for example). You should also re-run PID calibration if you move your printer to a location with different ambient temperature (to the basement, for example, where it's typically colder).

Other printers (Creality, Tevo, Anet, Wanhao, ...)

PID auto tuning is supported on Marlin based printers. Almost every popular printer on the market runs on Marlin firmware, so chances are yours is as well.

However, some manufactures are using their own custom version of Marlin and more often than not, features like PID tuning are disabled or at least not selectable from the menu. This is almost always the case with Chinese printers.

In any case, I highly recommend that you update your firmware first. Every Chinese printer that I know of has important safety features disabled. Without them, you are risking a serious fire. I recommend the TH3D firmware. It will enable safety features, but also the PID auto tuning.

In the Control -> Temperature menu, select the PID Autotune and set the temperature that you typically print at. The printer should start going through a few cycles of heating the nozzle.

You can observe this by looking at the hotend temperature. It will rise and fall repeatedly. When it stops rising, the process is complete, but you still have to save the settings. Otherwise, the printer will revert to old settings when you shut it down.

To save the new PID calibration settings, go to the Control menu and select Store settings. You should hear a beep. Remember the P, I and D values, reset your printer and check to see if they have remained the same.

You can always re-run the calibration later if you decided to change your typical temperatures (when changing materials, for example). You should also re-run PID calibration if you move your printer to a location with different ambient temperature (to the basement, for example, where it's typically colder).

Manual PID calibration

If you're unable to perform auto tuning, you can still run PID calibration manually.

You will need a way to access your printer via USB. You can connect it to your PC and use Pronterface to control it. Many slicers have similar features already built in. Another alternative is using OctoPrint.

Next, find the terminal for inputing commands to the printer. Depending on what you're using, you'll find the terminal at:

  • Pronterface - bottom right corner, next to the Send button
  • OctoPrint - select the Terminal tab in the upper part
  • Simplify3D - go to the Tools menu and select Machine Control Panel

Then, enter/run the following G-code commands:

1) Turn on the part cooling fan

M106 S255

2) Run PID calibration

M303 E0 C5 S210

If you have multiple extruders, repeat for each one by changing the E value (0, 1, ...).

The C value determines the number of cycles, 5 should be enough.

The S value is the temperature in °C that you typically print at.

3) Enter new PID settings

When the process completes, you should see the new values in the terminal, such as:

Kp: 19.56
Ki: 0.71
Kd: 134.26

The values will of course be different for your printer. Copy all three.

Next, we have to apply the new settings. Run the following command, but use your own values:

M301 P19.56 I0.71 D134.26

Notice that the Kp, Ki and Kd values are now called P, I and D respectively.

4) Save PID settings

The new PID values are now active, but we have to permanently store them as well. Otherwise, the printer will revert to old values when you shut it down.

To permanently store the new values, run the command:

M500

To verify that the settings were actually stored, restart your printer, connect to it again and then run this command:

M503

The printer will report back its current settings, where you will also find the P, I and D values. They should be the same as you've entered using the M301 command above.

Attribution

Cover photo by ZMorph Multitool 3D Printer on Unsplash.