diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 1778fc28f6..eaf000c3ae 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -225,6 +225,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h index 89bfe5c18f..57ec74f9be 100644 --- a/Marlin/configurator/config/Configuration.h +++ b/Marlin/configurator/config/Configuration.h @@ -234,6 +234,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 12a82f5899..17da67953b 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -215,6 +215,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED // Felix Foil Heater #define DEFAULT_bedKp 103.37 diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index 9b1f10263e..9766961a50 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -215,6 +215,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED // Felix Foil Heater #define DEFAULT_bedKp 103.37 diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 3ec047bb7d..3245546126 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -231,6 +231,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 1bd2d63258..b1c63eb4fe 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -230,6 +230,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index f59283266a..6c12c2f192 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -254,6 +254,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index afe8ad85af..8d348ba9bc 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -230,6 +230,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index e7cd86ff73..d9d150f429 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -258,6 +258,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 22db0e955a..1ff5c482eb 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -259,6 +259,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 187f71b09b..cb61ca10f3 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -228,6 +228,8 @@ Here are some standard links for getting your machine calibrated: // to increase the heat up rate. However, if changed, user must be aware of the safety concerns // of drawing too much current from the power supply. +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 3b3f2e58b6..bf4e27960f 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -230,6 +230,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index ed5593057c..5064742066 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -636,6 +636,21 @@ float get_pid_output(int e) { pid_output = constrain(target_temperature_bed, 0, MAX_BED_POWER); #endif // PID_OPENLOOP + #ifdef PID_BED_DEBUG + SERIAL_ECHO_START; + SERIAL_ECHO(" PID_BED_DEBUG "); + SERIAL_ECHO(": Input "); + SERIAL_ECHO(current_temperature_bed); + SERIAL_ECHO(" Output "); + SERIAL_ECHO(pid_output); + SERIAL_ECHO(" pTerm "); + SERIAL_ECHO(pTerm_bed); + SERIAL_ECHO(" iTerm "); + SERIAL_ECHO(iTerm_bed); + SERIAL_ECHO(" dTerm "); + SERIAL_ECHOLN(dTerm_bed); + #endif //PID_BED_DEBUG + return pid_output; } #endif