PID auto tune

image_pdfimage_print

Temperature management by your 3D printer is often made using PID controller.

Requirements:

  • Pronterface (Windows, Mac)
  • Arduino IDE (optional)
  • 3D printer with active PID for the target heating element

Pronterface installation:

Pronterface is a cross platform host software for your 3D printer. It allows to send commands to your 3D printers in a simple way.

This application is stand alone and doesn’t require any installation

In order to be able to connect to your 3D printer you need to install the serial drivers of your electronic board.

Scalar 3D printers are using arduino MEGA 2560, so you only need to install Arduino IDE in order for the proper drivers to be installed.

Once you have downloaded the proper version of Pronterface , you will need to unzip it’s content in a folder.

Inside you should have the following file tree.

Pronterface PID

At this stage you will need to connect your 3D printer using a USB cable.

Once the drivers are installed, your OS will assign a specific COM port to your 3D printer.

Now you can launch « pronterface.exe »

The following window will appear

Pronterface PID

Warning!

Depending on your OS you might need the proper user rights in order to acces COM port

Consider running your application as Administrator

Once the drivers for the seria COM port are installed your 3D printer COM port should be visible inside the drop down list of Pronterface (1)

  1. You should see the proper COM port asigned to your Arduino MEGA inside this drop down list
  2. Select the baud rate to 115200Bps (at least for Scalar 3D printers)
  3. Push the Connect button.

Pronterface PID

Once connected you should have a lot of information coming into the console window on the left side of the application.

Pronterface PID

PID Auto tuning

PID auto tune has to be made when your heating element is at Ambient temperature. Otherwise you will get wrong parameters!

 

In the bottom part of the console view, you have a text box where you can enter single commands for your 3D printers,

Hot end PID

Iin order to perform the PID tuning of your hot end you will need to send the following command :

 M303 E0 S210 C8

E0 is for Extruder 0 (your hot end)  , S210 is the target temperature (here 201°C) and C8 is the amount of iterations to perform , Here 8. The higher the number the more accurate your PID will be.

Pronterface PID

you will need to wait a few minutes in order for the algorithm to converge to a set a values.

Pronterface PIDhere we found out

bias: 92 d: 92 min: 196.56 max: 203.75
Ku: 32.59 Tu: 54.92
Clasic PID
Kp: 19.56
Ki: 0.71
Kd: 134.26
PID Autotune finished ! Place the Kp, Ki and Kd constants in the configuration.h
#define DEFAULT_Kp 17.28
#define DEFAULT_Ki 0.63
#define DEFAULT_Kd 118.87

your PID values will be different from the one here

Take theses PID values into account

Use the following command in order for your controller to take the Ki, Kp, and Kd values into account

 M301 P17.28 I0.63 D118.87

Make sure you have updated the command with the PID values that you found!

Save your settings into the EEPROM

 M500

M500 allows to save your settings into the controller EEPRO


Heat bed PID Command

M303 E-1 S60 C8

Take the Heatbed PID values into account

 M304 P1 I2 D3

Save into EEPROM

 M500

 

 

(source http://reprap.org/wiki/PID_Tuning )