Skip to content

Commit

Permalink
Removed Hold Current from Configs as recommended by Kevin
Browse files Browse the repository at this point in the history
as mentioned in Klipper3d/klipper#4977
"Don't use hold_current."
  • Loading branch information
OXERY committed Jan 5, 2022
1 parent 4771b06 commit c5a54a7
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ sense_resistor: 0.056
stealthchop_threshold: 999999 # enable stealthChop
interpolate: True
run_current: .65 #0.8
hold_current: .15
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 20
#driver_TBL: 2
Expand Down Expand Up @@ -138,7 +137,6 @@ sense_resistor: 0.056
stealthchop_threshold: 999999 # enable stealthChop
interpolate: True
run_current: .65
hold_current: .25
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 20
#driver_TBL: 2
Expand Down Expand Up @@ -182,7 +180,6 @@ sense_resistor: 0.056
stealthchop_threshold: 999999 # enable stealthChop
interpolate: True
run_current: .33033
hold_current: .33033
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 20
#driver_TBL: 2
Expand Down Expand Up @@ -218,7 +215,6 @@ sense_resistor: 0.056
stealthchop_threshold: 999999 # enable stealthChop
interpolate: True
run_current: .33033
hold_current: .33033
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 20
#driver_TBL: 2
Expand Down Expand Up @@ -255,7 +251,6 @@ sense_resistor: 0.056
stealthchop_threshold: 999999 # enable stealthChop
interpolate: False
run_current: .50
hold_current: .2
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 20
#driver_TBL: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ homing_retract_dist: 0
cs_pin: x_uart_pin
interpolate: True
run_current: .3
hold_current: .3
sense_resistor: 0.220
diag1_pin: !x_diag_pin
driver_IHOLDDELAY: 8
Expand Down Expand Up @@ -79,7 +78,6 @@ homing_retract_dist: 0
cs_pin: y_uart_pin
interpolate: True
run_current: .35
hold_current: .35
sense_resistor: 0.220
diag1_pin: !y_diag_pin
driver_IHOLDDELAY: 8
Expand Down Expand Up @@ -113,7 +111,6 @@ homing_speed: 13.333
cs_pin: z0_uart_pin
interpolate: True
run_current: .53
hold_current: .53
sense_resistor: 0.220
diag1_pin: !z0_diag_pin
driver_IHOLDDELAY: 8
Expand Down Expand Up @@ -143,7 +140,6 @@ max_temp: 305
cs_pin: e_uart_pin
interpolate: True
run_current: .51
hold_current: .1
sense_resistor: 0.220
diag1_pin: !e_diag_pin
driver_IHOLDDELAY: 8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ sense_resistor: 0.110
#stealthchop_threshold: 999999 # enable stealthChop
interpolate: True
run_current: .65
hold_current: .25
driver_IHOLDDELAY: 8
driver_TPOWERDOWN: 20
driver_TBL: 2
Expand Down Expand Up @@ -101,7 +100,6 @@ sense_resistor: 0.110
#stealthchop_threshold: 999999 # enable stealthChop
interpolate: True
run_current: .65
hold_current: .25
driver_IHOLDDELAY: 8
driver_TPOWERDOWN: 20
driver_TBL: 2
Expand Down Expand Up @@ -137,7 +135,6 @@ sense_resistor: 0.110
stealthchop_threshold: 999999 # enable stealthChop
interpolate: True
run_current: .33033
hold_current: .33033
driver_IHOLDDELAY: 8
driver_TPOWERDOWN: 20
driver_TBL: 2
Expand Down Expand Up @@ -165,7 +162,6 @@ sense_resistor: 0.110
stealthchop_threshold: 999999 # enable stealthChop
interpolate: True
run_current: .33033
hold_current: .33033
driver_IHOLDDELAY: 8
driver_TPOWERDOWN: 20
driver_TBL: 2
Expand Down Expand Up @@ -193,7 +189,6 @@ sense_resistor: 0.110
stealthchop_threshold: 999999 # enable stealthChop
interpolate: False
run_current: .50
hold_current: .1
driver_IHOLDDELAY: 8
driver_TPOWERDOWN: 20
driver_TBL: 2
Expand All @@ -218,8 +213,6 @@ sensor_pin: heater_bed_sensor_pin
min_temp: 0
max_temp: 125



#####################################################################
# Z_Tilt adjusy X Gantry
#####################################################################
Expand Down Expand Up @@ -261,7 +254,6 @@ idle_speed: 0.3 # slow down when idling
pin: fan_toolhead_cooling_pin
max_power: 1.0


######################################################################
# Mini 12864Panel v2.1 (with neopixel backlight leds)
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ uart_pin: P1.10
diag_pin: P1.29
interpolate: true
run_current: 0.800
hold_current: 0.750
stealthchop_threshold: 1
sense_resistor: 0.110
driver_SGTHRS: 130
Expand All @@ -59,7 +58,6 @@ uart_pin: P1.9
diag_pin: P1.28
interpolate: true
run_current: 0.800
hold_current: 0.750
stealthchop_threshold: 250
sense_resistor: 0.110
driver_SGTHRS: 130
Expand All @@ -79,7 +77,6 @@ homing_speed: 10
uart_pin: P1.8
interpolate: true
run_current: 0.650
hold_current: 0.600
stealthchop_threshold: 1
sense_resistor: 0.110

Expand All @@ -94,7 +91,6 @@ rotation_distance: 8
uart_pin: P1.1
interpolate: true
run_current: 0.650
hold_current: 0.600
stealthchop_threshold: 15
sense_resistor: 0.110

Expand Down Expand Up @@ -125,7 +121,6 @@ pressure_advance: 0.03565
uart_pin: P1.4
interpolate: false #Interpolation does not improve extrusion
run_current: 0.750
hold_current: 0.700
#stealthchop_threshold: 5 #Disable stealthchop to decrease extruder temp and prevent skipping
sense_resistor: 0.110

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
[tmc2209 manual_stepper gear_stepper]
uart_pin: PE4
run_current: 0.800
hold_current: 0.200
interpolate: true
sense_resistor: 0.110
stealthchop_threshold: 999999
Expand All @@ -35,7 +34,6 @@ endstop_pin: PG12 #FINDA on MMU
uart_pin: PE1
diag_pin: PG14
run_current: 0.400 #800
hold_current: 0.200 #800
interpolate: true
sense_resistor: 0.110
#stealthchop_threshold: 999999
Expand All @@ -59,7 +57,6 @@ homing_retract_dist: 0
uart_pin: PD3
diag_pin: PG15
run_current: 0.400 #1000
hold_current: 0.200 #400
interpolate: true
sense_resistor: 0.110
stealthchop_threshold: 999999
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ uart_pin: mmu:PC11
tx_pin: mmu:PC10
uart_address: 3
run_current: 0.800
hold_current: 0.200
interpolate: true
sense_resistor: 0.110
stealthchop_threshold: 999999
Expand All @@ -51,7 +50,6 @@ tx_pin: mmu:PC10
diag_pin: ^mmu:PC1
uart_address: 2
run_current: 0.400 #800
hold_current: 0.200 #800
interpolate: true
sense_resistor: 0.110
stealthchop_threshold: 999999
Expand All @@ -77,7 +75,6 @@ tx_pin: mmu:PC10
diag_pin: ^mmu:PC0
uart_address: 0
run_current: 0.400 #1000
hold_current: 0.200 #400
interpolate: true
sense_resistor: 0.110
stealthchop_threshold: 999999
Expand Down
10 changes: 4 additions & 6 deletions Klipper_cfg/Prusa_Universal_Config_Revised/MMU/mmu2s_home.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,13 @@ gcode:
{% set HOME_CUR = 0.10 %}
{% set driver_config = printer.configfile.settings['tmc2209 manual_stepper idler_stepper'] %}
{% set RUN_CUR = driver_config.run_current %}
{% set HOLD_CUR = driver_config.hold_current %}
# There are two homes for X and Y to cover the case where we are already up
# against the end-stop. The sensorless homing doesn't work well unless the
# motor is in motion. So the first home, ensures we ARE up against the end-stop.
# Then we move a short distance away from the end-stop, assured we won't crash
# into anything because we're starting on the end-stop, and then do a second homing.
M118 Homing idler
SET_TMC_CURRENT STEPPER=idler_stepper CURRENT={HOME_CUR} HOLDCURRENT={HOME_CUR}
SET_TMC_CURRENT STEPPER=idler_stepper CURRENT={HOME_CUR}
_MMU_MANUAL_STEPPER STEPPER=idler_stepper SET_POSITION=0
_MMU_MANUAL_STEPPER STEPPER=idler_stepper MOVE=7
{% if printer["gcode_macro _VAR_MMU2S"].tmc2209_sensorless == 0 %}
Expand All @@ -94,7 +93,7 @@ gcode:
{% endif %}
_MMU_MANUAL_STEPPER STEPPER=idler_stepper SET_POSITION=2
_MMU_MANUAL_STEPPER STEPPER=idler_stepper MOVE={printer["gcode_macro _VAR_MMU2S"].idler_home_position}
SET_TMC_CURRENT STEPPER=idler_stepper CURRENT={RUN_CUR} HOLDCURRENT={HOLD_CUR}
SET_TMC_CURRENT STEPPER=idler_stepper CURRENT={RUN_CUR}

# Home selector
[gcode_macro HOME_SELECTOR]
Expand All @@ -103,14 +102,13 @@ gcode:
{% set HOME_CUR = 0.30 %}
{% set driver_config = printer.configfile.settings['tmc2209 manual_stepper selector_stepper'] %}
{% set RUN_CUR = driver_config.run_current %}
{% set HOLD_CUR = driver_config.hold_current %}
# There are two homes for X and Y to cover the case where we are already up
# against the end-stop. The sensorless homing doesn't work well unless the
# motor is in motion. So the first home, ensures we ARE up against the end-stop.
# Then we move a short distance away from the end-stop, assured we won't crash
# into anything because we're starting on the end-stop, and then do a second homing
M118 Homing selector
SET_TMC_CURRENT STEPPER=selector_stepper CURRENT={HOME_CUR} HOLDCURRENT={HOME_CUR}
SET_TMC_CURRENT STEPPER=selector_stepper CURRENT={HOME_CUR}
_MMU_MANUAL_STEPPER STEPPER=selector_stepper SET_POSITION=0
{% if printer["gcode_macro _VAR_MMU2S"].tmc2209_sensorless == 0 %}
_MMU_MANUAL_STEPPER STEPPER=selector_stepper MOVE=-76
Expand All @@ -119,5 +117,5 @@ gcode:
_MMU_MANUAL_STEPPER STEPPER=selector_stepper MOVE=-76 STOP_ON_ENDSTOP=1
{% endif %}
_MMU_MANUAL_STEPPER STEPPER=selector_stepper SET_POSITION=0
SET_TMC_CURRENT STEPPER=selector_stepper CURRENT={RUN_CUR} HOLDCURRENT={HOLD_CUR}
SET_TMC_CURRENT STEPPER=selector_stepper CURRENT={RUN_CUR}

14 changes: 6 additions & 8 deletions Klipper_cfg/Prusa_Universal_Config_Revised/Macros/homing.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,40 @@ gcode:
{% set driver_config = printer.configfile.settings['tmc2130 stepper_x'] %}
{% endif %}
{% set RUN_CUR = driver_config.run_current %}
{% set HOLD_CUR = driver_config.hold_current %}
# There are two homes for X and Y to cover the case where we are already up
# against the end-stop. The sensorless homing doesn't work well unless the
# motor is in motion. So the first home, ensures we ARE up against the end-stop.
# Then we move a short distance away from the end-stop, assured we won't crash
# into anything because we're starting on the end-stop, and then do a second homing.
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CUR} HOLDCURRENT={HOME_CUR}
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CUR}
G28 X ; Zero X
M400
G1 X10 F1000
M400
G28 X ; Home X
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CUR} HOLDCURRENT={HOLD_CUR}
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CUR}

[gcode_macro _SENSORLESS_HOME_Y]
gcode:
{% set HOME_CUR = 0.13 %}
{% if printer["gcode_macro _stepper_type"].tmc2209|int == 1 %}
{% set driver_config = printer.configfile.settings['tmc2209 stepper_x'] %}
{% set driver_config = printer.configfile.settings['tmc2209 stepper_y'] %}
{% else %}
{% set driver_config = printer.configfile.settings['tmc2130 stepper_x'] %}
{% set driver_config = printer.configfile.settings['tmc2130 stepper_y'] %}
{% endif %}
{% set RUN_CUR = driver_config.run_current %}
{% set HOLD_CUR = driver_config.hold_current %}
# There are two homes for X and Y to cover the case where we are already up
# against the end-stop. The sensorless homing doesn't work well unless the
# motor is in motion. So the first home, ensures we ARE up against the end-stop.
# Then we move a short distance away from the end-stop, assured we won't crash
# into anything because we're starting on the end-stop, and then do a second homing.
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CUR} HOLDCURRENT={HOME_CUR}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CUR}
G28 Y ; Zero Y
M400
G1 Y10 F1000
M400
G28 Y ; Home Y
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CUR} HOLDCURRENT={HOLD_CUR}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CUR}

[homing_override]
set_position_z:0 # Make printer think Z axis is at zero, so we can force a move upwards away from build plate
Expand Down
5 changes: 2 additions & 3 deletions Klipper_cfg/Prusa_Universal_Config_Revised/Macros/tram_z.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ gcode:
{% set driver_config = printer.configfile.settings['tmc2130 stepper_x'] %}
{% endif %}
{% set RUN_CUR = driver_config.run_current %}
{% set HOLD_CUR = driver_config.hold_current %}
G28
G1 X125 Y105 F2000
G1 Z208 F1000
SET_KINEMATIC_POSITION Z=203
SET_TMC_CURRENT STEPPER=stepper_z CURRENT={TRAM_CUR} HOLDCURRENT={TRAM_CUR}
SET_TMC_CURRENT STEPPER=stepper_z CURRENT={TRAM_CUR}
G1 Z208 F100
SET_TMC_CURRENT STEPPER=stepper_z CURRENT={RUN_CUR} HOLDCURRENT={HOLD_CUR}
SET_TMC_CURRENT STEPPER=stepper_z CURRENT={RUN_CUR}
G28 Z

0 comments on commit c5a54a7

Please sign in to comment.