From 6feab85252473a96594f3df0f048e2b360f5f463 Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Tue, 25 Jul 2023 17:24:02 +0200 Subject: [PATCH] Rebase update REVO and solve @wavexx comments --- Firmware/Marlin_main.cpp | 2 +- Firmware/menu.h | 6 +-- Firmware/temp_model/e3d_REVO.h | 19 --------- Firmware/temp_model/e3d_REVO_HF_60W.h | 19 --------- Firmware/thermal_model.h | 8 ++-- Firmware/thermal_model/e3d_REVO.h | 19 +++++++++ Firmware/thermal_model/e3d_REVO_HF_60W.h | 19 +++++++++ Firmware/ultralcd.h | 2 +- Firmware/util.h | 12 +++--- .../variants/1_75mm_MK3-EINSy10a-E3DREVO.h | 30 +++++++------- .../1_75mm_MK3-EINSy10a-E3DREVO_HF_60W.h | 30 +++++++------- .../variants/1_75mm_MK3S-EINSy10a-E3DREVO.h | 30 +++++++------- .../1_75mm_MK3S-EINSy10a-E3DREVO_HF_60W.h | 30 +++++++------- Firmware/variants/README.md | 40 +++++++++---------- 14 files changed, 133 insertions(+), 133 deletions(-) delete mode 100644 Firmware/temp_model/e3d_REVO.h delete mode 100644 Firmware/temp_model/e3d_REVO_HF_60W.h create mode 100644 Firmware/thermal_model/e3d_REVO.h create mode 100644 Firmware/thermal_model/e3d_REVO_HF_60W.h diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 5ea788e795..cb0e891028 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -7332,7 +7332,7 @@ SERIAL_PROTOCOLPGM("\n\n"); #ifdef THERMAL_MODEL /*! - ### M310 - Thermal model settings M310: Thermal model settings + ### M310 - Thermal model settings M310: Thermal model settings #### Usage M310 ; report values diff --git a/Firmware/menu.h b/Firmware/menu.h index 02692984e4..f3425b81fa 100755 --- a/Firmware/menu.h +++ b/Firmware/menu.h @@ -33,12 +33,12 @@ extern uint8_t menu_depth; //! definition of reasons blocking the main menu //! Use them as bit mask, so that the code may set various errors at the same time enum ESeriousErrors { - MENU_BLOCK_NONE = 0, - MENU_BLOCK_THERMAL_ERROR = 0x01, + MENU_BLOCK_NONE = 0, + MENU_BLOCK_THERMAL_ERROR = 0x01, #ifdef THERMAL_MODEL MENU_BLOCK_THERMAL_MODEL_AUTOTUNE = 0x02, #endif - MENU_BLOCK_STATUS_SCREEN_M0 = 0x04, + MENU_BLOCK_STATUS_SCREEN_M0 = 0x04, }; // and possibly others in the future. //! this is a flag for disabling entering the main menu and longpress. If this is set to anything != diff --git a/Firmware/temp_model/e3d_REVO.h b/Firmware/temp_model/e3d_REVO.h deleted file mode 100644 index d129cd11b3..0000000000 --- a/Firmware/temp_model/e3d_REVO.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#define TEMP_MODEL_E3D_REVO_VER 1 // model parameters version - -#define TEMP_MODEL_E3D_REVO_P 40. // heater power (W) -#define TEMP_MODEL_E3D_REVO_U -0.0014 // linear temperature coefficient (W/K/power) -#define TEMP_MODEL_E3D_REVO_V 1.05 // linear temperature intercept (W/power) - -#define TEMP_MODEL_E3D_REVO_C 8.77 // initial guess for heatblock capacitance (J/K) -#define TEMP_MODEL_E3D_REVO_R 25.3 // initial guess for heatblock resistance (K/W) - -#define TEMP_MODEL_E3D_REVO_fS 0.15 // sim. 1st order IIR filter factor (f=100/27) -#define TEMP_MODEL_E3D_REVO_LAG 270 // sim. response lag (ms, 0-2160) - -#define TEMP_MODEL_E3D_REVO_W 0.85 // Default warning threshold (K/s) -#define TEMP_MODEL_E3D_REVO_E 1.23 // Default error threshold (K/s) - -// fall-back resistance vector (R0-15) -#define TEMP_MODEL_E3D_REVO_Rv {TEMP_MODEL_E3D_REVO_R, 23.9, 22.5, 19.6, 19.0, 18.3, 17.7, 17.1, 16.8, 16.5, 16.3, 16.0, 15.9, 15.7, 15.6, 15.4} diff --git a/Firmware/temp_model/e3d_REVO_HF_60W.h b/Firmware/temp_model/e3d_REVO_HF_60W.h deleted file mode 100644 index 1da2c22ea2..0000000000 --- a/Firmware/temp_model/e3d_REVO_HF_60W.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#define TEMP_MODEL_E3D_REVO_HF_60W_VER 1 // model parameters version - -#define TEMP_MODEL_E3D_REVO_HF_60W_P 60. // heater power (W) -#define TEMP_MODEL_E3D_REVO_HF_60W_U -0.0014 // linear temperature coefficient (W/K/power) -#define TEMP_MODEL_E3D_REVO_HF_60W_V 1.05 // linear temperature intercept (W/power) - -#define TEMP_MODEL_E3D_REVO_HF_60W_C 9.10 // initial guess for heatblock capacitance (J/K) -#define TEMP_MODEL_E3D_REVO_HF_60W_R 30.6 // initial guess for heatblock resistance (K/W) - -#define TEMP_MODEL_E3D_REVO_HF_60W_fS 0.15 // sim. 1st order IIR filter factor (f=100/27) -#define TEMP_MODEL_E3D_REVO_HF_60W_LAG 270 // sim. response lag (ms, 0-2160) - -#define TEMP_MODEL_E3D_REVO_HF_60W_W 0.85 // Default warning threshold (K/s) -#define TEMP_MODEL_E3D_REVO_HF_60W_E 1.23 // Default error threshold (K/s) - -// fall-back resistance vector (R0-15) -#define TEMP_MODEL_E3D_REVO_HF_60W_Rv {TEMP_MODEL_E3D_REVO_HF_60W_R, 29.0, 27.5, 24.5, 23.4, 22.3, 21.2, 20.2, 19.8, 19.4, 19.0, 18.6, 18.3, 18.1, 17.9, 17.7} diff --git a/Firmware/thermal_model.h b/Firmware/thermal_model.h index 225c5c225b..b5e6966507 100644 --- a/Firmware/thermal_model.h +++ b/Firmware/thermal_model.h @@ -27,10 +27,10 @@ struct model_data { // temporary buffers float dT_lag_buf[THERMAL_MODEL_MAX_LAG_SIZE]; // transport delay buffer - uint8_t dT_lag_size = 0; // transport delay buffer size - uint8_t dT_lag_idx = 0; // transport delay buffer index - float dT_err_prev = 0; // previous temperature delta error - float T_prev = 0; // last temperature extruder + uint8_t dT_lag_size = 0; // transport delay buffer size + uint8_t dT_lag_idx = 0; // transport delay buffer index + float dT_err_prev = 0; // previous temperature delta error + float T_prev = 0; // last temperature extruder // configurable parameters float P; // heater power (W) diff --git a/Firmware/thermal_model/e3d_REVO.h b/Firmware/thermal_model/e3d_REVO.h new file mode 100644 index 0000000000..a4fb355d58 --- /dev/null +++ b/Firmware/thermal_model/e3d_REVO.h @@ -0,0 +1,19 @@ +#pragma once + +#define THERMAL_MODEL_E3D_REVO_VER 1 // model parameters version + +#define THERMAL_MODEL_E3D_REVO_P 40. // heater power (W) +#define THERMAL_MODEL_E3D_REVO_U -0.0014 // linear temperature coefficient (W/K/power) +#define THERMAL_MODEL_E3D_REVO_V 1.05 // linear temperature intercept (W/power) + +#define THERMAL_MODEL_E3D_REVO_C 8.77 // initial guess for heatblock capacitance (J/K) +#define THERMAL_MODEL_E3D_REVO_R 25.3 // initial guess for heatblock resistance (K/W) + +#define THERMAL_MODEL_E3D_REVO_fS 0.15 // sim. 1st order IIR filter factor (f=100/27) +#define THERMAL_MODEL_E3D_REVO_LAG 270 // sim. response lag (ms, 0-2160) + +#define THERMAL_MODEL_E3D_REVO_W 0.85 // Default warning threshold (K/s) +#define THERMAL_MODEL_E3D_REVO_E 1.23 // Default error threshold (K/s) + +// fall-back resistance vector (R0-15) +#define THERMAL_MODEL_E3D_REVO_Rv {THERMAL_MODEL_E3D_REVO_R, 23.9, 22.5, 19.6, 19.0, 18.3, 17.7, 17.1, 16.8, 16.5, 16.3, 16.0, 15.9, 15.7, 15.6, 15.4} diff --git a/Firmware/thermal_model/e3d_REVO_HF_60W.h b/Firmware/thermal_model/e3d_REVO_HF_60W.h new file mode 100644 index 0000000000..95c01a294d --- /dev/null +++ b/Firmware/thermal_model/e3d_REVO_HF_60W.h @@ -0,0 +1,19 @@ +#pragma once + +#define THERMAL_MODEL_E3D_REVO_HF_60W_VER 1 // model parameters version + +#define THERMAL_MODEL_E3D_REVO_HF_60W_P 60. // heater power (W) +#define THERMAL_MODEL_E3D_REVO_HF_60W_U -0.0014 // linear temperature coefficient (W/K/power) +#define THERMAL_MODEL_E3D_REVO_HF_60W_V 1.05 // linear temperature intercept (W/power) + +#define THERMAL_MODEL_E3D_REVO_HF_60W_C 9.10 // initial guess for heatblock capacitance (J/K) +#define THERMAL_MODEL_E3D_REVO_HF_60W_R 30.6 // initial guess for heatblock resistance (K/W) + +#define THERMAL_MODEL_E3D_REVO_HF_60W_fS 0.15 // sim. 1st order IIR filter factor (f=100/27) +#define THERMAL_MODEL_E3D_REVO_HF_60W_LAG 270 // sim. response lag (ms, 0-2160) + +#define THERMAL_MODEL_E3D_REVO_HF_60W_W 0.85 // Default warning threshold (K/s) +#define THERMAL_MODEL_E3D_REVO_HF_60W_E 1.23 // Default error threshold (K/s) + +// fall-back resistance vector (R0-15) +#define THERMAL_MODEL_E3D_REVO_HF_60W_Rv {THERMAL_MODEL_E3D_REVO_HF_60W_R, 29.0, 27.5, 24.5, 23.4, 22.3, 21.2, 20.2, 19.8, 19.4, 19.0, 18.6, 18.3, 18.1, 17.9, 17.7} diff --git a/Firmware/ultralcd.h b/Firmware/ultralcd.h index 5e5c7dba3a..f17c5be33b 100755 --- a/Firmware/ultralcd.h +++ b/Firmware/ultralcd.h @@ -226,7 +226,7 @@ enum class WizState : uint8_t Xyz, //!< xyz calibration Z, //!< z calibration #ifdef THERMAL_MODEL - ThermalModel, //!< Thermal Model calibration + ThermalModel, //!< Thermal Model calibration #endif //THERMAL_MODEL IsFil, //!< Is filament loaded? First step of 1st layer calibration Preheat, //!< Preheat for any material diff --git a/Firmware/util.h b/Firmware/util.h index 05adf34934..0fcf768242 100644 --- a/Firmware/util.h +++ b/Firmware/util.h @@ -103,14 +103,14 @@ extern void ip4_to_str(char* dest, uint8_t* IP); // Calibration status of the machine // (unsigned char*)EEPROM_CALIBRATION_STATUS_V2 typedef uint8_t CalibrationStatus; -const CalibrationStatus CALIBRATION_STATUS_SELFTEST = 0b00000001; // Selftest -const CalibrationStatus CALIBRATION_STATUS_XYZ = 0b00000010; // XYZ calibration -const CalibrationStatus CALIBRATION_STATUS_Z = 0b00000100; // Z calibration +const CalibrationStatus CALIBRATION_STATUS_SELFTEST = 0b00000001; // Selftest +const CalibrationStatus CALIBRATION_STATUS_XYZ = 0b00000010; // XYZ calibration +const CalibrationStatus CALIBRATION_STATUS_Z = 0b00000100; // Z calibration #ifdef THERMAL_MODEL -const CalibrationStatus CALIBRATION_STATUS_THERMAL_MODEL = 0b00001000; // Thermal model calibration +const CalibrationStatus CALIBRATION_STATUS_THERMAL_MODEL = 0b00001000; // Thermal model calibration #endif -const CalibrationStatus CALIBRATION_STATUS_LIVE_ADJUST = 0b00010000; // 1st layer calibration -const CalibrationStatus CALIBRATION_STATUS_UNKNOWN = 0b10000000; // Freshly assembled or unknown status +const CalibrationStatus CALIBRATION_STATUS_LIVE_ADJUST = 0b00010000; // 1st layer calibration +const CalibrationStatus CALIBRATION_STATUS_UNKNOWN = 0b10000000; // Freshly assembled or unknown status // Calibration steps performed by the wizard const CalibrationStatus CALIBRATION_WIZARD_STEPS = diff --git a/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO.h b/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO.h index 084e5fc697..1deab81787 100644 --- a/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO.h +++ b/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO.h @@ -381,26 +381,26 @@ #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 // model-based temperature check -#define TEMP_MODEL 1 // enable model-based temperature checks -#define TEMP_MODEL_DEBUG 1 // extended runtime logging +#define THERMAL_MODEL 1 // enable model-based temperature checks +#define THERMAL_MODEL_DEBUG 1 // extended runtime logging -#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit -#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit -#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold -#define TEMP_MODEL_CAL_C_itr 30 // C estimation iteration limit +#define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit +#define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit +#define THERMAL_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold +#define THERMAL_MODEL_CAL_C_itr 30 // C estimation iteration limit -#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit -#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit -#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold -#define TEMP_MODEL_CAL_R_itr 30 // R estimation iteration limit +#define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit +#define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit +#define THERMAL_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold +#define THERMAL_MODEL_CAL_R_itr 30 // R estimation iteration limit -#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) -#define TEMP_MODEL_CAL_T_high 230 // Default calibration working temperature (C) +#define THERMAL_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) +#define THERMAL_MODEL_CAL_T_high 230 // Default calibration working temperature (C) -#define TEMP_MODEL_Ta_corr -7 // Default ambient temperature correction +#define THERMAL_MODEL_Ta_corr -7 // Default ambient temperature correction -#include "temp_model/e3d_REVO.h" -#define TEMP_MODEL_DEFAULT E3D_REVO // Default E3D REVO model parameters +#include "thermal_model/e3d_REVO.h" +#define THERMAL_MODEL_DEFAULT E3D_REVO // Default E3D REVO model parameters /*------------------------------------ diff --git a/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO_HF_60W.h b/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO_HF_60W.h index 1985e91323..471e6c8b7a 100644 --- a/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO_HF_60W.h +++ b/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO_HF_60W.h @@ -382,26 +382,26 @@ #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 // model-based temperature check -#define TEMP_MODEL 1 // enable model-based temperature checks -#define TEMP_MODEL_DEBUG 1 // extended runtime logging +#define THERMAL_MODEL 1 // enable model-based temperature checks +#define THERMAL_MODEL_DEBUG 1 // extended runtime logging -#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit -#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit -#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold -#define TEMP_MODEL_CAL_C_itr 30 // C estimation iteration limit +#define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit +#define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit +#define THERMAL_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold +#define THERMAL_MODEL_CAL_C_itr 30 // C estimation iteration limit -#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit -#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit -#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold -#define TEMP_MODEL_CAL_R_itr 30 // R estimation iteration limit +#define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit +#define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit +#define THERMAL_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold +#define THERMAL_MODEL_CAL_R_itr 30 // R estimation iteration limit -#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) -#define TEMP_MODEL_CAL_T_high 230 // Default calibration working temperature (C) +#define THERMAL_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) +#define THERMAL_MODEL_CAL_T_high 230 // Default calibration working temperature (C) -#define TEMP_MODEL_Ta_corr -7 // Default ambient temperature correction +#define THERMAL_MODEL_Ta_corr -7 // Default ambient temperature correction -#include "temp_model/e3d_REVO_HF_60W.h" -#define TEMP_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters +#include "thermal_model/e3d_REVO_HF_60W.h" +#define THERMAL_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters /*------------------------------------ diff --git a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO.h b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO.h index c688ce9599..2ae876f583 100644 --- a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO.h +++ b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO.h @@ -385,26 +385,26 @@ #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 // model-based temperature check -#define TEMP_MODEL 1 // enable model-based temperature checks -#define TEMP_MODEL_DEBUG 1 // extended runtime logging +#define THERMAL_MODEL 1 // enable model-based temperature checks +#define THERMAL_MODEL_DEBUG 1 // extended runtime logging -#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit -#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit -#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold -#define TEMP_MODEL_CAL_C_itr 30 // C estimation iteration limit +#define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit +#define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit +#define THERMAL_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold +#define THERMAL_MODEL_CAL_C_itr 30 // C estimation iteration limit -#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit -#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit -#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold -#define TEMP_MODEL_CAL_R_itr 30 // R estimation iteration limit +#define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit +#define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit +#define THERMAL_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold +#define THERMAL_MODEL_CAL_R_itr 30 // R estimation iteration limit -#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) -#define TEMP_MODEL_CAL_T_high 230 // Default calibration working temperature (C) +#define THERMAL_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) +#define THERMAL_MODEL_CAL_T_high 230 // Default calibration working temperature (C) -#define TEMP_MODEL_Ta_corr -7 // Default ambient temperature correction +#define THERMAL_MODEL_Ta_corr -7 // Default ambient temperature correction -#include "temp_model/e3d_REVO.h" -#define TEMP_MODEL_DEFAULT E3D_REVO // Default E3D REVO model parameters +#include "thermal_model/e3d_REVO.h" +#define THERMAL_MODEL_DEFAULT E3D_REVO // Default E3D REVO model parameters /*------------------------------------ diff --git a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO_HF_60W.h b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO_HF_60W.h index 8125b93e31..bfaae1fc96 100644 --- a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO_HF_60W.h +++ b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO_HF_60W.h @@ -386,26 +386,26 @@ #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 // model-based temperature check -#define TEMP_MODEL 1 // enable model-based temperature checks -#define TEMP_MODEL_DEBUG 1 // extended runtime logging +#define THERMAL_MODEL 1 // enable model-based temperature checks +#define THERMAL_MODEL_DEBUG 1 // extended runtime logging -#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit -#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit -#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold -#define TEMP_MODEL_CAL_C_itr 30 // C estimation iteration limit +#define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit +#define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit +#define THERMAL_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold +#define THERMAL_MODEL_CAL_C_itr 30 // C estimation iteration limit -#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit -#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit -#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold -#define TEMP_MODEL_CAL_R_itr 30 // R estimation iteration limit +#define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit +#define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit +#define THERMAL_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold +#define THERMAL_MODEL_CAL_R_itr 30 // R estimation iteration limit -#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) -#define TEMP_MODEL_CAL_T_high 230 // Default calibration working temperature (C) +#define THERMAL_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) +#define THERMAL_MODEL_CAL_T_high 230 // Default calibration working temperature (C) -#define TEMP_MODEL_Ta_corr -7 // Default ambient temperature correction +#define THERMAL_MODEL_Ta_corr -7 // Default ambient temperature correction -#include "temp_model/e3d_REVO_HF_60W.h" -#define TEMP_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters +#include "thermal_model/e3d_REVO_HF_60W.h" +#define THERMAL_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters /*------------------------------------ diff --git a/Firmware/variants/README.md b/Firmware/variants/README.md index 6bb9813042..8b85bda165 100644 --- a/Firmware/variants/README.md +++ b/Firmware/variants/README.md @@ -65,48 +65,48 @@ Example: ... ``` 8. Prepare for new 3rd party hotend TM value file - - Search for `#include "temp_model/e3d_v6.h"` + - Search for `#include "thermal_model/e3d_v6.h"` - Change the `e3d_v6.h` to `<3rd party hotend:16>.h` - Change below the `E3D_V6` to `<3rd party hotend:16>` ``` ... - #include "temp_model/e3d_v6.h" - #define TEMP_MODEL_DEFAULT E3D_V6 // Default E3D v6 model parameters + #include "thermal_model/e3d_v6.h" + #define THERMAL_MODEL_DEFAULT E3D_V6 // Default E3D v6 model parameters ... ``` Example: ``` ... - #include "temp_model/e3d_REVO_HF_60W.h" - #define TEMP_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters + #include "thermal_model/e3d_REVO_HF_60W.h" + #define THERMAL_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters ... ``` 9. Save and close the new variant file -10. Copy/paste `Firmware/temp_model/e3d_v6.h` as `Firmware/temp_model/<3rd party hotend:16>.h` - - Example: `Firmware/temp_model/e3d_REVO_HF_60W.h` -11. Open the new file `Firmware/temp_model/<3rd party hotend:16>.h` -12. Search `E3D_V6` and replace it with what you have used in `#defined TEMP_MODEL_DEFAULT` +10. Copy/paste `Firmware/thermal_model/e3d_v6.h` as `Firmware/thermal_model/<3rd party hotend:16>.h` + - Example: `Firmware/thermal_model/e3d_REVO_HF_60W.h` +11. Open the new file `Firmware/thermal_model/<3rd party hotend:16>.h` +12. Search `E3D_V6` and replace it with what you have used in `#defined THERMAL_MODEL_DEFAULT` - Example ``` #pragma once - #define TEMP_MODEL_E3D_REVO_HF_60W_VER 1 // model parameters version + #define THERMAL_MODEL_E3D_REVO_HF_60W_VER 1 // model parameters version - #define TEMP_MODEL_E3D_REVO_HF_60W_P 60. // heater power (W) - #define TEMP_MODEL_E3D_REVO_HF_60W_U -0.0014 // linear temperature coefficient (W/K/power) - #define TEMP_MODEL_E3D_REVO_HF_60W_V 1.05 // linear temperature intercept (W/power) + #define THERMAL_MODEL_E3D_REVO_HF_60W_P 60. // heater power (W) + #define THERMAL_MODEL_E3D_REVO_HF_60W_U -0.0014 // linear temperature coefficient (W/K/power) + #define THERMAL_MODEL_E3D_REVO_HF_60W_V 1.05 // linear temperature intercept (W/power) - #define TEMP_MODEL_E3D_REVO_HF_60W_C 8.77 // initial guess for heatblock capacitance (J/K) - #define TEMP_MODEL_E3D_REVO_HF_60W_R 25.3 // initial guess for heatblock resistance (K/W) + #define THERMAL_MODEL_E3D_REVO_HF_60W_C 8.77 // initial guess for heatblock capacitance (J/K) + #define THERMAL_MODEL_E3D_REVO_HF_60W_R 25.3 // initial guess for heatblock resistance (K/W) - #define TEMP_MODEL_E3D_REVO_HF_60W_fS 0.15 // sim. 1st order IIR filter factor (f=100/27) - #define TEMP_MODEL_E3D_REVO_HF_60W_LAG 270 // sim. response lag (ms, 0-2160) + #define THERMAL_MODEL_E3D_REVO_HF_60W_fS 0.15 // sim. 1st order IIR filter factor (f=100/27) + #define THERMAL_MODEL_E3D_REVO_HF_60W_LAG 270 // sim. response lag (ms, 0-2160) - #define TEMP_MODEL_E3D_REVO_HF_60W_W 1.2 // Default warning threshold (K/s) - #define TEMP_MODEL_E3D_REVO_HF_60W_E 1.74 // Default error threshold (K/s) + #define THERMAL_MODEL_E3D_REVO_HF_60W_W 1.2 // Default warning threshold (K/s) + #define THERMAL_MODEL_E3D_REVO_HF_60W_E 1.74 // Default error threshold (K/s) // fall-back resistance vector (R0-15) - #define TEMP_MODEL_E3D_REVO_HF_60W_Rv {TEMP_MODEL_E3D_REVO_HF_60W_R, 23.9, 22.5, 19.6, 19.0, 18.3, 17.7, 17.1, 16.8, 16.5, 16.3, 16.0, 15.9, 15.7, 15.6, 15.4} + #define THERMAL_MODEL_E3D_REVO_HF_60W_Rv {THERMAL_MODEL_E3D_REVO_HF_60W_R, 23.9, 22.5, 19.6, 19.0, 18.3, 17.7, 17.1, 16.8, 16.5, 16.3, 16.0, 15.9, 15.7, 15.6, 15.4} ```