Browse Source

Add PID_FAN_SCALING option (#15585)

haschtl 5 years ago
parent
commit
ff6518c0a8
100 changed files with 4727 additions and 22 deletions
  1. 50
    0
      Marlin/Configuration_adv.h
  2. 12
    1
      Marlin/src/gcode/config/M301.cpp
  3. 2
    0
      Marlin/src/inc/SanityCheck.h
  4. 10
    2
      Marlin/src/lcd/menu/menu_advanced.cpp
  5. 23
    12
      Marlin/src/module/configuration_store.cpp
  6. 9
    0
      Marlin/src/module/temperature.cpp
  7. 21
    7
      Marlin/src/module/temperature.h
  8. 50
    0
      config/default/Configuration_adv.h
  9. 50
    0
      config/examples/3DFabXYZ/Migbot/Configuration_adv.h
  10. 50
    0
      config/examples/ADIMLab/Gantry v1/Configuration_adv.h
  11. 50
    0
      config/examples/ADIMLab/Gantry v2/Configuration_adv.h
  12. 50
    0
      config/examples/AlephObjects/TAZ4/Configuration_adv.h
  13. 50
    0
      config/examples/Alfawise/U20-bltouch/Configuration_adv.h
  14. 50
    0
      config/examples/Alfawise/U20/Configuration_adv.h
  15. 50
    0
      config/examples/AliExpress/UM2pExt/Configuration_adv.h
  16. 50
    0
      config/examples/Anet/A2/Configuration_adv.h
  17. 50
    0
      config/examples/Anet/A2plus/Configuration_adv.h
  18. 50
    0
      config/examples/Anet/A6/Configuration_adv.h
  19. 50
    0
      config/examples/Anet/A8/Configuration_adv.h
  20. 50
    0
      config/examples/Anet/A8plus/Configuration_adv.h
  21. 50
    0
      config/examples/Anet/E16/Configuration_adv.h
  22. 50
    0
      config/examples/AnyCubic/i3/Configuration_adv.h
  23. 50
    0
      config/examples/ArmEd/Configuration_adv.h
  24. 50
    0
      config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  25. 50
    0
      config/examples/BIBO/TouchX/default/Configuration_adv.h
  26. 50
    0
      config/examples/BQ/Hephestos/Configuration_adv.h
  27. 50
    0
      config/examples/BQ/Hephestos_2/Configuration_adv.h
  28. 50
    0
      config/examples/BQ/WITBOX/Configuration_adv.h
  29. 50
    0
      config/examples/Cartesio/Configuration_adv.h
  30. 50
    0
      config/examples/Creality/CR-10/Configuration_adv.h
  31. 50
    0
      config/examples/Creality/CR-10S/Configuration_adv.h
  32. 50
    0
      config/examples/Creality/CR-10_5S/Configuration_adv.h
  33. 50
    0
      config/examples/Creality/CR-10mini/Configuration_adv.h
  34. 50
    0
      config/examples/Creality/CR-20 Pro/Configuration_adv.h
  35. 50
    0
      config/examples/Creality/CR-20/Configuration_adv.h
  36. 50
    0
      config/examples/Creality/CR-8/Configuration_adv.h
  37. 50
    0
      config/examples/Creality/Ender-2/Configuration_adv.h
  38. 50
    0
      config/examples/Creality/Ender-3/Configuration_adv.h
  39. 50
    0
      config/examples/Creality/Ender-4/Configuration_adv.h
  40. 50
    0
      config/examples/Creality/Ender-5/Configuration_adv.h
  41. 50
    0
      config/examples/Dagoma/Disco Ultimate/Configuration_adv.h
  42. 50
    0
      config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h
  43. 50
    0
      config/examples/Einstart-S/Configuration_adv.h
  44. 50
    0
      config/examples/FYSETC/AIO_II/Configuration_adv.h
  45. 50
    0
      config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration_adv.h
  46. 50
    0
      config/examples/FYSETC/Cheetah 1.2/base/Configuration_adv.h
  47. 50
    0
      config/examples/FYSETC/Cheetah/BLTouch/Configuration_adv.h
  48. 50
    0
      config/examples/FYSETC/Cheetah/base/Configuration_adv.h
  49. 50
    0
      config/examples/FYSETC/F6_13/Configuration_adv.h
  50. 50
    0
      config/examples/Felix/DUAL/Configuration_adv.h
  51. 50
    0
      config/examples/Felix/Single/Configuration_adv.h
  52. 50
    0
      config/examples/FlashForge/CreatorPro/Configuration_adv.h
  53. 50
    0
      config/examples/FolgerTech/i3-2020/Configuration_adv.h
  54. 50
    0
      config/examples/Formbot/Raptor/Configuration_adv.h
  55. 50
    0
      config/examples/Formbot/T_Rex_2+/Configuration_adv.h
  56. 50
    0
      config/examples/Formbot/T_Rex_3/Configuration_adv.h
  57. 50
    0
      config/examples/Geeetech/A10/Configuration_adv.h
  58. 50
    0
      config/examples/Geeetech/A10M/Configuration_adv.h
  59. 50
    0
      config/examples/Geeetech/A20M/Configuration_adv.h
  60. 50
    0
      config/examples/Geeetech/MeCreator2/Configuration_adv.h
  61. 50
    0
      config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  62. 50
    0
      config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  63. 50
    0
      config/examples/HMS434/Configuration_adv.h
  64. 50
    0
      config/examples/Infitary/i3-M508/Configuration_adv.h
  65. 50
    0
      config/examples/JGAurora/A1/Configuration_adv.h
  66. 50
    0
      config/examples/JGAurora/A5/Configuration_adv.h
  67. 50
    0
      config/examples/JGAurora/A5S/Configuration_adv.h
  68. 50
    0
      config/examples/MakerParts/Configuration_adv.h
  69. 50
    0
      config/examples/Malyan/M150/Configuration_adv.h
  70. 50
    0
      config/examples/Malyan/M200/Configuration_adv.h
  71. 50
    0
      config/examples/Micromake/C1/enhanced/Configuration_adv.h
  72. 50
    0
      config/examples/Mks/Robin/Configuration_adv.h
  73. 50
    0
      config/examples/Mks/Sbase/Configuration_adv.h
  74. 50
    0
      config/examples/RapideLite/RL200/Configuration_adv.h
  75. 50
    0
      config/examples/RigidBot/Configuration_adv.h
  76. 50
    0
      config/examples/SCARA/Configuration_adv.h
  77. 50
    0
      config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h
  78. 50
    0
      config/examples/Sanguinololu/Configuration_adv.h
  79. 50
    0
      config/examples/Tevo/Michelangelo/Configuration_adv.h
  80. 50
    0
      config/examples/Tevo/Tarantula Pro/Configuration_adv.h
  81. 50
    0
      config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h
  82. 50
    0
      config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h
  83. 50
    0
      config/examples/TheBorg/Configuration_adv.h
  84. 50
    0
      config/examples/TinyBoy2/Configuration_adv.h
  85. 50
    0
      config/examples/Tronxy/X3A/Configuration_adv.h
  86. 50
    0
      config/examples/Tronxy/X5S-2E/Configuration_adv.h
  87. 50
    0
      config/examples/UltiMachine/Archim1/Configuration_adv.h
  88. 50
    0
      config/examples/UltiMachine/Archim2/Configuration_adv.h
  89. 50
    0
      config/examples/VORONDesign/Configuration_adv.h
  90. 50
    0
      config/examples/Velleman/K8200/Configuration_adv.h
  91. 50
    0
      config/examples/Velleman/K8400/Dual-head/Configuration_adv.h
  92. 50
    0
      config/examples/Velleman/K8400/Single-head/Configuration_adv.h
  93. 50
    0
      config/examples/WASP/PowerWASP/Configuration_adv.h
  94. 50
    0
      config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  95. 50
    0
      config/examples/Wanhao/Duplicator i3 2.1/Configuration_adv.h
  96. 50
    0
      config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h
  97. 50
    0
      config/examples/delta/Anycubic/Kossel/Configuration_adv.h
  98. 50
    0
      config/examples/delta/Dreammaker/Overlord/Configuration_adv.h
  99. 50
    0
      config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h
  100. 0
    0
      config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h

+ 50
- 0
Marlin/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 12
- 1
Marlin/src/gcode/config/M301.cpp View File

@@ -38,6 +38,10 @@
38 38
  *
39 39
  *   C[float] Kc term
40 40
  *   L[int] LPQ length
41
+ *
42
+ * With PID_FAN_SCALING:
43
+ *
44
+ *   F[float] Kf term
41 45
  */
42 46
 void GcodeSuite::M301() {
43 47
 
@@ -56,6 +60,10 @@ void GcodeSuite::M301() {
56 60
       NOLESS(thermalManager.lpq_len, 0);
57 61
     #endif
58 62
 
63
+    #if ENABLED(PID_FAN_SCALING)
64
+      if (parser.seen('F')) PID_PARAM(Kf, e) = parser.value_float();
65
+    #endif
66
+
59 67
     thermalManager.updatePID();
60 68
     SERIAL_ECHO_START();
61 69
     #if ENABLED(PID_PARAMS_PER_HOTEND)
@@ -65,9 +73,12 @@ void GcodeSuite::M301() {
65 73
                     " i:", unscalePID_i(PID_PARAM(Ki, e)),
66 74
                     " d:", unscalePID_d(PID_PARAM(Kd, e)));
67 75
     #if ENABLED(PID_EXTRUSION_SCALING)
68
-      //Kc does not have scaling applied above, or in resetting defaults
69 76
       SERIAL_ECHOPAIR(" c:", PID_PARAM(Kc, e));
70 77
     #endif
78
+    #if ENABLED(PID_FAN_SCALING)
79
+      SERIAL_ECHOPAIR(" f:", PID_PARAM(Kf, e));
80
+    #endif
81
+
71 82
     SERIAL_EOL();
72 83
   }
73 84
   else

+ 2
- 0
Marlin/src/inc/SanityCheck.h View File

@@ -229,6 +229,8 @@
229 229
   #error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions."
230 230
 #elif defined(EXTRUDER_0_AUTO_FAN_PIN) || defined(EXTRUDER_1_AUTO_FAN_PIN) || defined(EXTRUDER_2_AUTO_FAN_PIN) || defined(EXTRUDER_3_AUTO_FAN_PIN)
231 231
   #error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h."
232
+#elif defined(PID_FAN_SCALING) && FAN_COUNT <= 0
233
+  #error "PID_FAN_SCALING needs at least one fan enabled."
232 234
 #elif defined(min_software_endstops) || defined(max_software_endstops)
233 235
   #error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS. Please update your configuration."
234 236
 #elif ENABLED(Z_PROBE_SLED) && defined(SLED_PIN)

+ 10
- 2
Marlin/src/lcd/menu/menu_advanced.cpp View File

@@ -289,7 +289,7 @@ void menu_cancelobject();
289 289
     //
290 290
 
291 291
     #if ENABLED(PID_EDIT_MENU)
292
-      #define _PID_BASE_MENU_ITEMS(N) \
292
+      #define __PID_BASE_MENU_ITEMS(N) \
293 293
         raw_Ki = unscalePID_i(PID_PARAM(Ki, N)); \
294 294
         raw_Kd = unscalePID_d(PID_PARAM(Kd, N)); \
295 295
         EDIT_ITEM_N(float52sign, N, MSG_PID_P_E, &PID_PARAM(Kp, N), 1, 9990); \
@@ -297,9 +297,17 @@ void menu_cancelobject();
297 297
         EDIT_ITEM_N(float52sign, N, MSG_PID_D_E, &raw_Kd, 1, 9990, []{ copy_and_scalePID_d(N); })
298 298
 
299 299
       #if ENABLED(PID_EXTRUSION_SCALING)
300
+        #define _PID_BASE_MENU_ITEMS(N) \
301
+          __PID_BASE_MENU_ITEMS(N); \
302
+          EDIT_ITEM_N(float3, N, MSG_PID_C_E, &PID_PARAM(Kc, N), 1, 9990)
303
+      #else
304
+        #define _PID_BASE_MENU_ITEMS(N) __PID_BASE_MENU_ITEMS(N)
305
+      #endif
306
+
307
+      #if ENABLED(PID_FAN_SCALING)
300 308
         #define _PID_EDIT_MENU_ITEMS(N) \
301 309
           _PID_BASE_MENU_ITEMS(N); \
302
-          EDIT_ITEM_N(float3, N, MSG_PID_C_E, &PID_PARAM(Kc, N), 1, 9990)
310
+          EDIT_ITEM(float3, PID_LABEL(MSG_PID_F,N), &PID_PARAM(Kf, N), 1, 9990)
303 311
       #else
304 312
         #define _PID_EDIT_MENU_ITEMS(N) _PID_BASE_MENU_ITEMS(N)
305 313
       #endif

+ 23
- 12
Marlin/src/module/configuration_store.cpp View File

@@ -37,7 +37,7 @@
37 37
  */
38 38
 
39 39
 // Change EEPROM version if the structure changes
40
-#define EEPROM_VERSION "V72"
40
+#define EEPROM_VERSION "V73"
41 41
 #define EEPROM_OFFSET 100
42 42
 
43 43
 // Check the integrity of data offsets.
@@ -242,7 +242,7 @@ typedef struct SettingsDataStruct {
242 242
   //
243 243
   // PIDTEMP
244 244
   //
245
-  PIDC_t hotendPID[HOTENDS];                            // M301 En PIDC / M303 En U
245
+  PIDCF_t hotendPID[HOTENDS];                           // M301 En PIDCF / M303 En U
246 246
   int16_t lpq_len;                                      // M301 L
247 247
 
248 248
   //
@@ -785,13 +785,14 @@ void MarlinSettings::postprocess() {
785 785
     {
786 786
       _FIELD_TEST(hotendPID);
787 787
       HOTEND_LOOP() {
788
-        PIDC_t pidc = {
788
+        PIDCF_t pidcf = {
789 789
                        PID_PARAM(Kp, e),
790 790
           unscalePID_i(PID_PARAM(Ki, e)),
791 791
           unscalePID_d(PID_PARAM(Kd, e)),
792
-                       PID_PARAM(Kc, e)
792
+                       PID_PARAM(Kc, e),
793
+                       PID_PARAM(Kf, e)
793 794
         };
794
-        EEPROM_WRITE(pidc);
795
+        EEPROM_WRITE(pidcf);
795 796
       }
796 797
 
797 798
       _FIELD_TEST(lpq_len);
@@ -1586,16 +1587,19 @@ void MarlinSettings::postprocess() {
1586 1587
       //
1587 1588
       {
1588 1589
         HOTEND_LOOP() {
1589
-          PIDC_t pidc;
1590
-          EEPROM_READ(pidc);
1590
+          PIDCF_t pidcf;
1591
+          EEPROM_READ(pidcf);
1591 1592
           #if ENABLED(PIDTEMP)
1592
-            if (!validating && pidc.Kp != DUMMY_PID_VALUE) {
1593
+            if (!validating && pidcf.Kp != DUMMY_PID_VALUE) {
1593 1594
               // Scale PID values since EEPROM values are unscaled
1594
-              PID_PARAM(Kp, e) = pidc.Kp;
1595
-              PID_PARAM(Ki, e) = scalePID_i(pidc.Ki);
1596
-              PID_PARAM(Kd, e) = scalePID_d(pidc.Kd);
1595
+              PID_PARAM(Kp, e) = pidcf.Kp;
1596
+              PID_PARAM(Ki, e) = scalePID_i(pidcf.Ki);
1597
+              PID_PARAM(Kd, e) = scalePID_d(pidcf.Kd);
1597 1598
               #if ENABLED(PID_EXTRUSION_SCALING)
1598
-                PID_PARAM(Kc, e) = pidc.Kc;
1599
+                PID_PARAM(Kc, e) = pidcf.Kc;
1600
+              #endif
1601
+              #if ENABLED(PID_FAN_SCALING)
1602
+                PID_PARAM(Kf, e) = pidcf.Kf;
1599 1603
               #endif
1600 1604
             }
1601 1605
           #endif
@@ -2446,6 +2450,10 @@ void MarlinSettings::reset() {
2446 2450
       #if ENABLED(PID_EXTRUSION_SCALING)
2447 2451
         PID_PARAM(Kc, e) = DEFAULT_Kc;
2448 2452
       #endif
2453
+
2454
+      #if ENABLED(PID_FAN_SCALING)
2455
+        PID_PARAM(Kf, e) = DEFAULT_Kf;
2456
+      #endif
2449 2457
     }
2450 2458
   #endif
2451 2459
 
@@ -3003,6 +3011,9 @@ void MarlinSettings::reset() {
3003 3011
             SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, e));
3004 3012
             if (e == 0) SERIAL_ECHOPAIR(" L", thermalManager.lpq_len);
3005 3013
           #endif
3014
+          #if ENABLED(PID_FAN_SCALING)
3015
+            SERIAL_ECHOPAIR(" F", PID_PARAM(Kf, e));
3016
+          #endif
3006 3017
           SERIAL_EOL();
3007 3018
         }
3008 3019
       #endif // PIDTEMP

+ 9
- 0
Marlin/src/module/temperature.cpp View File

@@ -872,6 +872,15 @@ void Temperature::min_temp_error(const heater_ind_t heater) {
872 872
             }
873 873
           #endif // PID_EXTRUSION_SCALING
874 874
 
875
+          #if ENABLED(PID_FAN_SCALING)
876
+            if (thermalManager.fan_speed[active_extruder] > PID_FAN_SCALING_MIN_SPEED) {
877
+              work_pid[ee].Kf = PID_PARAM(Kf, ee) + (PID_FAN_SCALING_LIN_FACTOR) * thermalManager.fan_speed[active_extruder];
878
+              pid_output += work_pid[ee].Kf;
879
+            }
880
+            //pid_output -= work_pid[ee].Ki;
881
+            //pid_output += work_pid[ee].Ki * work_pid[ee].Kf
882
+          #endif // PID_FAN_SCALING
883
+
875 884
           LIMIT(pid_output, 0, PID_MAX);
876 885
         }
877 886
         temp_dState[ee] = temp_hotend[ee].celsius;

+ 21
- 7
Marlin/src/module/temperature.h View File

@@ -55,15 +55,23 @@ typedef enum : int8_t {
55 55
 // PID storage
56 56
 typedef struct { float Kp, Ki, Kd;     } PID_t;
57 57
 typedef struct { float Kp, Ki, Kd, Kc; } PIDC_t;
58
-#if ENABLED(PID_EXTRUSION_SCALING)
59
-  typedef PIDC_t hotend_pid_t;
60
-  #if LPQ_MAX_LEN > 255
61
-    typedef uint16_t lpq_ptr_t;
58
+typedef struct { float Kp, Ki, Kd, Kf; } PIDF_t;
59
+typedef struct { float Kp, Ki, Kd, Kc, Kf; } PIDCF_t;
60
+
61
+typedef
62
+  #if BOTH(PID_EXTRUSION_SCALING, PID_FAN_SCALING)
63
+    PIDCF_t
64
+  #elif ENABLED(PID_EXTRUSION_SCALING)
65
+    PIDC_t
66
+  #elif ENABLED(PID_FAN_SCALING)
67
+    PIDF_t
62 68
   #else
63
-    typedef uint8_t lpq_ptr_t;
69
+    PID_t
64 70
   #endif
65
-#else
66
-  typedef PID_t hotend_pid_t;
71
+hotend_pid_t;
72
+
73
+#if ENABLED(PID_EXTRUSION_SCALING)
74
+  typedef IF<(LPQ_MAX_LEN > 255), uint16_t, uint8_t>::type lpq_ptr_t;
67 75
 #endif
68 76
 
69 77
 #define DUMMY_PID_VALUE 3000.0f
@@ -77,6 +85,12 @@ typedef struct { float Kp, Ki, Kd, Kc; } PIDC_t;
77 85
   #else
78 86
     #define _PID_Kc(H) 1
79 87
   #endif
88
+
89
+  #if ENABLED(PID_FAN_SCALING)
90
+    #define _PID_Kf(H) Temperature::temp_hotend[H].pid.Kf
91
+  #else
92
+    #define _PID_Kf(H) 0
93
+  #endif
80 94
 #else
81 95
   #define _PID_Kp(H) DUMMY_PID_VALUE
82 96
   #define _PID_Ki(H) DUMMY_PID_VALUE

+ 50
- 0
config/default/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/3DFabXYZ/Migbot/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/ADIMLab/Gantry v1/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/ADIMLab/Gantry v2/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/AlephObjects/TAZ4/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Alfawise/U20-bltouch/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Alfawise/U20/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/AliExpress/UM2pExt/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Anet/A2/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Anet/A2plus/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Anet/A6/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Anet/A8/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Anet/A8plus/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Anet/E16/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/AnyCubic/i3/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/ArmEd/Configuration_adv.h View File

@@ -201,6 +201,56 @@
201 201
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
202 202
     #define LPQ_MAX_LEN 50
203 203
   #endif
204
+
205
+  /**
206
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
207
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
208
+   * You can either just add a constant compensation with the DEFAULT_Kf value
209
+   * or follow the instruction below to get speed-dependent compensation.
210
+   *
211
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
212
+   * ---------------------------------------------------------------------
213
+   * A good starting point for the Kf-value comes from the calculation:
214
+   *   kf = (power_fan * eff_fan) / power_heater * 255
215
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
216
+   *
217
+   * Example:
218
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
219
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
220
+   *
221
+   * Fan-speed dependent compensation
222
+   * --------------------------------
223
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
224
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
225
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
226
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
227
+   * 2. Note the Kf-value for fan-speed at 100%
228
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
229
+   * 4. Repeat step 1. and 2. for this fan speed.
230
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
231
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
232
+   */
233
+  //#define PID_FAN_SCALING
234
+  #if ENABLED(PID_FAN_SCALING)
235
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
236
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
237
+      // The alternative definition is used for an easier configuration.
238
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
239
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
240
+
241
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
242
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
243
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
244
+
245
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
246
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
247
+
248
+    #else
249
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
250
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
251
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
252
+    #endif
253
+  #endif
204 254
 #endif
205 255
 
206 256
 /**

+ 50
- 0
config/examples/BIBO/TouchX/cyclops/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/BIBO/TouchX/default/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/BQ/Hephestos/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/BQ/Hephestos_2/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/BQ/WITBOX/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Cartesio/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Creality/CR-10/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Creality/CR-10S/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Creality/CR-10_5S/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Creality/CR-10mini/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Creality/CR-20 Pro/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Creality/CR-20/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Creality/CR-8/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Creality/Ender-2/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Creality/Ender-3/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Creality/Ender-4/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Creality/Ender-5/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Dagoma/Disco Ultimate/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Einstart-S/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/FYSETC/AIO_II/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/FYSETC/Cheetah 1.2/base/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/FYSETC/Cheetah/BLTouch/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/FYSETC/Cheetah/base/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/FYSETC/F6_13/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Felix/DUAL/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Felix/Single/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/FlashForge/CreatorPro/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/FolgerTech/i3-2020/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Formbot/Raptor/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Formbot/T_Rex_2+/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Formbot/T_Rex_3/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Geeetech/A10/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Geeetech/A10M/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Geeetech/A20M/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Geeetech/MeCreator2/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/HMS434/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Infitary/i3-M508/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/JGAurora/A1/Configuration_adv.h View File

@@ -202,6 +202,56 @@
202 202
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
203 203
     #define LPQ_MAX_LEN 50
204 204
   #endif
205
+
206
+  /**
207
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
208
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
209
+   * You can either just add a constant compensation with the DEFAULT_Kf value
210
+   * or follow the instruction below to get speed-dependent compensation.
211
+   *
212
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
213
+   * ---------------------------------------------------------------------
214
+   * A good starting point for the Kf-value comes from the calculation:
215
+   *   kf = (power_fan * eff_fan) / power_heater * 255
216
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
217
+   *
218
+   * Example:
219
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
220
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
221
+   *
222
+   * Fan-speed dependent compensation
223
+   * --------------------------------
224
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
225
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
226
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
227
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
228
+   * 2. Note the Kf-value for fan-speed at 100%
229
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
230
+   * 4. Repeat step 1. and 2. for this fan speed.
231
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
232
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
233
+   */
234
+  //#define PID_FAN_SCALING
235
+  #if ENABLED(PID_FAN_SCALING)
236
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
237
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
238
+      // The alternative definition is used for an easier configuration.
239
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
240
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
241
+
242
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
243
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
244
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
245
+
246
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
247
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
248
+
249
+    #else
250
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
251
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
252
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
253
+    #endif
254
+  #endif
205 255
 #endif
206 256
 
207 257
 /**

+ 50
- 0
config/examples/JGAurora/A5/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/JGAurora/A5S/Configuration_adv.h View File

@@ -202,6 +202,56 @@
202 202
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
203 203
     #define LPQ_MAX_LEN 50
204 204
   #endif
205
+
206
+  /**
207
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
208
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
209
+   * You can either just add a constant compensation with the DEFAULT_Kf value
210
+   * or follow the instruction below to get speed-dependent compensation.
211
+   *
212
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
213
+   * ---------------------------------------------------------------------
214
+   * A good starting point for the Kf-value comes from the calculation:
215
+   *   kf = (power_fan * eff_fan) / power_heater * 255
216
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
217
+   *
218
+   * Example:
219
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
220
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
221
+   *
222
+   * Fan-speed dependent compensation
223
+   * --------------------------------
224
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
225
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
226
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
227
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
228
+   * 2. Note the Kf-value for fan-speed at 100%
229
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
230
+   * 4. Repeat step 1. and 2. for this fan speed.
231
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
232
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
233
+   */
234
+  //#define PID_FAN_SCALING
235
+  #if ENABLED(PID_FAN_SCALING)
236
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
237
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
238
+      // The alternative definition is used for an easier configuration.
239
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
240
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
241
+
242
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
243
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
244
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
245
+
246
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
247
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
248
+
249
+    #else
250
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
251
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
252
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
253
+    #endif
254
+  #endif
205 255
 #endif
206 256
 
207 257
 /**

+ 50
- 0
config/examples/MakerParts/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Malyan/M150/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Malyan/M200/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Micromake/C1/enhanced/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Mks/Robin/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Mks/Sbase/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/RapideLite/RL200/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/RigidBot/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/SCARA/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Sanguinololu/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Tevo/Michelangelo/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Tevo/Tarantula Pro/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/TheBorg/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/TinyBoy2/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Tronxy/X3A/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Tronxy/X5S-2E/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/UltiMachine/Archim1/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/UltiMachine/Archim2/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/VORONDesign/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Velleman/K8200/Configuration_adv.h View File

@@ -210,6 +210,56 @@
210 210
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
211 211
     #define LPQ_MAX_LEN 50
212 212
   #endif
213
+
214
+  /**
215
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
216
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
217
+   * You can either just add a constant compensation with the DEFAULT_Kf value
218
+   * or follow the instruction below to get speed-dependent compensation.
219
+   *
220
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
221
+   * ---------------------------------------------------------------------
222
+   * A good starting point for the Kf-value comes from the calculation:
223
+   *   kf = (power_fan * eff_fan) / power_heater * 255
224
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
225
+   *
226
+   * Example:
227
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
228
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
229
+   *
230
+   * Fan-speed dependent compensation
231
+   * --------------------------------
232
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
233
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
234
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
235
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
236
+   * 2. Note the Kf-value for fan-speed at 100%
237
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
238
+   * 4. Repeat step 1. and 2. for this fan speed.
239
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
240
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
241
+   */
242
+  //#define PID_FAN_SCALING
243
+  #if ENABLED(PID_FAN_SCALING)
244
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
245
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
246
+      // The alternative definition is used for an easier configuration.
247
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
248
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
249
+
250
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
251
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
252
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
253
+
254
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
255
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
256
+
257
+    #else
258
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
259
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
260
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
261
+    #endif
262
+  #endif
213 263
 #endif
214 264
 
215 265
 /**

+ 50
- 0
config/examples/Velleman/K8400/Dual-head/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Velleman/K8400/Single-head/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/WASP/PowerWASP/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Wanhao/Duplicator 6/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Wanhao/Duplicator i3 2.1/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/delta/Anycubic/Kossel/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/delta/Dreammaker/Overlord/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 50
- 0
config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h View File

@@ -197,6 +197,56 @@
197 197
     #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
198 198
     #define LPQ_MAX_LEN 50
199 199
   #endif
200
+
201
+  /**
202
+   * Add an experimental additional term to the heater power, proportional to the fan speed.
203
+   * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
204
+   * You can either just add a constant compensation with the DEFAULT_Kf value
205
+   * or follow the instruction below to get speed-dependent compensation.
206
+   *
207
+   * Constant compensation (use only with fanspeeds of 0% and 100%)
208
+   * ---------------------------------------------------------------------
209
+   * A good starting point for the Kf-value comes from the calculation:
210
+   *   kf = (power_fan * eff_fan) / power_heater * 255
211
+   * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
212
+   *
213
+   * Example:
214
+   *   Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
215
+   *   Kf = (2.4W * 0.8) / 40W * 255 = 12.24
216
+   *
217
+   * Fan-speed dependent compensation
218
+   * --------------------------------
219
+   * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
220
+   *    Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
221
+   *    If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
222
+   *    drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
223
+   * 2. Note the Kf-value for fan-speed at 100%
224
+   * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
225
+   * 4. Repeat step 1. and 2. for this fan speed.
226
+   * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
227
+   *    PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
228
+   */
229
+  //#define PID_FAN_SCALING
230
+  #if ENABLED(PID_FAN_SCALING)
231
+    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
232
+    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
233
+      // The alternative definition is used for an easier configuration.
234
+      // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
235
+      // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
236
+
237
+      #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
238
+      #define PID_FAN_SCALING_AT_MIN_SPEED 6.0          //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
239
+      #define PID_FAN_SCALING_MIN_SPEED 10.0            // Minimum fan speed at which to enable PID_FAN_SCALING
240
+
241
+      #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
242
+      #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
243
+
244
+    #else
245
+      #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
246
+      #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
247
+      #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
248
+    #endif
249
+  #endif
200 250
 #endif
201 251
 
202 252
 /**

+ 0
- 0
config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h View File


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

Loading…
Cancel
Save