Hotline:18914229323

How to adjust PID parameters of 3D printer

In the process of using 3D printer, temperature control is one of the important factors to ensure the printing quality. Whether printing PLA, ABS or other engineering plastics, the temperature stability and accuracy of nozzle and hot bed directly affect the key indexes such as interlayer adhesion, dimensional accuracy and surface smoothness. In order to achieve more accurate temperature control, 3D printers usually adopt PID (Proportional-Integral-Differential) control algorithm. This paper will introduce what PID parameters are and their functions in 3D printers, and explain in detail how to manually adjust PID parameters to optimize the printing effect.

1. What are PID parameters?

PID is the abbreviation of three control parameters: Proportional, Integral and Derivative. It is a feedback control mechanism widely used in industrial control system, which is used to adjust the system output to achieve the target value. In 3D printer, PID controller is used to keep the temperature of nozzle and hot bed stable near the set value to avoid overshoot or temperature fluctuation.

Specifically:
-P (proportional term): Adjust according to the difference between the current temperature and the target temperature. The larger the value, the faster the heating response.
-I (integral term): cumulative temperature error, which is used to eliminate steady-state error and improve temperature control accuracy.
-D (differential term): Predictive adjustment according to temperature change trend is helpful to reduce temperature fluctuation.

Second, why do you need to adjust PID parameters?

Most 3D printers have preset default PID parameters when they leave the factory, which are usually suitable for standard configurations and common materials. However, in the following cases, the user may need to readjust the PID parameters:
-Replaced the heating block, heating rod or thermistor;
-Different types of printing materials are used, requiring more accurate temperature control;
-Continuous temperature fluctuation or serious overshoot;
-Problems such as wire drawing, blocking or interlayer separation occur during printing.

Third, the method of automatic PID adjustment (recommended)

For most FDM 3D printers using Marlin firmware, users can automatically adjust PID through G code command. Take the nozzle as an example, and execute the following commands:

```gcode
M303 E0 S200 C8
```

Among them:
-'E0' means adjusting the nozzle (hot end);
-`S200 indicates the target temperature (adjustable according to the material);
-`C8 indicates the number of cycles, usually 5-10 times.

After the execution, the printer will automatically perform multiple heating and cooling cycles, and the system will calculate the optimal PID value according to the temperature change, and output the results at the control terminal. For example:

```
bias: 127, d: 127, Integral: 4876
PID: Kp=13.34, Ki=1.11, Kd=48.89
```

Write the above parameters into the printer firmware to take effect:

```gcode
M301 P13.34 I1.11 D48.89
```

If you want to save the settings, you need to do the following:

```gcode
M500
```

The PID parameters set in this way will be automatically loaded at the next startup.

Fourth, the skill of manually adjusting PID parameters

If users want to manually adjust PID parameters, they should follow the following steps:
1. Set the value of p first: gradually increase the value of p until the heating response is fast and not overshoot.
2. Add I value: slowly increase I value to eliminate steady-state error, but avoid integral saturation.
3. Finally adjust the D value: increasing the D value can reduce the temperature fluctuation, but it will cause oscillation if it is too large.

It is suggested to adjust only one parameter at a time, observe the change of temperature curve and optimize it step by step.

V. Conclusion

Reasonable adjustment of PID parameters can not only improve the temperature control accuracy of 3D printer, but also improve the printing quality and equipment stability. Although automatic PID tuning is the most convenient way at present, it is equally important for advanced users to understand its principle and manual debugging method. Through continuous practice and optimization, every 3D printing enthusiast can find the most suitable combination of PID parameters, making the printing process more efficient, stable and controllable.