Procházet zdrojové kódy

Update the Ender-4 example config (#12131)

- Enable filament change menu
- Enable bed-PID
- Enable s-curve acceleration
- Enable some menu items
- Update from Skorpi's new version
- Fix extruder steps, deactivate nozzle clean feature
Hannes Brandstätter-Müller před 6 roky
rodič
revize
c36773bffb

+ 19
- 19
Marlin/src/config/examples/Creality/Ender-4/Configuration.h Zobrazit soubor

@@ -399,7 +399,7 @@
399 399
 #define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
400 400
 #define PID_K1 0.95      // Smoothing factor within any PID loop
401 401
 #if ENABLED(PIDTEMP)
402
-  //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
402
+  #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
403 403
   //#define PID_DEBUG // Sends debug data to the serial port.
404 404
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
405 405
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -411,9 +411,9 @@
411 411
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
412 412
 
413 413
   // Ender-4
414
-  #define DEFAULT_Kp 22.57
415
-  #define DEFAULT_Ki 1.72
416
-  #define DEFAULT_Kd 73.96
414
+  #define DEFAULT_Kp 16.67
415
+  #define DEFAULT_Ki 1.12
416
+  #define DEFAULT_Kd 62.14
417 417
 
418 418
   // Ultimaker
419 419
 //  #define DEFAULT_Kp 22.2
@@ -449,7 +449,7 @@
449 449
  * heater. If your configuration is significantly different than this and you don't understand
450 450
  * the issues involved, don't use bed PID until someone else verifies that your hardware works.
451 451
  */
452
-//#define PIDTEMPBED
452
+#define PIDTEMPBED
453 453
 
454 454
 //#define BED_LIMIT_SWITCHING
455 455
 
@@ -502,7 +502,7 @@
502 502
  * Note: For Bowden Extruders make this large enough to allow load/unload.
503 503
  */
504 504
 #define PREVENT_LENGTHY_EXTRUDE
505
-#define EXTRUDE_MAXLENGTH 500
505
+#define EXTRUDE_MAXLENGTH 750
506 506
 
507 507
 //===========================================================================
508 508
 //======================== Thermal Runaway Protection =======================
@@ -582,7 +582,7 @@
582 582
 #endif
583 583
 
584 584
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
585
-#define X_MIN_ENDSTOP_INVERTING true//false // set to true to invert the logic of the endstop.
585
+#define X_MIN_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
586 586
 #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
587 587
 #define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
588 588
 #define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
@@ -661,14 +661,14 @@
661 661
  * Override with M92
662 662
  *                                      X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
663 663
  */
664
-#define DEFAULT_AXIS_STEPS_PER_UNIT    { 80, 80, 400, 110 }
664
+#define DEFAULT_AXIS_STEPS_PER_UNIT    { 80, 80, 400, 100 }
665 665
 
666 666
 /**
667 667
  * Default Max Feed Rate (mm/s)
668 668
  * Override with M203
669 669
  *                                      X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
670 670
  */
671
-#define DEFAULT_MAX_FEEDRATE          { 300, 300, 10, 25 }
671
+#define DEFAULT_MAX_FEEDRATE          { 500, 500, 15, 25 }
672 672
 
673 673
 /**
674 674
  * Default Max Acceleration (change/s) change = mm/s
@@ -676,7 +676,7 @@
676 676
  * Override with M201
677 677
  *                                      X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
678 678
  */
679
-#define DEFAULT_MAX_ACCELERATION      { 500, 500, 100, 5000 }
679
+#define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 }
680 680
 
681 681
 /**
682 682
  * Default Acceleration (change/s) change = mm/s
@@ -711,7 +711,7 @@
711 711
  *
712 712
  * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
713 713
  */
714
-//#define S_CURVE_ACCELERATION
714
+#define S_CURVE_ACCELERATION
715 715
 
716 716
 //===========================================================================
717 717
 //============================= Z Probe Options =============================
@@ -978,7 +978,7 @@
978 978
 #endif
979 979
 
980 980
 #if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
981
-  //#define SOFT_ENDSTOPS_MENU_ITEM  // Enable/Disable software endstops from the LCD
981
+  #define SOFT_ENDSTOPS_MENU_ITEM    // Enable/Disable software endstops from the LCD
982 982
 #endif
983 983
 
984 984
 /**
@@ -1050,15 +1050,15 @@
1050 1050
  */
1051 1051
 //#define AUTO_BED_LEVELING_3POINT
1052 1052
 //#define AUTO_BED_LEVELING_LINEAR
1053
-#define AUTO_BED_LEVELING_BILINEAR
1053
+//#define AUTO_BED_LEVELING_BILINEAR
1054 1054
 //#define AUTO_BED_LEVELING_UBL
1055
-//#define MESH_BED_LEVELING
1055
+#define MESH_BED_LEVELING
1056 1056
 
1057 1057
 /**
1058 1058
  * Normally G28 leaves leveling disabled on completion. Enable
1059 1059
  * this option to have G28 restore the prior leveling state.
1060 1060
  */
1061
-//#define RESTORE_LEVELING_AFTER_G28
1061
+#define RESTORE_LEVELING_AFTER_G28
1062 1062
 
1063 1063
 /**
1064 1064
  * Enable detailed logging of G28, G29, M48, etc.
@@ -1153,7 +1153,7 @@
1153 1153
   #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
1154 1154
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1155 1155
 
1156
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
1156
+  #define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
1157 1157
 
1158 1158
 #endif // BED_LEVELING
1159 1159
 
@@ -1225,7 +1225,7 @@
1225 1225
 
1226 1226
 // Homing speeds (mm/m)
1227 1227
 #define HOMING_FEEDRATE_XY (50*60)
1228
-#define HOMING_FEEDRATE_Z  (4*60)
1228
+#define HOMING_FEEDRATE_Z  (7*60)
1229 1229
 
1230 1230
 // Validate that endstops are triggered on homing moves
1231 1231
 #define VALIDATE_HOMING_ENDSTOPS
@@ -1352,7 +1352,7 @@
1352 1352
  *    P1  Raise the nozzle always to Z-park height.
1353 1353
  *    P2  Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
1354 1354
  */
1355
-//#define NOZZLE_PARK_FEATURE
1355
+#define NOZZLE_PARK_FEATURE
1356 1356
 
1357 1357
 #if ENABLED(NOZZLE_PARK_FEATURE)
1358 1358
   // Specify a park position as { X, Y, Z }
@@ -1399,7 +1399,7 @@
1399 1399
  * Attention: EXPERIMENTAL. G-code arguments may change.
1400 1400
  *
1401 1401
  */
1402
-#define NOZZLE_CLEAN_FEATURE
1402
+//#define NOZZLE_CLEAN_FEATURE
1403 1403
 
1404 1404
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1405 1405
   // Default number of pattern repetitions

+ 12
- 12
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h Zobrazit soubor

@@ -90,7 +90,7 @@
90 90
    * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
91 91
    * below 2.
92 92
    */
93
-  #define WATCH_TEMP_PERIOD 20                // Seconds
93
+  #define WATCH_TEMP_PERIOD 30                // Seconds
94 94
   #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
95 95
 #endif
96 96
 
@@ -263,7 +263,7 @@
263 263
  */
264 264
 #define CASE_LIGHT_ENABLE
265 265
 #if ENABLED(CASE_LIGHT_ENABLE)
266
-  #define CASE_LIGHT_PIN ENDER4_FAN_PIN      // Override the default pin if needed
266
+  #define CASE_LIGHT_PIN ENDER4_FAN_PIN       // Override the default pin if needed
267 267
   #define INVERT_CASE_LIGHT false             // Set true if Case Light is ON when pin is LOW
268 268
   #define CASE_LIGHT_DEFAULT_ON false         // Set default power-up state on
269 269
   #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105   // Set default power-up brightness (0-255, requires PWM pin)
@@ -1070,28 +1070,28 @@
1070 1070
  * Requires NOZZLE_PARK_FEATURE.
1071 1071
  * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
1072 1072
  */
1073
-//#define ADVANCED_PAUSE_FEATURE
1073
+#define ADVANCED_PAUSE_FEATURE
1074 1074
 #if ENABLED(ADVANCED_PAUSE_FEATURE)
1075 1075
   #define PAUSE_PARK_RETRACT_FEEDRATE         60  // (mm/s) Initial retract feedrate.
1076 1076
   #define PAUSE_PARK_RETRACT_LENGTH            2  // (mm) Initial retract.
1077 1077
                                                   // This short retract is done immediately, before parking the nozzle.
1078
-  #define FILAMENT_CHANGE_UNLOAD_FEEDRATE     10  // (mm/s) Unload filament feedrate. This can be pretty fast.
1078
+  #define FILAMENT_CHANGE_UNLOAD_FEEDRATE     35  // (mm/s) Unload filament feedrate. This can be pretty fast.
1079 1079
   #define FILAMENT_CHANGE_UNLOAD_ACCEL        25  // (mm/s^2) Lower acceleration may allow a faster feedrate.
1080
-  #define FILAMENT_CHANGE_UNLOAD_LENGTH      100  // (mm) The length of filament for a complete unload.
1080
+  #define FILAMENT_CHANGE_UNLOAD_LENGTH      650  // (mm) The length of filament for a complete unload.
1081 1081
                                                   //   For Bowden, the full length of the tube and nozzle.
1082 1082
                                                   //   For direct drive, the full length of the nozzle.
1083 1083
                                                   //   Set to 0 for manual unloading.
1084 1084
   #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE   6  // (mm/s) Slow move when starting load.
1085 1085
   #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH     0  // (mm) Slow length, to allow time to insert material.
1086 1086
                                                   // 0 to disable start loading and skip to fast load only
1087
-  #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE   6  // (mm/s) Load filament feedrate. This can be pretty fast.
1087
+  #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE  35  // (mm/s) Load filament feedrate. This can be pretty fast.
1088 1088
   #define FILAMENT_CHANGE_FAST_LOAD_ACCEL     25  // (mm/s^2) Lower acceleration may allow a faster feedrate.
1089
-  #define FILAMENT_CHANGE_FAST_LOAD_LENGTH     0  // (mm) Load length of filament, from extruder gear to nozzle.
1089
+  #define FILAMENT_CHANGE_FAST_LOAD_LENGTH   600  // (mm) Load length of filament, from extruder gear to nozzle.
1090 1090
                                                   //   For Bowden, the full length of the tube and nozzle.
1091 1091
                                                   //   For direct drive, the full length of the nozzle.
1092
-  //#define ADVANCED_PAUSE_CONTINUOUS_PURGE       // Purge continuously up to the purge length until interrupted.
1092
+  #define ADVANCED_PAUSE_CONTINUOUS_PURGE         // Purge continuously up to the purge length until interrupted.
1093 1093
   #define ADVANCED_PAUSE_PURGE_FEEDRATE        3  // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
1094
-  #define ADVANCED_PAUSE_PURGE_LENGTH         50  // (mm) Length to extrude after loading.
1094
+  #define ADVANCED_PAUSE_PURGE_LENGTH         60  // (mm) Length to extrude after loading.
1095 1095
                                                   //   Set to 0 for manual extrusion.
1096 1096
                                                   //   Filament can be extruded repeatedly from the Filament Change menu
1097 1097
                                                   //   until extrusion is consistent, and to purge old filament.
@@ -1105,10 +1105,10 @@
1105 1105
   #define FILAMENT_CHANGE_ALERT_BEEPS         10  // Number of alert beeps to play when a response is needed.
1106 1106
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT           // Enable for XYZ steppers to stay powered on during filament change.
1107 1107
 
1108
-  //#define PARK_HEAD_ON_PAUSE                    // Park the nozzle during pause and filament change.
1109
-  //#define HOME_BEFORE_FILAMENT_CHANGE           // Ensure homing has been completed prior to parking for filament change
1108
+  #define PARK_HEAD_ON_PAUSE                      // Park the nozzle during pause and filament change.
1109
+  #define HOME_BEFORE_FILAMENT_CHANGE             // Ensure homing has been completed prior to parking for filament change
1110 1110
 
1111
-  //#define FILAMENT_LOAD_UNLOAD_GCODES           // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
1111
+  #define FILAMENT_LOAD_UNLOAD_GCODES           // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
1112 1112
   //#define FILAMENT_UNLOAD_ALL_EXTRUDERS         // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
1113 1113
 #endif
1114 1114
 

+ 7
- 0
Marlin/src/inc/SanityCheck.h Zobrazit soubor

@@ -1235,6 +1235,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
1235 1235
 #endif
1236 1236
 
1237 1237
 /**
1238
+ * Test case light not using the same pin as the fan
1239
+ */
1240
+#if ENABLED(CASE_LIGHT_ENABLE) && CASE_LIGHT_PIN == FAN_PIN
1241
+  #error "You cannot set CASE_LIGHT_PIN equal to FAN_PIN."
1242
+#endif
1243
+
1244
+/**
1238 1245
  * Test Heater, Temp Sensor, and Extruder Pins; Sensor Type must also be set.
1239 1246
  */
1240 1247
 #if !HAS_HEATER_0

Loading…
Zrušit
Uložit