Skip to content

Commit

Permalink
Multi TMC support (#176)
Browse files Browse the repository at this point in the history
Co-authored-by: Surion79 <102791900+Surion79@users.noreply.github.com>
  • Loading branch information
Frix-x and Surion79 authored May 4, 2023
1 parent 9068790 commit 333d802
Show file tree
Hide file tree
Showing 27 changed files with 188 additions and 252 deletions.
13 changes: 0 additions & 13 deletions config/hardware/axis/XY/0.9d_xy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
13 changes: 0 additions & 13 deletions config/hardware/axis/XY/1.8d_xy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
19 changes: 19 additions & 0 deletions config/hardware/axis/XY/TMC/xy_TMC2209.cfg
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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]
6 changes: 0 additions & 6 deletions config/hardware/axis/XY/default_wiring.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 14 additions & 0 deletions config/hardware/axis/Z/TMC/z_TMC2209_1-Motor.cfg
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions config/hardware/axis/Z/TMC/z_TMC2209_3-Motors.cfg
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions config/hardware/axis/Z/TMC/z_TMC2209_4-Motors.cfg
Original file line number Diff line number Diff line change
@@ -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
19 changes: 0 additions & 19 deletions config/hardware/axis/Z/TriZero_0.9d_z.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
19 changes: 0 additions & 19 deletions config/hardware/axis/Z/Trident_1.8d_TR8x4_z.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
19 changes: 0 additions & 19 deletions config/hardware/axis/Z/Trident_1.8d_TR8x8_z.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
6 changes: 0 additions & 6 deletions config/hardware/axis/Z/V0_1.8d_TR8x4_z.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
6 changes: 0 additions & 6 deletions config/hardware/axis/Z/V0_1.8d_TR8x8_z.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
29 changes: 0 additions & 29 deletions config/hardware/axis/Z/V2.4_1.8d_base_z.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Loading

0 comments on commit 333d802

Please sign in to comment.