Richard Wackerbarth 10 years ago
parent
commit
cf5d64d940

+ 5
- 0
Marlin/Configuration_adv.h View File

94
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
94
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
95
 //#define FAN_KICKSTART_TIME 100
95
 //#define FAN_KICKSTART_TIME 100
96
 
96
 
97
+// This defines the minimal speed for the main fan, run in PWM mode
98
+// to enable uncomment and set minimal PWM speed for reliable running (1-255)
99
+// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
100
+//#define FAN_MIN_PWM 50
101
+
97
 // @section extruder
102
 // @section extruder
98
 
103
 
99
 // Extruder cooling fans
104
 // Extruder cooling fans

+ 5
- 0
Marlin/example_configurations/Felix/Configuration_adv.h View File

102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
103
 //#define FAN_KICKSTART_TIME 100
103
 //#define FAN_KICKSTART_TIME 100
104
 
104
 
105
+// This defines the minimal speed for the main fan, run in PWM mode
106
+// to enable uncomment and set minimal PWM speed for reliable running (1-255)
107
+// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
108
+//#define FAN_MIN_PWM 50
109
+
105
 // @section extruder
110
 // @section extruder
106
 
111
 
107
 // Extruder cooling fans
112
 // Extruder cooling fans

+ 5
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
103
 //#define FAN_KICKSTART_TIME 100
103
 //#define FAN_KICKSTART_TIME 100
104
 
104
 
105
+// This defines the minimal speed for the main fan, run in PWM mode
106
+// to enable uncomment and set minimal PWM speed for reliable running (1-255)
107
+// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
108
+//#define FAN_MIN_PWM 50
109
+
105
 // @section extruder
110
 // @section extruder
106
 
111
 
107
 // Extruder cooling fans
112
 // Extruder cooling fans

+ 5
- 0
Marlin/example_configurations/K8200/Configuration_adv.h View File

102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
103
 //#define FAN_KICKSTART_TIME 100
103
 //#define FAN_KICKSTART_TIME 100
104
 
104
 
105
+// This defines the minimal speed for the main fan, run in PWM mode
106
+// to enable uncomment and set minimal PWM speed for reliable running (1-255)
107
+// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
108
+#define FAN_MIN_PWM 50 // K8200: fan stops running at about 35 to 40 (of 255)
109
+
105
 // @section extruder
110
 // @section extruder
106
 
111
 
107
 // Extruder cooling fans
112
 // Extruder cooling fans

+ 5
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h View File

102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
103
 //#define FAN_KICKSTART_TIME 100
103
 //#define FAN_KICKSTART_TIME 100
104
 
104
 
105
+// This defines the minimal speed for the main fan, run in PWM mode
106
+// to enable uncomment and set minimal PWM speed for reliable running (1-255)
107
+// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
108
+//#define FAN_MIN_PWM 50
109
+
105
 // @section extruder
110
 // @section extruder
106
 
111
 
107
 // Extruder cooling fans
112
 // Extruder cooling fans

+ 5
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
103
 //#define FAN_KICKSTART_TIME 100
103
 //#define FAN_KICKSTART_TIME 100
104
 
104
 
105
+// This defines the minimal speed for the main fan, run in PWM mode
106
+// to enable uncomment and set minimal PWM speed for reliable running (1-255)
107
+// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
108
+//#define FAN_MIN_PWM 50
109
+
105
 // @section extruder
110
 // @section extruder
106
 
111
 
107
 // Extruder cooling fans
112
 // Extruder cooling fans

+ 5
- 0
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h View File

102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
103
 //#define FAN_KICKSTART_TIME 100
103
 //#define FAN_KICKSTART_TIME 100
104
 
104
 
105
+// This defines the minimal speed for the main fan, run in PWM mode
106
+// to enable uncomment and set minimal PWM speed for reliable running (1-255)
107
+// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
108
+//#define FAN_MIN_PWM 50
109
+
105
 // @section extruder
110
 // @section extruder
106
 
111
 
107
 // Extruder cooling fans
112
 // Extruder cooling fans

+ 5
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
103
 //#define FAN_KICKSTART_TIME 100
103
 //#define FAN_KICKSTART_TIME 100
104
 
104
 
105
+// This defines the minimal speed for the main fan, run in PWM mode
106
+// to enable uncomment and set minimal PWM speed for reliable running (1-255)
107
+// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
108
+//#define FAN_MIN_PWM 50
109
+
105
 // @section extruder
110
 // @section extruder
106
 
111
 
107
 // Extruder cooling fans
112
 // Extruder cooling fans

+ 5
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
103
 //#define FAN_KICKSTART_TIME 100
103
 //#define FAN_KICKSTART_TIME 100
104
 
104
 
105
+// This defines the minimal speed for the main fan, run in PWM mode
106
+// to enable uncomment and set minimal PWM speed for reliable running (1-255)
107
+// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
108
+//#define FAN_MIN_PWM 50
109
+
105
 // @section extruder
110
 // @section extruder
106
 
111
 
107
 // Extruder cooling fans
112
 // Extruder cooling fans

+ 5
- 0
Marlin/example_configurations/makibox/Configuration_adv.h View File

102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
103
 //#define FAN_KICKSTART_TIME 100
103
 //#define FAN_KICKSTART_TIME 100
104
 
104
 
105
+// This defines the minimal speed for the main fan, run in PWM mode
106
+// to enable uncomment and set minimal PWM speed for reliable running (1-255)
107
+// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
108
+//#define FAN_MIN_PWM 50
109
+
105
 // @section extruder
110
 // @section extruder
106
 
111
 
107
 // Extruder cooling fans
112
 // Extruder cooling fans

+ 5
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
102
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
103
 //#define FAN_KICKSTART_TIME 100
103
 //#define FAN_KICKSTART_TIME 100
104
 
104
 
105
+// This defines the minimal speed for the main fan, run in PWM mode
106
+// to enable uncomment and set minimal PWM speed for reliable running (1-255)
107
+// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
108
+//#define FAN_MIN_PWM 50
109
+
105
 // @section extruder
110
 // @section extruder
106
 
111
 
107
 // Extruder cooling fans
112
 // Extruder cooling fans

+ 9
- 4
Marlin/planner.cpp View File

440
         } else {
440
         } else {
441
           fan_kick_end = 0;
441
           fan_kick_end = 0;
442
         }
442
         }
443
-    #endif//FAN_KICKSTART_TIME
443
+    #endif //FAN_KICKSTART_TIME
444
+    #ifdef FAN_MIN_PWM
445
+      #define CALC_FAN_SPEED (tail_fan_speed ? ( FAN_MIN_PWM + (tail_fan_speed * (255 - FAN_MIN_PWM)) / 255 ) : 0)
446
+    #else
447
+      #define CALC_FAN_SPEED tail_fan_speed
448
+    #endif // FAN_MIN_PWM
444
     #ifdef FAN_SOFT_PWM
449
     #ifdef FAN_SOFT_PWM
445
-      fanSpeedSoftPwm = tail_fan_speed;
450
+      fanSpeedSoftPwm = CALC_FAN_SPEED;
446
     #else
451
     #else
447
-      analogWrite(FAN_PIN, tail_fan_speed);
448
-    #endif //!FAN_SOFT_PWM
452
+      analogWrite(FAN_PIN, CALC_FAN_SPEED);
453
+    #endif // FAN_SOFT_PWM
449
   #endif // HAS_FAN
454
   #endif // HAS_FAN
450
 
455
 
451
   #ifdef AUTOTEMP
456
   #ifdef AUTOTEMP

Loading…
Cancel
Save