Setting your PID

If you are seeing large temperature fluctuations in your hot end, greater than five degrees in either direction, your PID settings are likely to blame. Luckily there is an easy fix for this as the Marlin firmware has a built in PID Auto tune function.

Before starting make sure all off your printer heaters are off or auto tune will fail!

To use this function, open repetier host and select the "manual control" tab (Print Panel for mac). There is a text box labled "G-Code" in which you can send individual functions to your motherboard. To activate the PID auto tune, enter the following code into the text box and hit send: M303 S190. Substitute 190 for your target temperature: e.g. For 200C your code would be: M303 S200.


Relevant information shown boxed in red.

Once you hit send, the auto tune function will take about 15 minutes to complete. You will see the following information in your log appear multiple times with different numeric values:

bias: 103 d: 103 min: 147.98 max: 152.02
Ku: 65.06 Tu: 30.67
Classic PID
Kp: 39.04
Ki: 2.55
Kd: 149.66

**Note: When the PID auto tune process is finished, you may receive a repeating error in your status readouts. "line number is not last line number+1, last line:0." Disconnect via the software and reconnect to remove this error. Use the final values before the error occurred.

The values you are looking for are Kp, Ki, and Kd. Write these values down, they will be your new PID values. To set these values, enter the following two lines of code as we did earlier, substituting your experimental values for the ones below:

M301 P39.04 I2.55 D149.66


The "M301" command sets the values to the running configuration, and "M500" saves that configuration to EEPROM.

Make sure you use your values and not the ones in this tutorial. Your Kp, Ki and Kd values will be unique to your hot end and target temperature.

If you continually print at different temperatures, I suggest creating a PID spreadsheet and running the auto tune function at temperatures. Adding the M301 command to your start Gcode will allow you to change your PID to the optimal values on the fly.

If you are having difficulties, feel free to contact us: support [at] solidoodle .COM

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License