Parcourir la source

✨ Extruder with Dual Stepper Drivers (#21403)

Bo Herrmannsen il y a 3 ans
Parent
révision
3d0e8346be
Aucun compte lié à l'adresse e-mail de l'auteur

+ 6
- 0
Marlin/Configuration_adv.h Voir le fichier

@@ -677,6 +677,12 @@
677 677
   #endif
678 678
 #endif
679 679
 
680
+// Drive the E axis with two synchronized steppers
681
+//#define E_DUAL_STEPPER_DRIVERS
682
+#if ENABLED(E_DUAL_STEPPER_DRIVERS)
683
+  //#define INVERT_E1_VS_E0_DIR   // Enable if the E motors need opposite DIR states
684
+#endif
685
+
680 686
 /**
681 687
  * Dual X Carriage
682 688
  *

+ 16
- 4
Marlin/src/inc/Conditionals_LCD.h Voir le fichier

@@ -558,7 +558,12 @@
558 558
   #undef DISABLE_E
559 559
 #endif
560 560
 
561
-#if ENABLED(SWITCHING_EXTRUDER)   // One stepper for every two EXTRUDERS
561
+#if ENABLED(E_DUAL_STEPPER_DRIVERS) // E0/E1 steppers act in tandem as E0
562
+
563
+  #define E_STEPPERS      2
564
+
565
+#elif ENABLED(SWITCHING_EXTRUDER)   // One stepper for every two EXTRUDERS
566
+
562 567
   #if EXTRUDERS > 4
563 568
     #define E_STEPPERS    3
564 569
   #elif EXTRUDERS > 2
@@ -569,17 +574,24 @@
569 574
   #if DISABLED(SWITCHING_NOZZLE)
570 575
     #define HOTENDS       E_STEPPERS
571 576
   #endif
572
-#elif ENABLED(MIXING_EXTRUDER)
577
+
578
+#elif ENABLED(MIXING_EXTRUDER)      // Multiple feeds are mixed proportionally
579
+
573 580
   #define E_STEPPERS      MIXING_STEPPERS
574 581
   #define E_MANUAL        1
575 582
   #if MIXING_STEPPERS == 2
576 583
     #define HAS_DUAL_MIXING 1
577 584
   #endif
578
-#elif ENABLED(SWITCHING_TOOLHEAD)
585
+
586
+#elif ENABLED(SWITCHING_TOOLHEAD)   // Toolchanger
587
+
579 588
   #define E_STEPPERS      EXTRUDERS
580 589
   #define E_MANUAL        EXTRUDERS
581
-#elif HAS_PRUSA_MMU2
590
+
591
+#elif HAS_PRUSA_MMU2                // Průša Multi-Material Unit v2
592
+
582 593
   #define E_STEPPERS 1
594
+
583 595
 #endif
584 596
 
585 597
 // No inactive extruders with SWITCHING_NOZZLE or Průša MMU1

+ 13
- 0
Marlin/src/inc/SanityCheck.h Voir le fichier

@@ -1162,6 +1162,19 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1162 1162
 #endif
1163 1163
 
1164 1164
 /**
1165
+ * Dual E Steppers requirements
1166
+ */
1167
+#if ENABLED(E_DUAL_STEPPER_DRIVERS)
1168
+  #if EXTRUDERS > 1
1169
+    #error "E_DUAL_STEPPER_DRIVERS can only be used with EXTRUDERS set to 1."
1170
+  #elif ENABLED(MIXING_EXTRUDER)
1171
+    #error "E_DUAL_STEPPER_DRIVERS is incompatible with MIXING_EXTRUDER."
1172
+  #elif ENABLED(SWITCHING_EXTRUDER)
1173
+    #error "E_DUAL_STEPPER_DRIVERS is incompatible with SWITCHING_EXTRUDER."
1174
+  #endif
1175
+#endif
1176
+
1177
+/**
1165 1178
  * Linear Advance 1.5 - Check K value range
1166 1179
  */
1167 1180
 #if ENABLED(LIN_ADVANCE)

+ 12
- 0
Marlin/src/module/stepper/indirection.h Voir le fichier

@@ -645,6 +645,11 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
645 645
 
646 646
   #endif
647 647
 
648
+#elif ENABLED(E_DUAL_STEPPER_DRIVERS)
649
+  #define E_STEP_WRITE(E,V) do{ E0_STEP_WRITE(V); E1_STEP_WRITE(V); }while(0)
650
+  #define   NORM_E_DIR(E)   do{ E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E0_DIR ^ ENABLED(INVERT_E1_VS_E0_DIR)); }while(0)
651
+  #define    REV_E_DIR(E)   do{ E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E0_DIR ^ ENABLED(INVERT_E1_VS_E0_DIR)); }while(0)
652
+
648 653
 #elif E_STEPPERS
649 654
   #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V)
650 655
   #define   NORM_E_DIR(E)   E0_DIR_WRITE(!INVERT_E0_DIR)
@@ -1013,6 +1018,7 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
1013 1018
 //
1014 1019
 
1015 1020
 #if ENABLED(MIXING_EXTRUDER)
1021
+
1016 1022
   /**
1017 1023
    * Mixing steppers keep all their enable (and direction) states synchronized
1018 1024
    */
@@ -1020,6 +1026,12 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
1020 1026
   #define _CALL_DIS_E(N) DISABLE_STEPPER_E##N () ;
1021 1027
   #define  ENABLE_AXIS_E0() { RREPEAT(MIXING_STEPPERS, _CALL_ENA_E) }
1022 1028
   #define DISABLE_AXIS_E0() { RREPEAT(MIXING_STEPPERS, _CALL_DIS_E) }
1029
+
1030
+#elif ENABLED(E_DUAL_STEPPER_DRIVERS)
1031
+
1032
+  #define  ENABLE_AXIS_E0() do{  ENABLE_STEPPER_E0();  ENABLE_STEPPER_E1(); }while(0)
1033
+  #define DISABLE_AXIS_E0() do{ DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); }while(0)
1034
+
1023 1035
 #endif
1024 1036
 
1025 1037
 #ifndef ENABLE_AXIS_E0

+ 10
- 2
Marlin/src/pins/pins_postprocess.h Voir le fichier

@@ -543,9 +543,17 @@
543 543
 #define _EPIN(p,q) __EPIN(p,q)
544 544
 #define DIAG_REMAPPED(p,q) (PIN_EXISTS(q) && _EPIN(p##_E_INDEX, DIAG) == q##_PIN)
545 545
 
546
-// The X2 axis, if any, should be the next open extruder port
547
-#define X2_E_INDEX E_STEPPERS
546
+// The E0/E1 steppers are always used for Dual E
547
+#if ENABLED(E_DUAL_STEPPER_DRIVERS)
548
+  #ifndef E1_STEP_PIN
549
+    #error "No E1 stepper available for E_DUAL_STEPPER_DRIVERS!"
550
+  #endif
551
+  #define X2_E_INDEX INCREMENT(E_STEPPERS)
552
+#else
553
+  #define X2_E_INDEX E_STEPPERS
554
+#endif
548 555
 
556
+// The X2 axis, if any, should be the next open extruder port
549 557
 #if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
550 558
   #ifndef X2_STEP_PIN
551 559
     #define X2_STEP_PIN   _EPIN(X2_E_INDEX, STEP)

+ 2
- 3
buildroot/tests/DUE Voir le fichier

@@ -24,7 +24,7 @@ opt_enable S_CURVE_ACCELERATION EEPROM_SETTINGS GCODE_MACROS \
24 24
            SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE CALIBRATION_GCODE \
25 25
            BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \
26 26
            FWRETRACT ARC_SUPPORT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \
27
-           PSU_CONTROL AUTO_POWER_CONTROL \
27
+           PSU_CONTROL AUTO_POWER_CONTROL E_DUAL_STEPPER_DRIVERS \
28 28
            PIDTEMPBED SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER \
29 29
            PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL \
30 30
            EXTENSIBLE_UI
@@ -38,10 +38,9 @@ restore_configs
38 38
 opt_set MOTHERBOARD BOARD_RADDS NUM_Z_STEPPER_DRIVERS 3
39 39
 opt_enable USE_XMAX_PLUG USE_YMAX_PLUG ENDSTOPPULLUPS BLTOUCH AUTO_BED_LEVELING_BILINEAR \
40 40
            Z_STEPPER_AUTO_ALIGN Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS Z_SAFE_HOMING
41
-           #TOUCH_UI_FTDI_EVE LCD_ALEPHOBJECTS_CLCD_UI OTHER_PIN_LAYOUT
42 41
 pins_set ramps/RAMPS X_MAX_PIN -1
43 42
 pins_set ramps/RAMPS Y_MAX_PIN -1
44
-exec_test $1 $2 "RADDS with ABL (Bilinear), Triple Z Axis, Z_STEPPER_AUTO_ALIGN" "$3"
43
+exec_test $1 $2 "RADDS with ABL (Bilinear), Triple Z Axis, Z_STEPPER_AUTO_ALIGN, E_DUAL_STEPPER_DRIVERS" "$3"
45 44
 
46 45
 #
47 46
 # Test SWITCHING_EXTRUDER

+ 1
- 1
buildroot/tests/LPC1768 Voir le fichier

@@ -16,7 +16,7 @@ set -e
16 16
 restore_configs
17 17
 opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB  SERIAL_PORT_3 3 \
18 18
         NEOPIXEL_TYPE NEO_GRB RGB_LED_R_PIN P2_12 RGB_LED_G_PIN P1_23 RGB_LED_B_PIN P1_22 RGB_LED_W_PIN P1_24
19
-opt_enable FYSETC_MINI_12864_2_1 SDSUPPORT SDCARD_READONLY SERIAL_PORT_2 RGBW_LED \
19
+opt_enable FYSETC_MINI_12864_2_1 SDSUPPORT SDCARD_READONLY SERIAL_PORT_2 RGBW_LED E_DUAL_STEPPER_DRIVERS \
20 20
            NEOPIXEL_LED NEOPIXEL_IS_SEQUENTIAL NEOPIXEL_STARTUP_TEST NEOPIXEL_BKGD_INDEX_FIRST NEOPIXEL_BKGD_INDEX_LAST NEOPIXEL_BKGD_COLOR NEOPIXEL_BKGD_ALWAYS_ON
21 21
 exec_test $1 $2 "ReARM EFB VIKI2, SDSUPPORT, 2 Serial ports (USB CDC + UART0), NeoPixel" "$3"
22 22
 

Chargement…
Annuler
Enregistrer