Open seanmccully opened 1 year ago
Do you use the Voron-standard sensorless homing macro, or something like it, that reduces current while homing?
e.g. (working example, but note it's for 2240, change the driver type):
[gcode_macro _HOME_X]
gcode:
# Always use consistent run_current on A/B steppers during sensorless homing
{% set RUN_CURRENT_X = printer.configfile.settings['tmc2240 stepper_x'].run_current|float %}
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc2240 stepper_y'].run_current|float %}
{% set HOME_CURRENT = 0.4 %}
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
# dump_tmc stepper=stepper_x
# Home
G28 X
# Move away
G91
G1 X-10 F1200
G90
# Wait just a second… (give StallGuard registers time to clear)
G4 P1000
# Set current during print
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
[gcode_macro _HOME_Y]
gcode:
# Set current for sensorless homing
{% set RUN_CURRENT_X = printer.configfile.settings['tmc2240 stepper_x'].run_current|float %}
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc2240 stepper_y'].run_current|float %}
{% set HOME_CURRENT =0.4 %}
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
# Home
G28 Y
# Move away
G91
G1 Y-10 F1200
G90
# Wait just a second… (give StallGuard registers time to clear)
G4 P1000
# Set current during print
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
[homing_override]
set_position_z:10
axes: xyz
gcode:
{% set home_all = 'X' not in params and 'Y' not in params and 'Z' not in params %}
{% if home_all or 'Z' in params %}
G91
G1 Z20 F600
G90
{% endif %}
{% if home_all or 'X' in params or 'Z' in params %}
_HOME_X
{% endif %}
{% if home_all or 'Y' in params or 'Z' in params %}
_HOME_Y
{% endif %}
{% if home_all or 'Z' in params %}
G0 X175 Y175 F3600
G28 Z
G1 Z10
{% endif %}
Just now seeing this, but more or less the same MACRO
except I initially had set HOME_CURRENT =0.7
in mine and tried 0.4
but still seeing the same.
gcode_macro _HOME_X]
gcode:
# Always use consistent run_current on A/B steppers during sensorless homing
{% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %}
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %}
{% set HOME_CURRENT = 0.4 %}
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
# Home
G28 X
# Move away
G91
G1 X-10 F1200
# Wait just a second… (give StallGuard registers time to clear)
G4 P1000
# Set current during print
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
[gcode_macro _HOME_Y]
gcode:
# Set current for sensorless homing
{% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %}
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %}
{% set HOME_CURRENT = 0.4 %}
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
# Home
G28 Y
# Move away
G91
G1 Y-10 F1200
# Wait just a second… (give StallGuard registers time to clear)
G4 P1000
# Set current during print
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
Comparing DUMP_TMC
with and without autotune
enabled, I see a few differences.
========== Write-only registers ==========
10:01 PM
SLAVECONF: 00000200 senddelay=2
10:01 PM
IHOLD_IRUN: 000c1c1c ihold=28 irun=28 iholddelay=12
10:01 PM
TPWMTHRS: 000000ff tpwmthrs=255
10:01 PM
TPOWERDOWN: 00000014 tpowerdown=20
10:01 PM
SGTHRS: 00000050 sgthrs=80
10:01 PM
TCOOLTHRS: 00000125 tcoolthrs=293
10:01 PM
COOLCONF: 00002264 semin=4 seup=3 semax=2 sedn=1
========== Write-only registers ==========
9:57 PM
SLAVECONF: 00000200 senddelay=2
9:57 PM
IHOLD_IRUN: 00081c1c ihold=28 irun=28 iholddelay=8
9:57 PM
TPWMTHRS: 000fffff tpwmthrs=1048575
9:57 PM
TPOWERDOWN: 00000014 tpowerdown=20
9:57 PM
SGTHRS: 0000002d sgthrs=45
Ok, can you update to the current version and try again?
Tried with latest commits with stealth
enabled and disabled, but still not able to get senseless homing working.
tryed but it doesnt work: driver_SGTHRS: 90 is for TMC2209 driver_SGT: is for TMC2130/TMC2660/TMC5160
added to sensorles homing macro values for x and y:
SET_TMC_FIELD FIELD=SGTHRS STEPPER=stepper_x VALUE=90
SET_TMC_FIELD FIELD=SGTHRS STEPPER=stepper_y VALUE=90
and it works :)
if there will be some fix let me know!
Same problem here, even typing SET_TMC_FIELD STEPPER=stepper_x FIELD=SGTHRS VALUE=255
on the console before the G28 X0
, the toolhead crashes. I'm using 2209 with moons-ms14hs5p4150:
Here is my configuration:
[autotune_tmc stepper_x] motor: moons-ms14hs5p4150 sg4_thrs: 255
and the voron homming macro:
[gcode_macro _HOME_X] gcode:
Always use consistent run_current on A/B steppers during sensorless homing
{% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %} {% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %} {% set HOME_CURRENT = 0.7 %} SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT} SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT} # Home G28 X # Move away G91 G1 X-10 F1200 # Wait just a second… (give StallGuard registers time to clear) G4 P1000 # Set current during print SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X} SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
[gcode_macro _HOME_Y] gcode:
Set current for sensorless homing
{% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %} {% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %} {% set HOME_CURRENT = 0.7 %} SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT} SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT} # Home G28 Y # Move away G91 G1 Y-10 F1200 # Wait just a second… (give StallGuard registers time to clear) G4 P1000 # Set current during print SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X} SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
I have the same problem with tmc2209
[motor_constants stepperOnline-17ME15-1504S]
# Coil resistance, Ohms
resistance: 2.00
# Coil inductance, Henries
inductance: 0.0025
# Holding torque, Nm
holding_torque: 0.30
# Nominal rated current, Amps
max_current: 1.5
# Steps per revolution (1.8deg motors use 200, 0.9deg motors use 400)
steps_per_revolution: 400
[autotune_tmc stepper_x]
motor: stepperOnline-17ME15-1504S
sg4_thrs: 130
[autotune_tmc stepper_y]
motor: stepperOnline-17ME15-1504S
sg4_thrs: 130
Had the same issue. When optimized by the script, the TMC drivers either generate less EMF so it does not detect stall at all or it has issues. In order to resolve this I had to ensure two things:
With threshold of 160 for X and Y motors I was finally able to home.
Can confirm it as well.
[tmc2209 stepper_x]
run_current: 1.1
driver_SGTHRS: 60
works, but
[motor_constants siboor-35sth52-1204a]
#Siboor BOM Voron 0.2 steppers
resistance: 2.3
inductance: 0.035
holding_torque: 0.36
max_current: 1.2
steps_per_revolution: 200
[tmc2209 stepper_x]
run_current: 1.1
[autotune_tmc stepper_x]
motor: siboor-35sth52-1204a
sgt: 63
sg4_thrs: 0
or any other sgt/sg4 combination (tried both just because) crash the toolhead.
Can confirm it as well.
[tmc2209 stepper_x] run_current: 1.1 driver_SGTHRS: 60
works, but
[motor_constants siboor-35sth52-1204a] #Siboor BOM Voron 0.2 steppers resistance: 2.3 inductance: 0.035 holding_torque: 0.36 max_current: 1.2 steps_per_revolution: 200 [tmc2209 stepper_x] run_current: 1.1 [autotune_tmc stepper_x] motor: siboor-35sth52-1204a sgt: 63 sg4_thrs: 0
or any other sgt/sg4 combination (tried both just because) crash the toolhead.
My understanding is that you should use sg4_thrs
parameter, not sgt
with tmc2209 drivers. And when you define it to 0 it is the lowest sensibility, so the toolhead will crash. Try using 255 and normally the tool head will not move, so decrease this value to find the best setting.
I was able to avoid crashing by increasing speed to 50, but still can't make it work.
No trigger on x after full movement
No trigger on x after full movement
I have tmc2209 and ldo-42sth48-2004ac if that matters.
so what is supposed way to tuning stallguard for 2209? I have driver_SGTHRS: 90 in usual tmc2209 settings. Should I remove it and use sg4_thrs in autotune section instead? not clear from readme
This module could not work with the TMC2209 at all because the TMC2209 does not support SGT nor SG4_THRS.
I have the solution - just disable CoolStep for homing.
set_tmc_field stepper=stepper_x field=tcoolthrs value=1048575
set_tmc_field stepper=stepper_y field=tcoolthrs value=1048575
for me increasing the homing speed helped
How it works for me on TMC2240 on 36V, moons motors from formbot kit:
I have the solution - just disable CoolStep for homing.
set_tmc_field stepper=stepper_x field=tcoolthrs value=1048575 set_tmc_field stepper=stepper_y field=tcoolthrs value=1048575
do i need to reactivate coolstep again or is it automatically?
I have the solution - just disable CoolStep for homing.
set_tmc_field stepper=stepper_x field=tcoolthrs value=1048575 set_tmc_field stepper=stepper_y field=tcoolthrs value=1048575
do i need to reactivate coolstep again or is it automatically?
of course!
i found that the default value fo rtcoolthrs is 2000 is that correct?
i found that the default value fo rtcoolthrs is 2000 is that correct?
would like an answer to this too ... you read that coolstep should be disabled during homing yet nobody and nowhere is an info on what the default value is or how to even disable/enable it in a macro ...
Same for me ... TMC2209 with Moons "moons-ms17hd6p420I-04"
No matter what I do ... my toolhead crashes into the gantry ... currently it's not usable for me 😞
[autotune_tmc stepper_x]
motor: moons-ms17hd6p420I-04
tuning_goal: performance
sg4_thrs: 82
[autotune_tmc stepper_y]
motor: moons-ms17hd6p420I-04
tuning_goal: performance
sg4_thrs: 75
[autotune_tmc stepper_z]
motor: moons-ms17hd6p420I-04
tuning_goal: performance
[autotune_tmc stepper_z1]
motor: moons-ms17hd6p420I-04
tuning_goal: performance
[autotune_tmc stepper_z2]
motor: moons-ms17hd6p420I-04
tuning_goal: performance
[autotune_tmc stepper_z3]
motor: moons-ms17hd6p420I-04
tuning_goal: performance
[autotune_tmc extruder]
motor: ldo-36sth20-1004ahg
tuning_goal: performance
[gcode_macro TMC_AUTOTUNE_DISABLE_COOLSTEP_BEFORE_HOMING]
gcode:
set_tmc_field stepper=stepper_x field=tcoolthrs value=1048575
set_tmc_field stepper=stepper_y field=tcoolthrs value=1048575
[gcode_macro TMC_AUTOTUNE_ENABLE_COOLSTEP_AFTER_HOMING]
gcode:
set_tmc_field stepper=stepper_x field=tcoolthrs value=2000
set_tmc_field stepper=stepper_y field=tcoolthrs value=2000
For
for me increasing the homing speed helped
For me this was the best solution, I increase the home speed to 60 and magic, I get the best sensorless Homming possible
I don't understand it, but homing speed update from 40 to 60 for x and y worked (for now). Wish I knew why.
Seems I was having a similar sensorless issue with 2209 after an install yest. I was running stock homing speeds (25) and changed to 45 and things started to behave.
Thank you for this. I wonder if increasing the homing speed disables CoolStep, allowing sensorless to work? 60mm/s homing speed allowed it to work with my 2209.
Tried to use this with LDO 2504AH on Octopus v1.1 with TMC2209(s) and senseless homing doesn't appear to be working even with a value of 255 the X Axis is crashing into the gantry.
I add
2504ah
to themotor_database.cfg
but looks the same as2504ac
`#####################################################################
Klipper TMC AutoTune
##################################################################### [include motor_database.cfg]
[autotune_tmc stepper_x] motor: ldo-42sth48-2504ah sg4_thrs: 255
Sensorless homing threshold, tune if using sensorless
voltage: 24.0
Motor supply voltage for this stepper driver
[autotune_tmc stepper_y] motor: ldo-42sth48-2504ah sg4_thrs: 255
Sensorless homing threshold, tune if using sensorless
voltage: 24.0
Motor supply voltage for this stepper driver
[autotune_tmc stepper_z] motor: omc-17hs19-2004s1 [autotune_tmc stepper_z1] motor: omc-17hs19-2004s1 [autotune_tmc stepper_z2] motor: omc-17hs19-2004s1 [autotune_tmc stepper_z3] motor: omc-17hs19-2004s1
[autotune_tmc extruder] motor: ldo-36sth20-1004ahg`