From 333d802f2fe6108a3f03b12d540f68c20bc66c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= Date: Thu, 4 May 2023 11:50:33 +0200 Subject: [PATCH] Multi TMC support (#176) Co-authored-by: Surion79 <102791900+Surion79@users.noreply.github.com> --- config/hardware/axis/XY/0.9d_xy.cfg | 13 -- config/hardware/axis/XY/1.8d_xy.cfg | 13 -- config/hardware/axis/XY/TMC/xy_TMC2209.cfg | 19 +++ .../xy_TMC2209_V0specific.cfg} | 23 +--- config/hardware/axis/XY/default_wiring.cfg | 6 - .../hardware/axis/Z/TMC/z_TMC2209_1-Motor.cfg | 14 +++ .../axis/Z/TMC/z_TMC2209_3-Motors.cfg | 15 +++ .../axis/Z/TMC/z_TMC2209_4-Motors.cfg | 8 ++ config/hardware/axis/Z/TriZero_0.9d_z.cfg | 19 --- .../hardware/axis/Z/Trident_1.8d_TR8x4_z.cfg | 19 --- .../hardware/axis/Z/Trident_1.8d_TR8x8_z.cfg | 19 --- config/hardware/axis/Z/V0_1.8d_TR8x4_z.cfg | 6 - config/hardware/axis/Z/V0_1.8d_TR8x8_z.cfg | 6 - config/hardware/axis/Z/V2.4_1.8d_base_z.cfg | 29 ----- .../hardware/axis/Z/V2.4_1.8d_galileo_z.cfg | 29 ----- config/hardware/axis/Z/default_wiring_1M.cfg | 3 - config/hardware/axis/Z/default_wiring_3M.cfg | 6 - config/hardware/axis/Z/default_wiring_4M.cfg | 3 - config/hardware/extruder/TMC/e_TMC2209.cfg | 12 ++ config/hardware/extruder/TMC/e_TMC2240.cfg | 34 ++++++ config/hardware/extruder/cw1.cfg | 6 - config/hardware/extruder/cw2.cfg | 6 - config/hardware/extruder/default_wiring.cfg | 3 - config/hardware/extruder/galileo.cfg | 6 - config/hardware/extruder/lgx_heavy.cfg | 6 - config/hardware/extruder/lgx_lite.cfg | 6 - user_templates/printer.cfg | 111 +++++++++++++----- 27 files changed, 188 insertions(+), 252 deletions(-) create mode 100644 config/hardware/axis/XY/TMC/xy_TMC2209.cfg rename config/hardware/axis/XY/{1.8d_xy_V0specific.cfg => TMC/xy_TMC2209_V0specific.cfg} (52%) create mode 100644 config/hardware/axis/Z/TMC/z_TMC2209_1-Motor.cfg create mode 100644 config/hardware/axis/Z/TMC/z_TMC2209_3-Motors.cfg create mode 100644 config/hardware/axis/Z/TMC/z_TMC2209_4-Motors.cfg create mode 100644 config/hardware/extruder/TMC/e_TMC2209.cfg create mode 100644 config/hardware/extruder/TMC/e_TMC2240.cfg diff --git a/config/hardware/axis/XY/0.9d_xy.cfg b/config/hardware/axis/XY/0.9d_xy.cfg index 69ee25696..40517c889 100644 --- a/config/hardware/axis/XY/0.9d_xy.cfg +++ b/config/hardware/axis/XY/0.9d_xy.cfg @@ -3,24 +3,11 @@ rotation_distance: 40 microsteps: 64 full_steps_per_rotation: 400 -[tmc2209 stepper_x] -interpolate: False -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 - [stepper_y] rotation_distance: 40 microsteps: 64 full_steps_per_rotation: 400 -[tmc2209 stepper_y] -interpolate: False -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 - - # We also include the default wiring and speeds from here to avoid duplicating [include default_wiring.cfg] [include default_speed.cfg] diff --git a/config/hardware/axis/XY/1.8d_xy.cfg b/config/hardware/axis/XY/1.8d_xy.cfg index b4c2fa157..82e98670b 100644 --- a/config/hardware/axis/XY/1.8d_xy.cfg +++ b/config/hardware/axis/XY/1.8d_xy.cfg @@ -3,24 +3,11 @@ rotation_distance: 40 microsteps: 64 full_steps_per_rotation: 200 -[tmc2209 stepper_x] -interpolate: False -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 - [stepper_y] rotation_distance: 40 microsteps: 64 full_steps_per_rotation: 200 -[tmc2209 stepper_y] -interpolate: False -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 - - # We also include the default wiring and speeds from here to avoid duplicating [include default_wiring.cfg] [include default_speed.cfg] diff --git a/config/hardware/axis/XY/TMC/xy_TMC2209.cfg b/config/hardware/axis/XY/TMC/xy_TMC2209.cfg new file mode 100644 index 000000000..4cff95c2a --- /dev/null +++ b/config/hardware/axis/XY/TMC/xy_TMC2209.cfg @@ -0,0 +1,19 @@ +# XY TMC2209 definition +[gcode_macro _USER_VARIABLES] +variable_xytmc_driver: "TMC2209" +gcode: + + +[tmc2209 stepper_x] +uart_pin: X_TMCUART +interpolate: False +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +[tmc2209 stepper_y] +uart_pin: Y_TMCUART +interpolate: False +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/XY/1.8d_xy_V0specific.cfg b/config/hardware/axis/XY/TMC/xy_TMC2209_V0specific.cfg similarity index 52% rename from config/hardware/axis/XY/1.8d_xy_V0specific.cfg rename to config/hardware/axis/XY/TMC/xy_TMC2209_V0specific.cfg index ee275a5fc..c357c2592 100644 --- a/config/hardware/axis/XY/1.8d_xy_V0specific.cfg +++ b/config/hardware/axis/XY/TMC/xy_TMC2209_V0specific.cfg @@ -1,12 +1,11 @@ -[stepper_x] -rotation_distance: 40 -microsteps: 64 -full_steps_per_rotation: 200 +# XY TMC2209 definition +# Including first the default XY TMC2209 file +[include xy_TMC2209.cfg] + +# Then applying overrides for specific V0 parameters from LDO to reduce VFAs [tmc2209 stepper_x] -interpolate: False run_current: 0.7 -sense_resistor: 0.110 # stealthchop_threshold: 999999 driver_TBL: 2 driver_TOFF: 2 @@ -17,15 +16,8 @@ driver_PWM_GRAD: 8 driver_PWM_FREQ: 1 driver_PWM_REG: 4 -[stepper_y] -rotation_distance: 40 -microsteps: 64 -full_steps_per_rotation: 200 - [tmc2209 stepper_y] -interpolate: False run_current: 0.7 -sense_resistor: 0.110 # stealthchop_threshold: 999999 driver_TBL: 2 driver_TOFF: 2 @@ -35,8 +27,3 @@ driver_PWM_LIM: 8 driver_PWM_GRAD: 8 driver_PWM_FREQ: 1 driver_PWM_REG: 4 - - -# We also include the default wiring and speeds from here to avoid duplicating -[include default_wiring.cfg] -[include default_speed.cfg] diff --git a/config/hardware/axis/XY/default_wiring.cfg b/config/hardware/axis/XY/default_wiring.cfg index 4c9b1bf4e..cd3b08dc1 100644 --- a/config/hardware/axis/XY/default_wiring.cfg +++ b/config/hardware/axis/XY/default_wiring.cfg @@ -4,14 +4,8 @@ dir_pin: X_DIR enable_pin: !X_ENABLE endstop_pin: X_STOP -[tmc2209 stepper_x] -uart_pin: X_TMCUART - [stepper_y] step_pin: Y_STEP dir_pin: Y_DIR enable_pin: !Y_ENABLE endstop_pin: Y_STOP - -[tmc2209 stepper_y] -uart_pin: Y_TMCUART diff --git a/config/hardware/axis/Z/TMC/z_TMC2209_1-Motor.cfg b/config/hardware/axis/Z/TMC/z_TMC2209_1-Motor.cfg new file mode 100644 index 000000000..a198028a7 --- /dev/null +++ b/config/hardware/axis/Z/TMC/z_TMC2209_1-Motor.cfg @@ -0,0 +1,14 @@ +# Z TMC2209 definition + +# User variable only needed here as they are called recursively +[gcode_macro _USER_VARIABLES] +variable_ztmc_driver: "TMC2209" +gcode: + + +[tmc2209 stepper_z] +uart_pin: Z_TMCUART +interpolate: False +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/Z/TMC/z_TMC2209_3-Motors.cfg b/config/hardware/axis/Z/TMC/z_TMC2209_3-Motors.cfg new file mode 100644 index 000000000..678666c9a --- /dev/null +++ b/config/hardware/axis/Z/TMC/z_TMC2209_3-Motors.cfg @@ -0,0 +1,15 @@ +[include z_TMC2209_1-Motor.cfg] + +[tmc2209 stepper_z1] +uart_pin: Z1_TMCUART +interpolate: False +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +[tmc2209 stepper_z2] +uart_pin: Z2_TMCUART +interpolate: False +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/Z/TMC/z_TMC2209_4-Motors.cfg b/config/hardware/axis/Z/TMC/z_TMC2209_4-Motors.cfg new file mode 100644 index 000000000..49d764e29 --- /dev/null +++ b/config/hardware/axis/Z/TMC/z_TMC2209_4-Motors.cfg @@ -0,0 +1,8 @@ +[include z_TMC2209_3-Motors.cfg] + +[tmc2209 stepper_z3] +uart_pin: Z3_TMCUART +interpolate: False +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/Z/TriZero_0.9d_z.cfg b/config/hardware/axis/Z/TriZero_0.9d_z.cfg index 1b4cb7a61..ec50c3aea 100644 --- a/config/hardware/axis/Z/TriZero_0.9d_z.cfg +++ b/config/hardware/axis/Z/TriZero_0.9d_z.cfg @@ -3,35 +3,16 @@ rotation_distance: 32 microsteps: 32 full_steps_per_rotation: 400 -[tmc2209 stepper_z] -interpolate: False -run_current: 0.6 -sense_resistor: 0.110 -# stealthchop_threshold: 999999 - [stepper_z1] rotation_distance: 32 microsteps: 32 full_steps_per_rotation: 400 -[tmc2209 stepper_z1] -interpolate: False -run_current: 0.6 -sense_resistor: 0.110 -# stealthchop_threshold: 999999 - [stepper_z2] rotation_distance: 32 microsteps: 32 full_steps_per_rotation: 400 -[tmc2209 stepper_z2] -interpolate: False -run_current: 0.6 -sense_resistor: 0.110 -# stealthchop_threshold: 999999 - - # We also include the default wiring and speeds from here to avoid duplicating [include default_wiring_3M.cfg] [include default_speed.cfg] diff --git a/config/hardware/axis/Z/Trident_1.8d_TR8x4_z.cfg b/config/hardware/axis/Z/Trident_1.8d_TR8x4_z.cfg index dbb1ca223..f0a281df4 100644 --- a/config/hardware/axis/Z/Trident_1.8d_TR8x4_z.cfg +++ b/config/hardware/axis/Z/Trident_1.8d_TR8x4_z.cfg @@ -3,35 +3,16 @@ rotation_distance: 4 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z] -interpolate: False -run_current: 0.6 -sense_resistor: 0.110 -stealthchop_threshold: 0 - [stepper_z1] rotation_distance: 4 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z1] -interpolate: False -run_current: 0.6 -sense_resistor: 0.110 -stealthchop_threshold: 0 - [stepper_z2] rotation_distance: 4 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z2] -interpolate: False -run_current: 0.6 -sense_resistor: 0.110 -stealthchop_threshold: 0 - - # We also include the default wiring and speeds from here to avoid duplicating [include default_wiring_3M.cfg] [include default_speed.cfg] diff --git a/config/hardware/axis/Z/Trident_1.8d_TR8x8_z.cfg b/config/hardware/axis/Z/Trident_1.8d_TR8x8_z.cfg index e874aa429..f69cedfac 100644 --- a/config/hardware/axis/Z/Trident_1.8d_TR8x8_z.cfg +++ b/config/hardware/axis/Z/Trident_1.8d_TR8x8_z.cfg @@ -3,35 +3,16 @@ rotation_distance: 8 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z] -interpolate: False -run_current: 0.6 -sense_resistor: 0.110 -stealthchop_threshold: 0 - [stepper_z1] rotation_distance: 8 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z1] -interpolate: False -run_current: 0.6 -sense_resistor: 0.110 -stealthchop_threshold: 0 - [stepper_z2] rotation_distance: 8 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z2] -interpolate: False -run_current: 0.6 -sense_resistor: 0.110 -stealthchop_threshold: 0 - - # We also include the default wiring and speeds from here to avoid duplicating [include default_wiring_3M.cfg] [include default_speed.cfg] diff --git a/config/hardware/axis/Z/V0_1.8d_TR8x4_z.cfg b/config/hardware/axis/Z/V0_1.8d_TR8x4_z.cfg index a2f3fced9..37d47340e 100644 --- a/config/hardware/axis/Z/V0_1.8d_TR8x4_z.cfg +++ b/config/hardware/axis/Z/V0_1.8d_TR8x4_z.cfg @@ -3,12 +3,6 @@ rotation_distance: 4 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z] -interpolate: False -run_current: 0.2 -sense_resistor: 0.110 -# stealthchop_threshold: 999999 - # We also include the default wiring and speeds from here to avoid duplicating [include default_wiring_1M.cfg] [include default_speed.cfg] diff --git a/config/hardware/axis/Z/V0_1.8d_TR8x8_z.cfg b/config/hardware/axis/Z/V0_1.8d_TR8x8_z.cfg index 47b04c208..85aeab854 100644 --- a/config/hardware/axis/Z/V0_1.8d_TR8x8_z.cfg +++ b/config/hardware/axis/Z/V0_1.8d_TR8x8_z.cfg @@ -3,12 +3,6 @@ rotation_distance: 8 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z] -interpolate: False -run_current: 0.2 -sense_resistor: 0.110 -# stealthchop_threshold: 999999 - # We also include the default wiring and speeds from here to avoid duplicating [include default_wiring_1M.cfg] [include default_speed.cfg] diff --git a/config/hardware/axis/Z/V2.4_1.8d_base_z.cfg b/config/hardware/axis/Z/V2.4_1.8d_base_z.cfg index 709ad3eea..6ed5f66be 100644 --- a/config/hardware/axis/Z/V2.4_1.8d_base_z.cfg +++ b/config/hardware/axis/Z/V2.4_1.8d_base_z.cfg @@ -4,53 +4,24 @@ gear_ratio: 80:16 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z] -interpolate: False -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 -# stealthchop_threshold: 99999 - [stepper_z1] rotation_distance: 40 gear_ratio: 80:16 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z1] -interpolate: False -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 -# stealthchop_threshold: 99999 - [stepper_z2] rotation_distance: 40 gear_ratio: 80:16 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z2] -interpolate: False -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 -# stealthchop_threshold: 99999 - [stepper_z3] rotation_distance: 40 gear_ratio: 80:16 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z3] -interpolate: False -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 -# stealthchop_threshold: 99999 - - # We also include the default wiring and speeds from here to avoid duplicating [include default_wiring_4M.cfg] [include default_speed.cfg] diff --git a/config/hardware/axis/Z/V2.4_1.8d_galileo_z.cfg b/config/hardware/axis/Z/V2.4_1.8d_galileo_z.cfg index 2461479c7..4bbebbbbd 100644 --- a/config/hardware/axis/Z/V2.4_1.8d_galileo_z.cfg +++ b/config/hardware/axis/Z/V2.4_1.8d_galileo_z.cfg @@ -4,53 +4,24 @@ gear_ratio: 6:1 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z] -interpolate: False -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 -# stealthchop_threshold: 99999 - [stepper_z1] rotation_distance: 40 gear_ratio: 6:1 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z1] -interpolate: False -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 -# stealthchop_threshold: 99999 - [stepper_z2] rotation_distance: 40 gear_ratio: 6:1 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z2] -interpolate: False -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 -# stealthchop_threshold: 99999 - [stepper_z3] rotation_distance: 40 gear_ratio: 6:1 microsteps: 32 full_steps_per_rotation: 200 -[tmc2209 stepper_z3] -interpolate: False -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 -# stealthchop_threshold: 99999 - - # We also include the default wiring and speeds from here to avoid duplicating [include default_wiring_4M.cfg] [include default_speed.cfg] diff --git a/config/hardware/axis/Z/default_wiring_1M.cfg b/config/hardware/axis/Z/default_wiring_1M.cfg index 75aba2594..9e9d5071a 100644 --- a/config/hardware/axis/Z/default_wiring_1M.cfg +++ b/config/hardware/axis/Z/default_wiring_1M.cfg @@ -3,6 +3,3 @@ step_pin: Z_STEP dir_pin: Z_DIR enable_pin: !Z_ENABLE endstop_pin: Z_STOP - -[tmc2209 stepper_z] -uart_pin: Z_TMCUART diff --git a/config/hardware/axis/Z/default_wiring_3M.cfg b/config/hardware/axis/Z/default_wiring_3M.cfg index cd3c1e68b..aed66bd09 100644 --- a/config/hardware/axis/Z/default_wiring_3M.cfg +++ b/config/hardware/axis/Z/default_wiring_3M.cfg @@ -7,13 +7,7 @@ step_pin: Z1_STEP dir_pin: Z1_DIR enable_pin: !Z1_ENABLE -[tmc2209 stepper_z1] -uart_pin: Z1_TMCUART - [stepper_z2] step_pin: Z2_STEP dir_pin: Z2_DIR enable_pin: !Z2_ENABLE - -[tmc2209 stepper_z2] -uart_pin: Z2_TMCUART diff --git a/config/hardware/axis/Z/default_wiring_4M.cfg b/config/hardware/axis/Z/default_wiring_4M.cfg index 1b1805cef..7c54b94fc 100644 --- a/config/hardware/axis/Z/default_wiring_4M.cfg +++ b/config/hardware/axis/Z/default_wiring_4M.cfg @@ -6,6 +6,3 @@ step_pin: Z3_STEP dir_pin: Z3_DIR enable_pin: !Z3_ENABLE - -[tmc2209 stepper_z3] -uart_pin: Z3_TMCUART diff --git a/config/hardware/extruder/TMC/e_TMC2209.cfg b/config/hardware/extruder/TMC/e_TMC2209.cfg new file mode 100644 index 000000000..8169ae3f3 --- /dev/null +++ b/config/hardware/extruder/TMC/e_TMC2209.cfg @@ -0,0 +1,12 @@ +# Extruder TMC2209 definition +[gcode_macro _USER_VARIABLES] +variable_etmc_driver: "TMC2209" +gcode: + + +[tmc2209 extruder] +uart_pin: E_TMCUART +interpolate: false +run_current: 0.45 +sense_resistor: 0.110 +stealthchop_threshold: 0 diff --git a/config/hardware/extruder/TMC/e_TMC2240.cfg b/config/hardware/extruder/TMC/e_TMC2240.cfg new file mode 100644 index 000000000..75573b061 --- /dev/null +++ b/config/hardware/extruder/TMC/e_TMC2240.cfg @@ -0,0 +1,34 @@ +# Extruder TMC2240 definition +[gcode_macro _USER_VARIABLES] +variable_etmc_driver: "TMC2240" +gcode: + + +## Based upon the settings provided by Esoterical +## https://github.com/Esoterical/voron_canbus/blob/main/toolhead_flashing/common_hardware/BigTreeTech%20SB2209%20and%20SB2240/SB2240%20Stepper%20Configuration%20and%20Undervoltage.md +[tmc2240 extruder] +cs_pin: E_CS +spi_speed: 500000 +spi_software_sclk_pin: E_SCLK +spi_software_mosi_pin: E_MOSI +spi_software_miso_pin: E_MISO +interpolate: False +run_current: 0.6 +rref: 12000 +stealthchop_threshold: 99999 +driver_IHOLDDELAY: 8 +driver_IRUNDELAY: 2 +driver_TBL: 3 +driver_TOFF: 4 +driver_HEND: 3 +driver_HSTRT: 4 +driver_TPFD: 0 +driver_PWM_AUTOSCALE: True +driver_PWM_AUTOGRAD: True +driver_PWM_GRAD: 12 +driver_PWM_OFS: 40 +driver_PWM_REG: 15 +driver_PWM_LIM: 12 +driver_SGT: 30 +driver_SEMIN: 2 +driver_SEMAX: 8 diff --git a/config/hardware/extruder/cw1.cfg b/config/hardware/extruder/cw1.cfg index 812f8723e..1f8ea1cac 100644 --- a/config/hardware/extruder/cw1.cfg +++ b/config/hardware/extruder/cw1.cfg @@ -18,11 +18,5 @@ min_extrude_temp: 172 pressure_advance: 0.0475 pressure_advance_smooth_time: 0.040 -[tmc2209 extruder] -interpolate: false -run_current: 0.4 -sense_resistor: 0.110 -stealthchop_threshold: 0 - # We also include the default wiring from here to avoid duplicating [include default_wiring.cfg] diff --git a/config/hardware/extruder/cw2.cfg b/config/hardware/extruder/cw2.cfg index 9d4d8d22b..7ca397154 100644 --- a/config/hardware/extruder/cw2.cfg +++ b/config/hardware/extruder/cw2.cfg @@ -18,11 +18,5 @@ min_extrude_temp: 172 pressure_advance: 0.0475 pressure_advance_smooth_time: 0.040 -[tmc2209 extruder] -interpolate: false -run_current: 0.45 -sense_resistor: 0.110 -stealthchop_threshold: 0 - # We also include the default wiring from here to avoid duplicating [include default_wiring.cfg] diff --git a/config/hardware/extruder/default_wiring.cfg b/config/hardware/extruder/default_wiring.cfg index 88fda2da3..1de50e96d 100644 --- a/config/hardware/extruder/default_wiring.cfg +++ b/config/hardware/extruder/default_wiring.cfg @@ -4,6 +4,3 @@ dir_pin: E_DIR enable_pin: !E_ENABLE heater_pin: E_HEATER sensor_pin: E_TEMPERATURE - -[tmc2209 extruder] -uart_pin: E_TMCUART diff --git a/config/hardware/extruder/galileo.cfg b/config/hardware/extruder/galileo.cfg index 8044a55f4..552b5a178 100644 --- a/config/hardware/extruder/galileo.cfg +++ b/config/hardware/extruder/galileo.cfg @@ -18,11 +18,5 @@ min_extrude_temp: 172 pressure_advance: 0.0475 pressure_advance_smooth_time: 0.040 -[tmc2209 extruder] -interpolate: false -run_current: 0.45 -sense_resistor: 0.110 -stealthchop_threshold: 0 - # We also include the default wiring from here to avoid duplicating [include default_wiring.cfg] diff --git a/config/hardware/extruder/lgx_heavy.cfg b/config/hardware/extruder/lgx_heavy.cfg index ca683d8b6..aab91572b 100644 --- a/config/hardware/extruder/lgx_heavy.cfg +++ b/config/hardware/extruder/lgx_heavy.cfg @@ -18,11 +18,5 @@ min_extrude_temp: 172 pressure_advance: 0.0475 pressure_advance_smooth_time: 0.040 -[tmc2209 extruder] -interpolate: false -run_current: 0.4 -sense_resistor: 0.110 -stealthchop_threshold: 0 - # We also include the default wiring from here to avoid duplicating [include default_wiring.cfg] diff --git a/config/hardware/extruder/lgx_lite.cfg b/config/hardware/extruder/lgx_lite.cfg index 674fa9d06..697e72fe4 100644 --- a/config/hardware/extruder/lgx_lite.cfg +++ b/config/hardware/extruder/lgx_lite.cfg @@ -18,11 +18,5 @@ min_extrude_temp: 172 pressure_advance: 0.0475 pressure_advance_smooth_time: 0.040 -[tmc2209 extruder] -interpolate: false -run_current: 0.45 -sense_resistor: 0.110 -stealthchop_threshold: 0 - # We also include the default wiring from here to avoid duplicating [include default_wiring.cfg] diff --git a/user_templates/printer.cfg b/user_templates/printer.cfg index 9f1a2ac21..4365ed554 100644 --- a/user_templates/printer.cfg +++ b/user_templates/printer.cfg @@ -8,18 +8,25 @@ # and it will be kept as you've set it. + #-------------------------# # HARDWARE COMPONENTS # #-------------------------# -##### XY axis motors configuration ----------------------------------- + +# ------------------------------------------------------- XY AXIS ---- +### 1. Motors configuration ------------------------------------------ # [include config/hardware/axis/XY/1.8d_xy.cfg] # [include config/hardware/axis/XY/0.9d_xy.cfg] -# [include config/hardware/axis/XY/1.8d_xy_V0specific.cfg] +### 2. TMCs drivers configuration ------------------------------------ +# [include config/hardware/axis/XY/TMC/xy_TMC2209.cfg] +# [include config/hardware/axis/XY/TMC/xy_TMC2209_V0specific.cfg] # -------------------------------------------------------------------- -##### Z axis motors configuration ----------------------------------- + +# -------------------------------------------------------- Z AXIS ---- +### 1. Motors configuration ------------------------------------------ # [include config/hardware/axis/Z/V2.4_1.8d_base_z.cfg] # [include config/hardware/axis/Z/V2.4_1.8d_galileo_z.cfg] @@ -29,9 +36,16 @@ # [include config/hardware/axis/Z/V0_1.8d_TR8x8_z.cfg] # [include config/hardware/axis/Z/V0_1.8d_TR8x4_z.cfg] # [include config/hardware/axis/Z/TriZero_0.9d_z.cfg] + +### 2. TMCs drivers configuration ------------------------------------ +# [include config/hardware/axis/Z/TMC/z_TMC2209_1-Motor.cfg +# [include config/hardware/axis/Z/TMC/z_TMC2209_3-Motors.cfg +# [include config/hardware/axis/Z/TMC/z_TMC2209_4-Motors.cfg # -------------------------------------------------------------------- -##### Dimensions configuration --------------------------------------- + +# -------------------------------------------- PRINTER DIMENSIONS ---- +### ------------------------------------------------------------------ # [include config/hardware/axis/default_120mm.cfg] # [include config/hardware/axis/default_250mm.cfg] # [include config/hardware/axis/default_300mm.cfg] @@ -41,43 +55,58 @@ ### instead. These defaults are only made for common machines sizes # -------------------------------------------------------------------- -##### Extruder configuration ----------------------------------------- + +# ------------------------------------------------------ EXTRUDER ---- +### 1. Motors configuration ------------------------------------------ # [include config/hardware/extruder/cw1.cfg] # [include config/hardware/extruder/cw2.cfg] # [include config/hardware/extruder/galileo.cfg] # [include config/hardware/extruder/lgx_heavy.cfg] # [include config/hardware/extruder/lgx_lite.cfg] + +### 2. TMCs drivers configuration ------------------------------------ +# [include config/hardware/extruder/TMC/e_TMC2209.cfg] +# [include config/hardware/extruder/TMC/e_TMC2240.cfg] # -------------------------------------------------------------------- -##### Heated bed configuration --------------------------------------- + +# ---------------------------------------------------- HEATED BED ---- +### ------------------------------------------------------------------ # [include config/hardware/heated_bed.cfg] # -------------------------------------------------------------------- -##### Probe configuration -------------------------------------------- + +# --------------------------------------------------------- PROBE ---- +### ------------------------------------------------------------------ # [include config/hardware/probes/no_probe.cfg] # For a Voron V0 printer or equivalent that have no probes # [include config/hardware/probes/inductive_probe.cfg] # [include config/hardware/probes/dockable_probe.cfg] # For a Klicky, Euclid, or equivalent probe type # [include config/hardware/probes/tap_probe.cfg] # For the Voron TAP, also used as a virtual endstop # -------------------------------------------------------------------- -##### Fans configuration --------------------------------------------- + +# ---------------------------------------------------------- FANS ---- +### ------------------------------------------------------------------ # [include config/hardware/fans/hotend_fan.cfg] # [include config/hardware/fans/part_fan.cfg] # [include config/hardware/fans/controller_fan.cfg] # [include config/hardware/fans/rpi_fan.cfg] # -------------------------------------------------------------------- -##### Servos configuration -------------------------------------------- + +# -------------------------------------------------------- SERVOS ---- +### ------------------------------------------------------------------ # [include config/hardware/servos/probe_servo.cfg] # [include config/hardware/servos/purgeclean_servo.cfg] # [include config/hardware/servos/shared_probepurge_servo.cfg] # If one servo is used for both probe dock and purge bucket # -------------------------------------------------------------------- -##### Display configuration ------------------------------------------ + +# ------------------------------------------------------- DISPLAY ---- +### ------------------------------------------------------------------ ### If using a display and an MCU board from the same brand (ie. a BTT display ### on a BTT board, or a Fysetc display on a Fysetc board), please use the file ### that correspond to your display brand in the following lines: - # [include config/hardware/displays/BTT_mini12864.cfg] # [include config/hardware/displays/Fysetc_mini12864.cfg] @@ -85,12 +114,13 @@ ### the brands (ie. a BTT display on a Fysetc board, or the opposite), please use the file ### that correspond to your display brand in the following lines. Also you may have to ### rotate connectors 180 degree according to this documentation: https://docs.vorondesign.com/build/electrical/mini12864_klipper_guide.html - # [include config/hardware/displays/BTT_mini12864_inversed.cfg] # [include config/hardware/displays/Fysetc_mini12864_inversed.cfg] # -------------------------------------------------------------------- -##### Other temperature sensors configuration ------------------------ + +# ------------------------------------------- TEMPERATURE SENSORS ---- +### ------------------------------------------------------------------ # [include config/hardware/temperature_sensors/rpi_temp.cfg] # [include config/hardware/temperature_sensors/mcu_temp.cfg] # [include config/hardware/temperature_sensors/toolhead_mcu_temp.cfg] @@ -99,18 +129,24 @@ # [include config/hardware/temperature_sensors/chamber_temp_toolhead.cfg] # This is not recommended as toolhead board temperature sensors are not accurate # -------------------------------------------------------------------- -##### Lights and leds configuration ---------------------------------- + +# ----------------------------------------------- LIGHTS AND LEDS ---- +### ------------------------------------------------------------------ # [include config/hardware/lights/fcob_white.cfg] # [include config/hardware/lights/neopixel_caselight.cfg] # [include config/hardware/lights/status_leds.cfg] # -------------------------------------------------------------------- -##### Filaments sensors configuration -------------------------------- + +# ---------------------------------------------- FILAMENT SENSORS ---- +### ------------------------------------------------------------------ # [include config/hardware/filament_sensors/motion_sensor.cfg] # [include config/hardware/filament_sensors/runout_sensor.cfg] #TODO: create file # -------------------------------------------------------------------- -##### Accelerometers sensors configuration --------------------------- + +# ------------------------------------------------- ACCELEROMETER ---- +### ------------------------------------------------------------------ # [include config/hardware/accelerometers/adxl345_rpi.cfg] # [include config/hardware/accelerometers/adxl345_ebb.cfg] # [include config/hardware/accelerometers/adxl345_sht.cfg] @@ -119,46 +155,60 @@ # [include config/hardware/accelerometers/adxl345_usb.cfg] # -------------------------------------------------------------------- -##### Additional filters configuration ------------------------------- + +# ------------------------------------------------------- FILTERS ---- +### ------------------------------------------------------------------ # [include config/hardware/filters/exhaust_filter.cfg] # [include config/hardware/filters/nevermore_filter.cfg] # -------------------------------------------------------------------- -##### Additional filters configuration ------------------------------- + +# ---------------------------------------------------------- ERCF ---- +### ------------------------------------------------------------------ # [include config/hardware/ercf.cfg] # -------------------------------------------------------------------- + #---------------------------------# # KLIPPER SOFTWARE COMPONENTS # #---------------------------------# -##### Bed mesh ------------------------------------------------------ +# ------------------------------------------------------ BED MESH ---- +### ------------------------------------------------------------------ # [include config/software/bed_mesh/bed_mesh_250mm.cfg] # [include config/software/bed_mesh/bed_mesh_300mm.cfg] # [include config/software/bed_mesh/bed_mesh_350mm.cfg] ### If you need to specify a bed mesh configuration for a custom sized printer, use your ### overrides.cfg file instead. These defaults are only made for common machines sizes -# ------------------------------------------------------------------- +# -------------------------------------------------------------------- -##### Sensorless homing --------------------------------------------- + +# --------------------------------------------- SENSORLESS HOMING ---- +### ------------------------------------------------------------------ # [include config/software/sensorless_homing.cfg] ### Follow the Klipper documentation here: https://www.klipper3d.org/TMC_Drivers.html#sensorless-homing ### to find the best suited SGTHRS value according to your machine. Then add this value to your ### overrides.cfg as stated in the config/software/sensorless_homing.cfg file! -# ------------------------------------------------------------------- +# -------------------------------------------------------------------- -##### Firmware retraction ------------------------------------------- + +# ------------------------------------------- FIRMWARE RETRACTION ---- +### ------------------------------------------------------------------ # [include config/software/firmware_rectraction.cfg] -# ------------------------------------------------------------------- +# -------------------------------------------------------------------- -##### Input shaper -------------------------------------------------- + +# -------------------------------------------------- INPUT SHAPER ---- +### ------------------------------------------------------------------ # [include config/software/input_shaper.cfg] # Don't forget to calibrate it! -# ------------------------------------------------------------------- +# -------------------------------------------------------------------- -##### QGL vs Z_TILT configuration ----------------------------------- + +# ------------------------------------------------------- TILTING ---- +### ------------------------------------------------------------------ # [include config/software/tilting/qgl_250mm.cfg] # [include config/software/tilting/qgl_300mm.cfg] # [include config/software/tilting/qgl_350mm.cfg] @@ -171,11 +221,12 @@ ### If you need to specify a tilting configuration for a custom sized printer, use your ### overrides.cfg file instead. These defaults are only made for common machines sizes -# ------------------------------------------------------------------- +# -------------------------------------------------------------------- -##### Auto Z calibration plugin ------------------------------------- + +# -------------------------------------------- AUTO Z CALIBRATION ---- # [include config/software/z_calibration.cfg] # You need to install the plugin! -# ------------------------------------------------------------------- +# --------------------------------------------------------------------