Added PID tuning for heated bed
- Updated FW_version - Added PID heated bed tuning - Default PID bed temp set to 55°C - Changed PID default cycles from 5 to 8 (most seen in PID tuning guides)
This commit is contained in:
parent
8b674fc82b
commit
fa5672564c
|
|
@ -5,7 +5,7 @@
|
|||
#include "Configuration_prusa.h"
|
||||
|
||||
// Firmware version
|
||||
#define FW_version "3.0.10-11"
|
||||
#define FW_version "3.0.10-12"
|
||||
|
||||
#define FW_PRUSA3D_MAGIC "PRUSA3DFW"
|
||||
#define FW_PRUSA3D_MAGIC_LEN 10
|
||||
|
|
|
|||
|
|
@ -4869,7 +4869,7 @@ Sigma_Exit:
|
|||
{
|
||||
float temp = 150.0;
|
||||
int e=0;
|
||||
int c=5;
|
||||
int c=8;
|
||||
if (code_seen('E')) e=code_value();
|
||||
if (e<0)
|
||||
temp=70;
|
||||
|
|
|
|||
|
|
@ -1977,13 +1977,52 @@ const char * const MSG_PICK_Z_LANG_TABLE[LANG_NUM] PROGMEM = {
|
|||
MSG_PICK_Z_EN
|
||||
};
|
||||
|
||||
const char MSG_PID_BED_EN[] PROGMEM = "PID bed cal. ";
|
||||
const char MSG_PID_BED_DE[] PROGMEM = "PID Bett Kalibrier. ";
|
||||
const char MSG_PID_BED_NL[] PROGMEM = "PID bed kalibratie ";
|
||||
const char * const MSG_PID_BED_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||
MSG_PID_BED_EN,
|
||||
MSG_PID_BED_EN,
|
||||
MSG_PID_BED_EN,
|
||||
MSG_PID_BED_EN,
|
||||
MSG_PID_BED_EN,
|
||||
MSG_PID_BED_DE,
|
||||
MSG_PID_BED_NL
|
||||
};
|
||||
|
||||
const char MSG_PID_BED_FINISHED_EN[] PROGMEM = "PID bed cal. done ";
|
||||
const char MSG_PID_BED_FINISHED_DE[] PROGMEM = "PID Bett Kal. fertig";
|
||||
const char MSG_PID_BED_FINISHED_NL[] PROGMEM = "PID bed kal. klaar ";
|
||||
const char * const MSG_PID_BED_FINISHED_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||
MSG_PID_BED_FINISHED_EN,
|
||||
MSG_PID_BED_FINISHED_EN,
|
||||
MSG_PID_BED_FINISHED_EN,
|
||||
MSG_PID_BED_FINISHED_EN,
|
||||
MSG_PID_BED_FINISHED_EN,
|
||||
MSG_PID_BED_FINISHED_DE,
|
||||
MSG_PID_BED_FINISHED_NL
|
||||
};
|
||||
|
||||
const char MSG_PID_BED_RUNNING_EN[] PROGMEM = "PID bed cal. ";
|
||||
const char MSG_PID_BED_RUNNING_DE[] PROGMEM = "PID Bett Kal.";
|
||||
const char MSG_PID_BED_RUNNING_NL[] PROGMEM = "PID bed kal. ";
|
||||
const char * const MSG_PID_BED_RUNNING_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||
MSG_PID_BED_RUNNING_EN,
|
||||
MSG_PID_BED_RUNNING_EN,
|
||||
MSG_PID_BED_RUNNING_EN,
|
||||
MSG_PID_BED_RUNNING_EN,
|
||||
MSG_PID_BED_RUNNING_EN,
|
||||
MSG_PID_BED_RUNNING_DE,
|
||||
MSG_PID_BED_RUNNING_NL
|
||||
};
|
||||
|
||||
const char MSG_PID_EXTRUDER_EN[] PROGMEM = "PID calibration";
|
||||
const char MSG_PID_EXTRUDER_CZ[] PROGMEM = "PID kalibrace";
|
||||
const char MSG_PID_EXTRUDER_IT[] PROGMEM = "Calibrazione PID";
|
||||
const char MSG_PID_EXTRUDER_ES[] PROGMEM = "Calibracion PID";
|
||||
const char MSG_PID_EXTRUDER_PL[] PROGMEM = "Kalibracja PID";
|
||||
const char MSG_PID_EXTRUDER_DE[] PROGMEM = "PID Kalibrierung";
|
||||
const char MSG_PID_EXTRUDER_NL[] PROGMEM = "PID Kalibratie";
|
||||
const char MSG_PID_EXTRUDER_NL[] PROGMEM = "PID kalibratie";
|
||||
const char * const MSG_PID_EXTRUDER_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||
MSG_PID_EXTRUDER_EN,
|
||||
MSG_PID_EXTRUDER_CZ,
|
||||
|
|
@ -1994,13 +2033,13 @@ const char * const MSG_PID_EXTRUDER_LANG_TABLE[LANG_NUM] PROGMEM = {
|
|||
MSG_PID_EXTRUDER_NL
|
||||
};
|
||||
|
||||
const char MSG_PID_FINISHED_EN[] PROGMEM = "PID cal. finished";
|
||||
const char MSG_PID_FINISHED_EN[] PROGMEM = "PID cal. done ";
|
||||
const char MSG_PID_FINISHED_CZ[] PROGMEM = "PID kal. ukoncena";
|
||||
const char MSG_PID_FINISHED_IT[] PROGMEM = "Cal. PID completa";
|
||||
const char MSG_PID_FINISHED_ES[] PROGMEM = "Cal. PID terminada";
|
||||
const char MSG_PID_FINISHED_PL[] PROGMEM = "Kal. PID zakonczona";
|
||||
const char MSG_PID_FINISHED_DE[] PROGMEM = "PID Kal. fertig";
|
||||
const char MSG_PID_FINISHED_NL[] PROGMEM = "PID kal. klaar";
|
||||
const char MSG_PID_FINISHED_DE[] PROGMEM = "PID Kal. fertig ";
|
||||
const char MSG_PID_FINISHED_NL[] PROGMEM = "PID kal. klaar ";
|
||||
const char * const MSG_PID_FINISHED_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||
MSG_PID_FINISHED_EN,
|
||||
MSG_PID_FINISHED_CZ,
|
||||
|
|
@ -2011,13 +2050,13 @@ const char * const MSG_PID_FINISHED_LANG_TABLE[LANG_NUM] PROGMEM = {
|
|||
MSG_PID_FINISHED_NL
|
||||
};
|
||||
|
||||
const char MSG_PID_RUNNING_EN[] PROGMEM = "PID cal. ";
|
||||
const char MSG_PID_RUNNING_EN[] PROGMEM = "PID cal. ";
|
||||
const char MSG_PID_RUNNING_CZ[] PROGMEM = "PID kal. ";
|
||||
const char MSG_PID_RUNNING_IT[] PROGMEM = "Cal. PID";
|
||||
const char MSG_PID_RUNNING_ES[] PROGMEM = "Cal. PID ";
|
||||
const char MSG_PID_RUNNING_PL[] PROGMEM = "Kal. PID";
|
||||
const char MSG_PID_RUNNING_DE[] PROGMEM = "PID Kal. ";
|
||||
const char MSG_PID_RUNNING_NL[] PROGMEM = "PID kal. ";
|
||||
const char MSG_PID_RUNNING_DE[] PROGMEM = "PID Kal. ";
|
||||
const char MSG_PID_RUNNING_NL[] PROGMEM = "PID kal. ";
|
||||
const char * const MSG_PID_RUNNING_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||
MSG_PID_RUNNING_EN,
|
||||
MSG_PID_RUNNING_CZ,
|
||||
|
|
|
|||
|
|
@ -352,6 +352,12 @@ extern const char* const MSG_PAUSE_PRINT_LANG_TABLE[LANG_NUM];
|
|||
#define MSG_PAUSE_PRINT LANG_TABLE_SELECT(MSG_PAUSE_PRINT_LANG_TABLE)
|
||||
extern const char* const MSG_PICK_Z_LANG_TABLE[LANG_NUM];
|
||||
#define MSG_PICK_Z LANG_TABLE_SELECT(MSG_PICK_Z_LANG_TABLE)
|
||||
extern const char* const MSG_PID_BED_LANG_TABLE[LANG_NUM];
|
||||
#define MSG_PID_BED LANG_TABLE_SELECT(MSG_PID_BED_LANG_TABLE)
|
||||
extern const char* const MSG_PID_BED_FINISHED_LANG_TABLE[LANG_NUM];
|
||||
#define MSG_PID_BED_FINISHED LANG_TABLE_SELECT(MSG_PID_BED_FINISHED_LANG_TABLE)
|
||||
extern const char* const MSG_PID_BED_RUNNING_LANG_TABLE[LANG_NUM];
|
||||
#define MSG_PID_BED_RUNNING LANG_TABLE_SELECT(MSG_PID_BED_RUNNING_LANG_TABLE)
|
||||
extern const char* const MSG_PID_EXTRUDER_LANG_TABLE[LANG_NUM];
|
||||
#define MSG_PID_EXTRUDER LANG_TABLE_SELECT(MSG_PID_EXTRUDER_LANG_TABLE)
|
||||
extern const char* const MSG_PID_FINISHED_LANG_TABLE[LANG_NUM];
|
||||
|
|
|
|||
|
|
@ -273,8 +273,11 @@
|
|||
#define MSG_RESUMING_PRINT "Druck fortsetzen"
|
||||
#define MSG_PID_EXTRUDER "PID Kalibrierung"
|
||||
#define MSG_SET_TEMPERATURE "Temp.einstellen"
|
||||
#define MSG_PID_FINISHED "PID Kal. fertig"
|
||||
#define MSG_PID_RUNNING "PID Kal. "
|
||||
#define MSG_PID_FINISHED "PID Kal. fertig "
|
||||
#define MSG_PID_RUNNING "PID Kal. "
|
||||
#define(length=20, lines=1) MSG_PID_BED "PID Bett Kalibrier. "
|
||||
#define(length=20, lines=1) MSG_PID_BED_FINISHED "PID Bett Kal. fertig"
|
||||
#define(length=20, lines=1) MSG_PID_BED_RUNNING "PID Bett Kal."
|
||||
|
||||
#define MSG_CALIBRATE_PINDA "PINDA Temp. Kal."
|
||||
#define MSG_CALIBRATION_PINDA_MENU "PINDA Temp. Kal."
|
||||
|
|
|
|||
|
|
@ -271,8 +271,12 @@
|
|||
#define(length=20, lines=1) MSG_RESUMING_PRINT "Resuming print"
|
||||
#define(length=20, lines=1) MSG_PID_EXTRUDER "PID calibration"
|
||||
#define(length=20, lines=1) MSG_SET_TEMPERATURE "Set temperature:"
|
||||
#define(length=20, lines=1) MSG_PID_FINISHED "PID cal. finished"
|
||||
#define(length=20, lines=1) MSG_PID_RUNNING "PID cal. "
|
||||
#define(length=20, lines=1) MSG_PID_FINISHED "PID cal. done "
|
||||
#define(length=20, lines=1) MSG_PID_RUNNING "PID cal. "
|
||||
#define(length=20, lines=1) MSG_PID_BED "PID bed cal. "
|
||||
#define(length=20, lines=1) MSG_PID_BED_FINISHED "PID bed cal. done "
|
||||
#define(length=20, lines=1) MSG_PID_BED_RUNNING "PID bed cal. "
|
||||
|
||||
|
||||
#define(length=20, lines=1) MSG_CALIBRATE_PINDA "PINDA Temp. cal."
|
||||
#define(length=20, lines=1) MSG_CALIBRATION_PINDA_MENU "PINDA Temp. cal."
|
||||
|
|
|
|||
|
|
@ -270,10 +270,13 @@
|
|||
#define(length=20) MSG_FINISHING_MOVEMENTS "Bewegingen afwerken"
|
||||
#define MSG_PRINT_PAUSED "Druck pauzeren"
|
||||
#define MSG_RESUMING_PRINT "Print hervatten"
|
||||
#define MSG_PID_EXTRUDER "PID Kalibratie"
|
||||
#define MSG_PID_EXTRUDER "PID kalibratie"
|
||||
#define MSG_SET_TEMPERATURE "Temp. instellen"
|
||||
#define MSG_PID_FINISHED "PID kal. klaar"
|
||||
#define MSG_PID_RUNNING "PID kal. "
|
||||
#define MSG_PID_FINISHED "PID kal. klaar "
|
||||
#define MSG_PID_RUNNING "PID kal. "
|
||||
#define MSG_PID_BED "PID bed kalibratie "
|
||||
#define MSG_PID_BED_FINISHED "PID bed kal. klaar "
|
||||
#define MSG_PID_BED_RUNNING "PID bed kal. "
|
||||
|
||||
#define MSG_CALIBRATE_PINDA "PINDA Temp. kal."
|
||||
#define MSG_CALIBRATION_PINDA_MENU "PINDA Temp. kal."
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ bool printer_connected = true;
|
|||
|
||||
unsigned long display_time; //just timer for showing pid finished message on lcd;
|
||||
float pid_temp = DEFAULT_PID_TEMP;
|
||||
float pid_bed_temp = DEFAULT_PID_BED_TEMP;
|
||||
|
||||
bool long_press_active = false;
|
||||
long long_press_timer = millis();
|
||||
|
|
@ -771,7 +772,7 @@ void lcd_commands()
|
|||
enquecommand_P(PSTR("G1 Z15 F1500"));
|
||||
st_synchronize();
|
||||
#ifdef SNMM
|
||||
lcd_commands_step = 7;
|
||||
lcd_commands_step = 8;
|
||||
#else
|
||||
lcd_commands_step = 5;
|
||||
#endif
|
||||
|
|
@ -820,6 +821,48 @@ void lcd_commands()
|
|||
}
|
||||
}
|
||||
|
||||
if (lcd_commands_type == LCD_COMMAND_PID_BED) {
|
||||
char cmd1[30];
|
||||
|
||||
if (lcd_commands_step == 0) {
|
||||
custom_message_type = 3;
|
||||
custom_message_state = 1;
|
||||
custom_message = true;
|
||||
lcdDrawUpdate = 3;
|
||||
lcd_commands_step = 3;
|
||||
}
|
||||
if (lcd_commands_step == 3 && !blocks_queued()) { //PID calibration
|
||||
strcpy(cmd1, "M303 E-1 S");
|
||||
strcat(cmd1, ftostr3(pid_bed_temp));
|
||||
enquecommand(cmd1);
|
||||
lcd_setstatuspgm(MSG_PID_BED_RUNNING);
|
||||
lcd_commands_step = 2;
|
||||
}
|
||||
if (lcd_commands_step == 2 && pid_tuning_finished) { //saving to eeprom
|
||||
pid_tuning_finished = false;
|
||||
custom_message_state = 0;
|
||||
lcd_setstatuspgm(MSG_PID_BED_FINISHED);
|
||||
strcpy(cmd1, "M304 P");
|
||||
strcat(cmd1, ftostr32(_Kp));
|
||||
strcat(cmd1, " I");
|
||||
strcat(cmd1, ftostr32(_Ki));
|
||||
strcat(cmd1, " D");
|
||||
strcat(cmd1, ftostr32(_Kd));
|
||||
enquecommand(cmd1);
|
||||
enquecommand_P(PSTR("M500"));
|
||||
display_time = millis();
|
||||
lcd_commands_step = 1;
|
||||
}
|
||||
if ((lcd_commands_step == 1) && ((millis()- display_time)>2000)) { //calibration finished message
|
||||
lcd_setstatuspgm(WELCOME_MSG);
|
||||
custom_message_type = 0;
|
||||
custom_message = false;
|
||||
pid_temp = DEFAULT_PID_BED_TEMP;
|
||||
lcd_commands_step = 0;
|
||||
lcd_commands_type = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1574,6 +1617,25 @@ void pid_extruder() {
|
|||
|
||||
}
|
||||
|
||||
void pid_bed() {
|
||||
|
||||
lcd_implementation_clear();
|
||||
lcd.setCursor(1, 0);
|
||||
lcd_printPGM(MSG_SET_TEMPERATURE);
|
||||
pid_bed_temp += int(encoderPosition);
|
||||
if (pid_bed_temp > BED_MAXTEMP) pid_bed_temp = BED_MAXTEMP;
|
||||
if (pid_bed_temp < BED_MINTEMP) pid_bed_temp = BED_MINTEMP;
|
||||
encoderPosition = 0;
|
||||
lcd.setCursor(1, 2);
|
||||
lcd.print(ftostr3(pid_bed_temp));
|
||||
if (lcd_clicked()) {
|
||||
lcd_commands_type = LCD_COMMAND_PID_BED;
|
||||
lcd_return_to_status();
|
||||
lcd_update(2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void lcd_adjust_z() {
|
||||
int enc_dif = 0;
|
||||
int cursor_pos = 1;
|
||||
|
|
@ -2632,6 +2694,7 @@ MENU_ITEM(function, MSG_CALIBRATE_BED, lcd_mesh_calibration);
|
|||
MENU_ITEM(submenu, MSG_BED_CORRECTION_MENU, lcd_adjust_bed);
|
||||
MENU_ITEM(submenu, MSG_CALIBRATION_PINDA_MENU, lcd_pinda_calibration_menu);
|
||||
MENU_ITEM(submenu, MSG_PID_EXTRUDER, pid_extruder);
|
||||
MENU_ITEM(submenu, MSG_PID_BED, pid_bed);
|
||||
MENU_ITEM(submenu, MSG_SHOW_END_STOPS, menu_show_end_stops);
|
||||
MENU_ITEM(gcode, MSG_CALIBRATE_BED_RESET, PSTR("M44"));
|
||||
#ifndef SNMM
|
||||
|
|
|
|||
|
|
@ -94,7 +94,8 @@ void lcd_mylang();
|
|||
#define LCD_COMMAND_LONG_PAUSE 5
|
||||
#define LCD_COMMAND_LONG_PAUSE_RESUME 6
|
||||
#define LCD_COMMAND_PID_EXTRUDER 7
|
||||
|
||||
#define LCD_COMMAND_PID_BED 8
|
||||
|
||||
extern unsigned long lcd_timeoutToStatus;
|
||||
extern int lcd_commands_type;
|
||||
|
||||
|
|
|
|||
|
|
@ -138,9 +138,9 @@ CHANGE FILAMENT SETTINGS
|
|||
// Filament change configuration
|
||||
#define FILAMENTCHANGEENABLE
|
||||
#ifdef FILAMENTCHANGEENABLE
|
||||
#define FILAMENTCHANGE_XPOS 211
|
||||
#define FILAMENTCHANGE_YPOS 0
|
||||
#define FILAMENTCHANGE_ZADD 2
|
||||
#define FILAMENTCHANGE_XPOS 0
|
||||
#define FILAMENTCHANGE_YPOS -2.2
|
||||
#define FILAMENTCHANGE_ZADD 20
|
||||
#define FILAMENTCHANGE_FIRSTRETRACT -2
|
||||
#define FILAMENTCHANGE_FINALRETRACT -80
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ ADDITIONAL FEATURES SETTINGS
|
|||
*------------------------------------*/
|
||||
|
||||
// Define Prusa filament runout sensor
|
||||
//#define FILAMENT_RUNOUT_SUPPORT
|
||||
#define FILAMENT_RUNOUT_SUPPORT
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SUPPORT
|
||||
#define FILAMENT_RUNOUT_SENSOR 1
|
||||
|
|
@ -371,7 +371,8 @@ THERMISTORS SETTINGS
|
|||
#define Z_BABYSTEP_MAX 0
|
||||
|
||||
#define PINDA_PREHEAT_X 75
|
||||
#define PINDA_PREHEAT_Y 75
|
||||
#define PINDA_PREHEAT_Y -3
|
||||
#define PINDA_PREHEAT_Z 1
|
||||
#define PINDA_HEAT_T 120 //time in s
|
||||
|
||||
#define PINDA_MIN_T 50
|
||||
|
|
@ -385,10 +386,10 @@ THERMISTORS SETTINGS
|
|||
#define LONG_PRESS_TIME 1000 //time in ms for button long press
|
||||
#define BUTTON_BLANKING_TIME 200 //time in ms for blanking after button release
|
||||
|
||||
#define PAUSE_RETRACT 2
|
||||
#define PAUSE_RETRACT 1
|
||||
|
||||
#define DEFAULT_PID_TEMP 210
|
||||
|
||||
#define DEFAULT_RETRACTION 1 //used for PINDA temp compensation
|
||||
#define DEFAULT_RETRACTION 1 //used for PINDA temp calibration
|
||||
|
||||
#endif //__CONFIGURATION_PRUSA_H
|
||||
|
|
|
|||
|
|
@ -408,6 +408,7 @@ THERMISTORS SETTINGS
|
|||
#define PAUSE_RETRACT 1
|
||||
|
||||
#define DEFAULT_PID_TEMP 210
|
||||
#define DEFAULT_PID_BED_TEMP 55
|
||||
|
||||
#define DEFAULT_RETRACTION 1 //used for PINDA temp calibration
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue