Browse Source

Merge pull request #6556 from thinkyhead/rc_use_controller_fan

Implement USE_CONTROLLER_FAN as a feature
Scott Lahteine 7 years ago
parent
commit
902fe76db9
30 changed files with 335 additions and 174 deletions
  1. 3
    3
      Marlin/Conditionals_post.h
  2. 13
    6
      Marlin/Configuration_adv.h
  3. 7
    7
      Marlin/Marlin_main.cpp
  4. 15
    11
      Marlin/SanityCheck.h
  5. 13
    6
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  6. 13
    6
      Marlin/example_configurations/Felix/Configuration_adv.h
  7. 13
    6
      Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h
  8. 13
    6
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  9. 13
    6
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  10. 13
    6
      Marlin/example_configurations/K8200/Configuration_adv.h
  11. 13
    6
      Marlin/example_configurations/K8400/Configuration_adv.h
  12. 13
    6
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  13. 13
    6
      Marlin/example_configurations/SCARA/Configuration_adv.h
  14. 13
    14
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  15. 13
    6
      Marlin/example_configurations/TinyBoy2/Configuration_adv.h
  16. 13
    6
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  17. 13
    6
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h
  18. 13
    6
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h
  19. 13
    6
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  20. 13
    6
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  21. 13
    6
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  22. 13
    6
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  23. 13
    6
      Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h
  24. 13
    6
      Marlin/example_configurations/makibox/Configuration_adv.h
  25. 13
    6
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  26. 13
    6
      Marlin/example_configurations/wt150/Configuration_adv.h
  27. 3
    3
      Marlin/pins.h
  28. 2
    2
      Marlin/pinsDebug_list.h
  29. 3
    1
      Marlin/pins_AZTEEG_X3_PRO.h
  30. 3
    1
      Marlin/pins_MEGACONTROLLER.h

+ 3
- 3
Marlin/Conditionals_post.h View File

558
 
558
 
559
   // Other fans
559
   // Other fans
560
   #define HAS_FAN0 (PIN_EXISTS(FAN))
560
   #define HAS_FAN0 (PIN_EXISTS(FAN))
561
-  #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLERFAN_PIN != FAN1_PIN && E0_AUTO_FAN_PIN != FAN1_PIN && E1_AUTO_FAN_PIN != FAN1_PIN && E2_AUTO_FAN_PIN != FAN1_PIN && E3_AUTO_FAN_PIN != FAN1_PIN)
562
-  #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLERFAN_PIN != FAN2_PIN && E0_AUTO_FAN_PIN != FAN2_PIN && E1_AUTO_FAN_PIN != FAN2_PIN && E2_AUTO_FAN_PIN != FAN2_PIN && E3_AUTO_FAN_PIN != FAN2_PIN)
563
-  #define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN))
561
+  #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLER_FAN_PIN != FAN1_PIN && E0_AUTO_FAN_PIN != FAN1_PIN && E1_AUTO_FAN_PIN != FAN1_PIN && E2_AUTO_FAN_PIN != FAN1_PIN && E3_AUTO_FAN_PIN != FAN1_PIN)
562
+  #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLER_FAN_PIN != FAN2_PIN && E0_AUTO_FAN_PIN != FAN2_PIN && E1_AUTO_FAN_PIN != FAN2_PIN && E2_AUTO_FAN_PIN != FAN2_PIN && E3_AUTO_FAN_PIN != FAN2_PIN)
563
+  #define HAS_CONTROLLER_FAN (PIN_EXISTS(CONTROLLER_FAN))
564
 
564
 
565
   // Servos
565
   // Servos
566
   #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0)
566
   #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0)

+ 13
- 6
Marlin/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 7
- 7
Marlin/Marlin_main.cpp View File

11471
 
11471
 
11472
 #endif // BEZIER_CURVE_SUPPORT
11472
 #endif // BEZIER_CURVE_SUPPORT
11473
 
11473
 
11474
-#if HAS_CONTROLLERFAN
11474
+#if USE_CONTROLLER_FAN
11475
 
11475
 
11476
   void controllerFan() {
11476
   void controllerFan() {
11477
     static millis_t lastMotorOn = 0, // Last time a motor was turned on
11477
     static millis_t lastMotorOn = 0, // Last time a motor was turned on
11504
       uint8_t speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : CONTROLLERFAN_SPEED;
11504
       uint8_t speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : CONTROLLERFAN_SPEED;
11505
 
11505
 
11506
       // allows digital or PWM fan output to be used (see M42 handling)
11506
       // allows digital or PWM fan output to be used (see M42 handling)
11507
-      WRITE(CONTROLLERFAN_PIN, speed);
11508
-      analogWrite(CONTROLLERFAN_PIN, speed);
11507
+      WRITE(CONTROLLER_FAN_PIN, speed);
11508
+      analogWrite(CONTROLLER_FAN_PIN, speed);
11509
     }
11509
     }
11510
   }
11510
   }
11511
 
11511
 
11512
-#endif // HAS_CONTROLLERFAN
11512
+#endif // USE_CONTROLLER_FAN
11513
 
11513
 
11514
 #if ENABLED(MORGAN_SCARA)
11514
 #if ENABLED(MORGAN_SCARA)
11515
 
11515
 
11925
     }
11925
     }
11926
   #endif
11926
   #endif
11927
 
11927
 
11928
-  #if HAS_CONTROLLERFAN
11928
+  #if USE_CONTROLLER_FAN
11929
     controllerFan(); // Check if fan should be turned on to cool stepper drivers down
11929
     controllerFan(); // Check if fan should be turned on to cool stepper drivers down
11930
   #endif
11930
   #endif
11931
 
11931
 
12195
     endstops.enable_z_probe(false);
12195
     endstops.enable_z_probe(false);
12196
   #endif
12196
   #endif
12197
 
12197
 
12198
-  #if HAS_CONTROLLERFAN
12199
-    SET_OUTPUT(CONTROLLERFAN_PIN); //Set pin used for driver cooling fan
12198
+  #if USE_CONTROLLER_FAN
12199
+    SET_OUTPUT(CONTROLLER_FAN_PIN); //Set pin used for driver cooling fan
12200
   #endif
12200
   #endif
12201
 
12201
 
12202
   #if HAS_STEPPER_RESET
12202
   #if HAS_STEPPER_RESET

+ 15
- 11
Marlin/SanityCheck.h View File

174
   #error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS. Please update your configuration."
174
   #error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS. Please update your configuration."
175
 #elif ENABLED(Z_PROBE_SLED) && defined(SLED_PIN)
175
 #elif ENABLED(Z_PROBE_SLED) && defined(SLED_PIN)
176
   #error "Replace SLED_PIN with SOL1_PIN (applies to both Z_PROBE_SLED and SOLENOID_PROBE)."
176
   #error "Replace SLED_PIN with SOL1_PIN (applies to both Z_PROBE_SLED and SOLENOID_PROBE)."
177
+#elif defined(CONTROLLERFAN_PIN)
178
+  #error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN. Please update your Configuration_adv.h."
177
 #endif
179
 #endif
178
 
180
 
179
 /**
181
 /**
765
   #endif
767
   #endif
766
 #endif
768
 #endif
767
 
769
 
768
-#if HAS_FAN0 && CONTROLLERFAN_PIN == FAN_PIN
769
-  #error "You cannot set CONTROLLERFAN_PIN equal to FAN_PIN."
770
+#if HAS_FAN0 && CONTROLLER_FAN_PIN == FAN_PIN
771
+  #error "You cannot set CONTROLLER_FAN_PIN equal to FAN_PIN."
770
 #endif
772
 #endif
771
 
773
 
772
-#if HAS_CONTROLLERFAN
773
-  #if E0_AUTO_FAN_PIN == CONTROLLERFAN_PIN
774
-    #error "You cannot set E0_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
775
-  #elif E1_AUTO_FAN_PIN == CONTROLLERFAN_PIN
776
-    #error "You cannot set E1_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
777
-  #elif E2_AUTO_FAN_PIN == CONTROLLERFAN_PIN
778
-    #error "You cannot set E2_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
779
-  #elif E3_AUTO_FAN_PIN == CONTROLLERFAN_PIN
780
-    #error "You cannot set E3_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
774
+#if USE_CONTROLLER_FAN
775
+  #if !HAS_CONTROLLER_FAN
776
+    #error "USE_CONTROLLER_FAN requires a CONTROLLER_FAN_PIN. Define in Configuration_adv.h."
777
+  #elif E0_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
778
+    #error "You cannot set E0_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
779
+  #elif E1_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
780
+    #error "You cannot set E1_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
781
+  #elif E2_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
782
+    #error "You cannot set E2_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
783
+  #elif E3_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
784
+    #error "You cannot set E3_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
781
   #endif
785
   #endif
782
 #endif
786
 #endif
783
 
787
 

+ 13
- 6
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 3.0
174
 #define TEMP_SENSOR_AD595_OFFSET 3.0
175
 #define TEMP_SENSOR_AD595_GAIN   2.0
175
 #define TEMP_SENSOR_AD595_GAIN   2.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/Felix/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/K8200/Configuration_adv.h View File

187
 #define TEMP_SENSOR_AD595_OFFSET 0.0
187
 #define TEMP_SENSOR_AD595_OFFSET 0.0
188
 #define TEMP_SENSOR_AD595_GAIN   1.0
188
 #define TEMP_SENSOR_AD595_GAIN   1.0
189
 
189
 
190
-//This is for controlling a fan to cool down the stepper drivers
191
-//it will turn on when any driver is enabled
192
-//and turn off after the set amount of seconds from last driver being disabled again
193
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
194
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
195
-#define CONTROLLERFAN_SPEED 255  // == full speed
190
+/**
191
+ * Controller Fan
192
+ * To cool down the stepper drivers and MOSFETs.
193
+ *
194
+ * The fan will turn on automatically whenever any stepper is enabled
195
+ * and turn off after a set period after all steppers are turned off.
196
+ */
197
+//#define USE_CONTROLLER_FAN
198
+#if ENABLED(USE_CONTROLLER_FAN)
199
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
200
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
201
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
202
+#endif
196
 
203
 
197
 // When first starting the main fan, run it at full speed for the
204
 // When first starting the main fan, run it at full speed for the
198
 // given number of milliseconds.  This gets the fan spinning reliably
205
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/K8400/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN 2 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  #define CONTROLLER_FAN_PIN 2           // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN 4 // RigidBot: Fans/Water Pump to cool the hotend cool side.
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  #define CONTROLLER_FAN_PIN 4           // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/SCARA/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 14
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-
181
-/**********************************************************
182
-  Fan Pins
183
-  Fan_0 8 - Extruder 0 fan
184
-  Fan_1 6 - Extruder 1 fan
185
-  Fan_2 2 - Case fan
186
-***********************************************************/
187
-
188
-#define CONTROLLERFAN_PIN 2 //Pin used for the fan to cool controller (-1 to disable)
189
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
190
-#define CONTROLLERFAN_SPEED 130  // 255 == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  #define CONTROLLER_FAN_PIN 2           // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 130        // 255 == full speed
189
+#endif
191
 
190
 
192
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
193
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/TinyBoy2/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

179
 #define TEMP_SENSOR_AD595_OFFSET 0.0
179
 #define TEMP_SENSOR_AD595_OFFSET 0.0
180
 #define TEMP_SENSOR_AD595_GAIN   1.0
180
 #define TEMP_SENSOR_AD595_GAIN   1.0
181
 
181
 
182
-//This is for controlling a fan to cool down the stepper drivers
183
-//it will turn on when any driver is enabled
184
-//and turn off after the set amount of seconds from last driver being disabled again
185
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
186
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
187
-#define CONTROLLERFAN_SPEED 255  // == full speed
182
+/**
183
+ * Controller Fan
184
+ * To cool down the stepper drivers and MOSFETs.
185
+ *
186
+ * The fan will turn on automatically whenever any stepper is enabled
187
+ * and turn off after a set period after all steppers are turned off.
188
+ */
189
+//#define USE_CONTROLLER_FAN
190
+#if ENABLED(USE_CONTROLLER_FAN)
191
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
192
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
193
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
194
+#endif
188
 
195
 
189
 // When first starting the main fan, run it at full speed for the
196
 // When first starting the main fan, run it at full speed for the
190
 // given number of milliseconds.  This gets the fan spinning reliably
197
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/makibox/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN 23 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  #define CONTROLLER_FAN_PIN 23          // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 13
- 6
Marlin/example_configurations/wt150/Configuration_adv.h View File

174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
174
 #define TEMP_SENSOR_AD595_OFFSET 0.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
175
 #define TEMP_SENSOR_AD595_GAIN   1.0
176
 
176
 
177
-//This is for controlling a fan to cool down the stepper drivers
178
-//it will turn on when any driver is enabled
179
-//and turn off after the set amount of seconds from last driver being disabled again
180
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
181
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
182
-#define CONTROLLERFAN_SPEED 255  // == full speed
177
+/**
178
+ * Controller Fan
179
+ * To cool down the stepper drivers and MOSFETs.
180
+ *
181
+ * The fan will turn on automatically whenever any stepper is enabled
182
+ * and turn off after a set period after all steppers are turned off.
183
+ */
184
+//#define USE_CONTROLLER_FAN
185
+#if ENABLED(USE_CONTROLLER_FAN)
186
+  //#define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan
187
+  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
188
+  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
189
+#endif
183
 
190
 
184
 // When first starting the main fan, run it at full speed for the
191
 // When first starting the main fan, run it at full speed for the
185
 // given number of milliseconds.  This gets the fan spinning reliably
192
 // given number of milliseconds.  This gets the fan spinning reliably

+ 3
- 3
Marlin/pins.h View File

219
 #ifndef FAN2_PIN
219
 #ifndef FAN2_PIN
220
   #define FAN2_PIN -1
220
   #define FAN2_PIN -1
221
 #endif
221
 #endif
222
-#ifndef CONTROLLERFAN_PIN
223
-  #define CONTROLLERFAN_PIN  -1
222
+#ifndef CONTROLLER_FAN_PIN
223
+  #define CONTROLLER_FAN_PIN  -1
224
 #endif
224
 #endif
225
 
225
 
226
 #ifndef HEATER_0_PIN
226
 #ifndef HEATER_0_PIN
507
     X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \
507
     X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \
508
     Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \
508
     Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \
509
     Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MIN_PROBE_PIN, \
509
     Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MIN_PROBE_PIN, \
510
-    PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, FAN1_PIN, FAN2_PIN, CONTROLLERFAN_PIN, \
510
+    PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, FAN1_PIN, FAN2_PIN, CONTROLLER_FAN_PIN, \
511
     _E0_PINS _E1_PINS _E2_PINS _E3_PINS _E4_PINS BED_PINS \
511
     _E0_PINS _E1_PINS _E2_PINS _E3_PINS _E4_PINS BED_PINS \
512
     _H0_PINS _H1_PINS _H2_PINS _H3_PINS _H4_PINS \
512
     _H0_PINS _H1_PINS _H2_PINS _H3_PINS _H4_PINS \
513
     _X2_PINS _Y2_PINS _Z2_PINS \
513
     _X2_PINS _Y2_PINS _Z2_PINS \

+ 2
- 2
Marlin/pinsDebug_list.h View File

95
 #if PIN_EXISTS(CASE_LIGHT)
95
 #if PIN_EXISTS(CASE_LIGHT)
96
   REPORT_NAME_DIGITAL(CASE_LIGHT_PIN, __LINE__ )
96
   REPORT_NAME_DIGITAL(CASE_LIGHT_PIN, __LINE__ )
97
 #endif
97
 #endif
98
-#if PIN_EXISTS(CONTROLLERFAN)
99
-  REPORT_NAME_DIGITAL(CONTROLLERFAN_PIN, __LINE__ )
98
+#if PIN_EXISTS(CONTROLLER_FAN)
99
+  REPORT_NAME_DIGITAL(CONTROLLER_FAN_PIN, __LINE__ )
100
 #endif
100
 #endif
101
 #if PIN_EXISTS(CUTOFF_RESET)
101
 #if PIN_EXISTS(CUTOFF_RESET)
102
   REPORT_NAME_DIGITAL(CUTOFF_RESET_PIN, __LINE__ )
102
   REPORT_NAME_DIGITAL(CUTOFF_RESET_PIN, __LINE__ )

+ 3
- 1
Marlin/pins_AZTEEG_X3_PRO.h View File

107
 #undef FAN_PIN
107
 #undef FAN_PIN
108
 #define FAN_PIN             6 // Part Cooling System
108
 #define FAN_PIN             6 // Part Cooling System
109
 
109
 
110
-#define CONTROLLERFAN_PIN   4 // Pin used for the fan to cool motherboard (-1 to disable)
110
+#ifndef CONTROLLER_FAN_PIN
111
+  #define CONTROLLER_FAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable)
112
+#endif
111
 
113
 
112
 // Fans/Water Pump to cool the hotend cool side.
114
 // Fans/Water Pump to cool the hotend cool side.
113
 #define ORIG_E0_AUTO_FAN_PIN 5
115
 #define ORIG_E0_AUTO_FAN_PIN 5

+ 3
- 1
Marlin/pins_MEGACONTROLLER.h View File

116
 #define FAN1_PIN           35
116
 #define FAN1_PIN           35
117
 #define FAN2_PIN           36
117
 #define FAN2_PIN           36
118
 
118
 
119
-#define CONTROLLERFAN_PIN  FAN2_PIN
119
+#ifndef CONTROLLER_FAN_PIN
120
+  #define CONTROLLER_FAN_PIN FAN2_PIN
121
+#endif
120
 
122
 
121
 #define FAN_SOFT_PWM
123
 #define FAN_SOFT_PWM
122
 
124
 

Loading…
Cancel
Save