Bed PID Tuning - Phil1988/FreeDi GitHub Wiki

What is PID Tuning?

PID tuning for the bed heater ensures that the bed temperature is maintained accurately, improving print consistency and first layer adhesion.

Good PID values mean:

  • Faster heatup times
  • Stable temperatures during printing (±1°C)
  • Better first layer adhesion
  • Consistent heating across the entire print

Time required: ~30-60 minutes (this depends hardly on your printer model and bed heater capabilities


Prerequisites

  • Printer homed and ready
  • No prints currently running
  • Good ventilation (bed will run at high temperature for extended periods)

What Temperature Should I Use?

Choose a bed temperature you typically use, e.g.:

  • PLA: 60°C
  • PETG: 70-80°C
  • ABS/ASA: 90-100°C
  • TPU: 40-50°C

⚠️ Tip: If you print multiple materials, tune at the temperature you use most often.


Methods to Perform PID Tuning for the Bed Heater

There are 2 ways to perform bed PID tuning. All methods perform the same calibration - they only differ in how you start it.

1. Using the Console in Mainsail

  1. Open the Console in Mainsail

  2. Enter the following command (replace 80 with your target temperature):

    PID_CALIBRATE HEATER=heater_bed TARGET=80
    
  3. The bed will do some heating cycles while the temperature response will be measured. Wait for the calibration to complete (~10 minutes)

  4. Once finished, save the results:

    SAVE_CONFIG
    

2. Using a Macro in Mainsail

You can also perform the PID tuning by using the "BED PID TUNE" macro in Mainsail. This method is equivalent to using the Console command, but it simplifies the process by triggering the macro directly.

  1. In Mainsail, look for the BED PID TUNE macro button

    image

  2. Click it to start the calibration

Note: Starting from FreeDi v1.40, this macro is included by default. If you're on an older version, you can add this to your macros.cfg:

# Bed PID tuning
# For more information, see https://www.klipper3d.org/Config_checks.html#calibrate-pid-settings
[gcode_macro BED_PID_TUNE]
description: "Perform PID tuning for the bed heater"
gcode:
    PID_CALIBRATE HEATER=heater_bed TARGET=80

Verification

After tuning:

  1. Open Mainsail and navigate to your printer.cfg
  2. Scroll to the bottom of the file
  3. You should see a section like this:
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 56.789
#*# pid_ki = 2.345
#*# pid_kd = 222.456

The exact values vary by every printer and even you will redo it on the same machine.


When to Re-Tune PID

You should recalibrate bed PID if:

  • You replace the heated bed or bed heater
  • You replace the bed thermistor
  • You notice temperature instability (oscillations, overshooting)
  • You move to a significantly different ambient temperature environment

Otherwise, PID tuning remains valid indefinitely.


Why Bed PID Tuning Matters

Proper bed PID tuning ensures:

  • Consistent bed temperature: Stable temperatures mean better adhesion throughout the print
  • Better first layer: No temperature variations that could cause warping or poor adhesion
  • Reduced defects: Less warping and lifting of prints
  • Faster heating: Bed reaches target faster and stays there
  • Safety: Prevents thermal runaway from poor temperature control

By performing PID tuning for the bed heater, you help ensure that the bed temperature remains stable, preventing issues like temperature overshoot or undershoot during printing.


Congratulations!

You've completed all the essential calibration steps! Your printer is now fully calibrated and ready to produce high-quality prints.


Next Steps:

  • Configure your slicer (see Slicer Setup Guide)
  • Learn the on-screen menu (see Menu Guide)
  • (Optional) Expanding the filesystem (for larger storage devices)
  • Or just start printing!