🔧 Adjust temperature options

MarlinFirmware/Marlin#25503
This commit is contained in:
Scott Lahteine 2023-05-11 17:55:05 -05:00
parent b3947f2c54
commit 7721263b58
342 changed files with 11634 additions and 9547 deletions

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -662,13 +662,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -688,6 +692,8 @@
#define DEFAULT_Ki 3.22 #define DEFAULT_Ki 3.22
#define DEFAULT_Kd 65.83 #define DEFAULT_Kd 65.83
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -699,11 +705,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -738,23 +744,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -764,6 +754,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -775,7 +779,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -716,13 +716,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -745,6 +749,8 @@
#define DEFAULT_Ki 1.00 #define DEFAULT_Ki 1.00
#define DEFAULT_Kd 74.22 #define DEFAULT_Kd 74.22
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -756,11 +762,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -795,23 +801,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -821,6 +811,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -842,7 +846,9 @@
#define DEFAULT_bedKd 1164.25 #define DEFAULT_bedKd 1164.25
#endif #endif
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -716,13 +716,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -745,6 +749,8 @@
#define DEFAULT_Ki 1.00 #define DEFAULT_Ki 1.00
#define DEFAULT_Kd 74.22 #define DEFAULT_Kd 74.22
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -756,11 +762,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -795,23 +801,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -821,6 +811,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -843,7 +847,9 @@
#endif #endif
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 0.69 #define DEFAULT_Ki 0.69
#define DEFAULT_Kd 34.32 #define DEFAULT_Kd 34.32
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.02 #define DEFAULT_Ki 1.02
#define DEFAULT_Kd 69.29 #define DEFAULT_Kd 69.29
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 610.21 #define DEFAULT_bedKd 610.21
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -662,13 +662,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -689,6 +693,8 @@
#define DEFAULT_Ki 1.25 #define DEFAULT_Ki 1.25
#define DEFAULT_Kd 86.00 #define DEFAULT_Kd 86.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -700,11 +706,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -739,23 +745,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -765,6 +755,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -776,7 +780,9 @@
#define DEFAULT_bedKd 610.21 #define DEFAULT_bedKd 610.21
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -662,13 +662,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -689,6 +693,8 @@
#define DEFAULT_Ki 6.33 #define DEFAULT_Ki 6.33
#define DEFAULT_Kd 95.60 #define DEFAULT_Kd 95.60
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -700,11 +706,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -739,23 +745,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -765,6 +755,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -775,7 +779,9 @@
#define DEFAULT_bedKi 1.08 #define DEFAULT_bedKi 1.08
#define DEFAULT_bedKd 114.00 #define DEFAULT_bedKd 114.00
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 2.47 #define DEFAULT_Ki 2.47
#define DEFAULT_Kd 93.27 #define DEFAULT_Kd 93.27
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 287.61 #define DEFAULT_bedKd 287.61
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 97.91 #define DEFAULT_bedKd 97.91
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -688,6 +692,8 @@
#define DEFAULT_Ki 1.25 #define DEFAULT_Ki 1.25
#define DEFAULT_Kd 86.00 #define DEFAULT_Kd 86.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -699,11 +705,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -738,23 +744,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -764,6 +754,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -775,7 +779,9 @@
#define DEFAULT_bedKd 610.21 #define DEFAULT_bedKd 610.21
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -688,6 +692,8 @@
#define DEFAULT_Ki 1.25 #define DEFAULT_Ki 1.25
#define DEFAULT_Kd 86.00 #define DEFAULT_Kd 86.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -699,11 +705,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -738,23 +744,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -764,6 +754,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -775,7 +779,9 @@
#define DEFAULT_bedKd 610.21 #define DEFAULT_bedKd 610.21
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -692,6 +696,8 @@
#define DEFAULT_Ki 1.38 #define DEFAULT_Ki 1.38
#define DEFAULT_Kd 62.92 #define DEFAULT_Kd 62.92
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -703,11 +709,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -742,23 +748,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -768,6 +758,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -779,7 +783,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -692,6 +696,8 @@
#define DEFAULT_Ki 1.38 #define DEFAULT_Ki 1.38
#define DEFAULT_Kd 62.92 #define DEFAULT_Kd 62.92
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -703,11 +709,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -742,23 +748,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -768,6 +758,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -779,7 +783,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -692,6 +696,8 @@
#define DEFAULT_Ki 1.38 #define DEFAULT_Ki 1.38
#define DEFAULT_Kd 62.92 #define DEFAULT_Kd 62.92
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -703,11 +709,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -742,23 +748,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -768,6 +758,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -779,7 +783,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -692,6 +696,8 @@
#define DEFAULT_Ki 1.38 #define DEFAULT_Ki 1.38
#define DEFAULT_Kd 62.92 #define DEFAULT_Kd 62.92
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -703,11 +709,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -742,23 +748,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -768,6 +758,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -779,7 +783,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 2.03 #define DEFAULT_Ki 2.03
#define DEFAULT_Kd 71.17 #define DEFAULT_Kd 71.17
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 300.40 #define DEFAULT_bedKd 300.40
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 2.03 #define DEFAULT_Ki 2.03
#define DEFAULT_Kd 71.17 #define DEFAULT_Kd 71.17
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 300.40 #define DEFAULT_bedKd 300.40
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 2.03 #define DEFAULT_Ki 2.03
#define DEFAULT_Kd 71.17 #define DEFAULT_Kd 71.17
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 300.40 #define DEFAULT_bedKd 300.40
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -664,13 +664,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -690,6 +694,8 @@
#define DEFAULT_Ki 0.86 #define DEFAULT_Ki 0.86
#define DEFAULT_Kd 60.97 #define DEFAULT_Kd 60.97
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -701,11 +707,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -740,23 +746,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -766,6 +756,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -776,7 +780,9 @@
#define DEFAULT_bedKd 146.74 #define DEFAULT_bedKd 146.74
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.18 #define DEFAULT_Ki 1.18
#define DEFAULT_Kd 66.76 #define DEFAULT_Kd 66.76
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 523.14 #define DEFAULT_bedKd 523.14
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.18 #define DEFAULT_Ki 1.18
#define DEFAULT_Kd 66.76 #define DEFAULT_Kd 66.76
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.18 #define DEFAULT_Ki 1.18
#define DEFAULT_Kd 66.76 #define DEFAULT_Kd 66.76
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 3.31 #define DEFAULT_Ki 3.31
#define DEFAULT_Kd 117.51 #define DEFAULT_Kd 117.51
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 604.82 #define DEFAULT_bedKd 604.82
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -700,13 +700,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -726,6 +730,8 @@
#define DEFAULT_Ki 1.17 #define DEFAULT_Ki 1.17
#define DEFAULT_Kd 54.19 #define DEFAULT_Kd 54.19
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -737,11 +743,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -776,23 +782,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -802,6 +792,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -812,7 +816,9 @@
#define DEFAULT_bedKd 319.73 #define DEFAULT_bedKd 319.73
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -671,13 +671,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
//#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning //#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
#define MPCTEMP // ** EXPERIMENTAL ** #define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -697,6 +701,8 @@
#define DEFAULT_Ki 1.29 #define DEFAULT_Ki 1.29
#define DEFAULT_Kd 79.35 #define DEFAULT_Kd 79.35
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -708,11 +714,12 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5.7K bytes of flash)
#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) #define MPC_AUTOTUNE_FANCY // Include a fancier method to do MPC auto-tuning (~6.3K bytes of flash)
#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) #define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -747,23 +754,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -773,6 +764,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -783,7 +788,9 @@
#define DEFAULT_bedKd 319.73 #define DEFAULT_bedKd 319.73
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 0.84 #define DEFAULT_Ki 0.84
#define DEFAULT_Kd 64.84 #define DEFAULT_Kd 64.84
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 277.56 #define DEFAULT_bedKd 277.56
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 2.57 #define DEFAULT_Ki 2.57
#define DEFAULT_Kd 53.37 #define DEFAULT_Kd 53.37
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 194.30 #define DEFAULT_bedKd 194.30
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.04 #define DEFAULT_Ki 1.04
#define DEFAULT_Kd 23.88 #define DEFAULT_Kd 23.88
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 249.15 #define DEFAULT_bedKd 249.15
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 0.57 #define DEFAULT_Ki 0.57
#define DEFAULT_Kd 37.76 #define DEFAULT_Kd 37.76
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 132.55 #define DEFAULT_bedKd 132.55
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 0.57 #define DEFAULT_Ki 0.57
#define DEFAULT_Kd 37.76 #define DEFAULT_Kd 37.76
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 132.55 #define DEFAULT_bedKd 132.55
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 0.97 #define DEFAULT_Ki 0.97
#define DEFAULT_Kd 59.78 #define DEFAULT_Kd 59.78
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 366.04 #define DEFAULT_bedKd 366.04
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -697,6 +701,8 @@
#define DEFAULT_Ki 5.69 #define DEFAULT_Ki 5.69
#define DEFAULT_Kd 56.64 #define DEFAULT_Kd 56.64
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -708,11 +714,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -747,23 +753,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -773,6 +763,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -788,7 +792,9 @@
#define DEFAULT_bedKd 168.43 #define DEFAULT_bedKd 168.43
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.14 #define DEFAULT_Ki 1.14
#define DEFAULT_Kd 46.57 #define DEFAULT_Kd 46.57
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 325.08 #define DEFAULT_bedKd 325.08
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.14 #define DEFAULT_Ki 1.14
#define DEFAULT_Kd 46.57 #define DEFAULT_Kd 46.57
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 279.43 #define DEFAULT_bedKd 279.43
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.37 #define DEFAULT_Ki 1.37
#define DEFAULT_Kd 104.50 #define DEFAULT_Kd 104.50
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 104.5 #define DEFAULT_bedKd 104.5
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.37 #define DEFAULT_Ki 1.37
#define DEFAULT_Kd 104.50 #define DEFAULT_Kd 104.50
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 104.5 #define DEFAULT_bedKd 104.5
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 2.49 #define DEFAULT_Ki 2.49
#define DEFAULT_Kd 80.40 #define DEFAULT_Kd 80.40
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -771,7 +775,9 @@
#define DEFAULT_bedKd 539.89 #define DEFAULT_bedKd 539.89
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 2.49 #define DEFAULT_Ki 2.49
#define DEFAULT_Kd 80.40 #define DEFAULT_Kd 80.40
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -771,7 +775,9 @@
#define DEFAULT_bedKd 539.89 #define DEFAULT_bedKd 539.89
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -668,13 +668,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -694,6 +698,8 @@
#define DEFAULT_Ki 1.85 #define DEFAULT_Ki 1.85
#define DEFAULT_Kd 73.55 #define DEFAULT_Kd 73.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -705,11 +711,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -744,23 +750,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -770,6 +760,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -780,7 +784,9 @@
#define DEFAULT_bedKd 455.69 #define DEFAULT_bedKd 455.69
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -668,13 +668,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -694,6 +698,8 @@
#define DEFAULT_Ki 0.55 #define DEFAULT_Ki 0.55
#define DEFAULT_Kd 46.14 #define DEFAULT_Kd 46.14
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -705,11 +711,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) #define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) #define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 50.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 50.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -744,23 +750,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -770,6 +760,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -780,7 +784,9 @@
#define DEFAULT_bedKd 415.57 #define DEFAULT_bedKd 415.57
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 0.756 #define DEFAULT_Ki 0.756
#define DEFAULT_Kd 106.145 #define DEFAULT_Kd 106.145
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) #define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) #define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 627.184 #define DEFAULT_bedKd 627.184
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 2.00 #define DEFAULT_Ki 2.00
#define DEFAULT_Kd 66.47 #define DEFAULT_Kd 66.47
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -669,13 +669,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -700,6 +704,8 @@
//#define DEFAULT_Ki 0.45 //#define DEFAULT_Ki 0.45
//#define DEFAULT_Kd 3.00 //#define DEFAULT_Kd 3.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -711,11 +717,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -750,23 +756,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -776,6 +766,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -787,7 +791,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.07 #define DEFAULT_Ki 1.07
#define DEFAULT_Kd 70.38 #define DEFAULT_Kd 70.38
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.00 #define DEFAULT_Ki 1.00
#define DEFAULT_Kd 98.93 #define DEFAULT_Kd 98.93
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -662,13 +662,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -698,6 +702,8 @@
//#define DEFAULT_Ki 1.0 //#define DEFAULT_Ki 1.0
//#define DEFAULT_Kd 100.0 //#define DEFAULT_Kd 100.0
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -709,11 +715,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -748,23 +754,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -774,6 +764,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -789,7 +793,9 @@
//#define DEFAULT_bedKd 539 //#define DEFAULT_bedKd 539
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 16.53 #define DEFAULT_Ki 16.53
#define DEFAULT_Kd 113.58 #define DEFAULT_Kd 113.58
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 16.53 #define DEFAULT_Ki 16.53
#define DEFAULT_Kd 113.58 #define DEFAULT_Kd 113.58
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -670,13 +670,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -696,6 +700,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -707,11 +713,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -746,23 +752,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -772,6 +762,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -781,7 +785,9 @@
#define DEFAULT_bedKd 173.43 #define DEFAULT_bedKd 173.43
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -670,13 +670,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -696,6 +700,8 @@
#define DEFAULT_Ki 1.72 #define DEFAULT_Ki 1.72
#define DEFAULT_Kd 73.96 #define DEFAULT_Kd 73.96
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -707,11 +713,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -746,23 +752,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -772,6 +762,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -782,7 +786,9 @@
#define DEFAULT_bedKd 576.71 #define DEFAULT_bedKd 576.71
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 2.11 #define DEFAULT_Ki 2.11
#define DEFAULT_Kd 75.35 #define DEFAULT_Kd 75.35
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 452.51 #define DEFAULT_bedKd 452.51
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 4.2 #define DEFAULT_Ki 4.2
#define DEFAULT_Kd 80.6 #define DEFAULT_Kd 80.6
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED // CR-10 S5 config
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED // CR-10 S5 config
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -772,7 +776,9 @@
#define DEFAULT_bedKd 624.59 #define DEFAULT_bedKd 624.59
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.59 #define DEFAULT_Ki 1.59
#define DEFAULT_Kd 68.97 #define DEFAULT_Kd 68.97
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -668,13 +668,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -694,6 +698,8 @@
#define DEFAULT_Ki 1.59 #define DEFAULT_Ki 1.59
#define DEFAULT_Kd 59.40 #define DEFAULT_Kd 59.40
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -705,11 +711,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -744,23 +750,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -770,6 +760,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -782,7 +786,9 @@
#define DEFAULT_bedKd 1068.83 #define DEFAULT_bedKd 1068.83
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -668,13 +668,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -694,6 +698,8 @@
#define DEFAULT_Ki 1.59 #define DEFAULT_Ki 1.59
#define DEFAULT_Kd 59.40 #define DEFAULT_Kd 59.40
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -705,11 +711,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -744,23 +750,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -770,6 +760,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -782,7 +786,9 @@
#define DEFAULT_bedKd 1068.83 #define DEFAULT_bedKd 1068.83
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -772,7 +776,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.72 #define DEFAULT_Ki 1.72
#define DEFAULT_Kd 73.96 #define DEFAULT_Kd 73.96
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 576.71 #define DEFAULT_bedKd 576.71
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 290.86 #define DEFAULT_bedKd 290.86
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 3.46 #define DEFAULT_Ki 3.46
#define DEFAULT_Kd 92.02 #define DEFAULT_Kd 92.02
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 290.86 #define DEFAULT_bedKd 290.86
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 2.14 #define DEFAULT_Ki 2.14
#define DEFAULT_Kd 68.33 #define DEFAULT_Kd 68.33
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 180.88 #define DEFAULT_bedKd 180.88
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 0.81 #define DEFAULT_Ki 0.81
#define DEFAULT_Kd 63.12 #define DEFAULT_Kd 63.12
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 1349.52 #define DEFAULT_bedKd 1349.52
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 576.71 #define DEFAULT_bedKd 576.71
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 2.62 #define DEFAULT_Ki 2.62
#define DEFAULT_Kd 78.81 #define DEFAULT_Kd 78.81
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 624.59 #define DEFAULT_bedKd 624.59
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.56 #define DEFAULT_Ki 1.56
#define DEFAULT_Kd 73.30 #define DEFAULT_Kd 73.30
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -775,7 +779,9 @@
#define DEFAULT_bedKd 978.75 #define DEFAULT_bedKd 978.75
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -662,13 +662,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 2.50 #define DEFAULT_Ki 2.50
#define DEFAULT_Kd 66.64 #define DEFAULT_Kd 66.64
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 624.59 #define DEFAULT_bedKd 624.59
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 114.00
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 173.43 #define DEFAULT_bedKd 173.43
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 173.43 #define DEFAULT_bedKd 173.43
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 173.43 #define DEFAULT_bedKd 173.43
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 158.93 #define DEFAULT_bedKd 158.93
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -660,13 +660,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 2.26 #define DEFAULT_Ki 2.26
#define DEFAULT_Kd 83.64 #define DEFAULT_Kd 83.64
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 948.84 #define DEFAULT_bedKd 948.84
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 1.54 #define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55 #define DEFAULT_Kd 76.55
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 305.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.87 #define DEFAULT_Ki 1.87
#define DEFAULT_Kd 70.18 #define DEFAULT_Kd 70.18
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 624.59 #define DEFAULT_bedKd 624.59
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -686,6 +690,8 @@
#define DEFAULT_Ki 1.69 #define DEFAULT_Ki 1.69
#define DEFAULT_Kd 54.63 #define DEFAULT_Kd 54.63
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -697,11 +703,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -736,23 +742,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -762,6 +752,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 415.79 #define DEFAULT_bedKd 415.79
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -662,13 +662,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 2.62 #define DEFAULT_Ki 2.62
#define DEFAULT_Kd 78.81 #define DEFAULT_Kd 78.81
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -774,7 +778,9 @@
#define DEFAULT_bedKd 624.59 #define DEFAULT_bedKd 624.59
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 2.62 #define DEFAULT_Ki 2.62
#define DEFAULT_Kd 78.81 #define DEFAULT_Kd 78.81
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 624.59 #define DEFAULT_bedKd 624.59
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 2.62 #define DEFAULT_Ki 2.62
#define DEFAULT_Kd 78.81 #define DEFAULT_Kd 78.81
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 624.59 #define DEFAULT_bedKd 624.59
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

View file

@ -661,13 +661,17 @@
// @section hotend temp // @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. /**
// temperature control. Disable both for bang-bang heating. * Temperature Control
*
* (NONE) : Bang-bang heating
* PIDTEMP : PID temperature control (~4.1K)
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** //#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -687,6 +691,8 @@
#define DEFAULT_Ki 2.62 #define DEFAULT_Ki 2.62
#define DEFAULT_Kd 78.81 #define DEFAULT_Kd 78.81
#endif #endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif #endif
/** /**
@ -698,11 +704,11 @@
* @section mpctemp * @section mpctemp
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
//#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_INCLUDE_FAN // Model the fan speed? #define MPC_INCLUDE_FAN // Model the fan speed?
@ -737,23 +743,7 @@
//====================== PID > Bed Temperature Control ====================== //====================== PID > Bed Temperature Control ======================
//=========================================================================== //===========================================================================
/** // @section bed temp
* PID Bed Heating
*
* If this option is enabled set PID constants below.
* If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
/** /**
* Max Bed Power * Max Bed Power
@ -763,6 +753,20 @@
*/ */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/**
* PID Bed Heating
*
* The PID frequency will be the same as the extruder PWM.
* If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
* which is fine for driving a square wave into a resistive load and does not significantly
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
@ -773,7 +777,9 @@
#define DEFAULT_bedKd 624.59 #define DEFAULT_bedKd 624.59
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #else
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif
//=========================================================================== //===========================================================================
//==================== PID > Chamber Temperature Control ==================== //==================== PID > Chamber Temperature Control ====================

Some files were not shown because too many files have changed in this diff Show more