#Troubles with Sensorless homing TMC5160

14 messages · Page 1 of 1 (latest)

eternal ember
#

I'm trying to swap out the 2209 drivers for my X/Y with 5160T pro v1s on my Octopus and I have got to the point where i am able to move but I can't seem to figure out why sensorless homing isn't working, it was working just fine with the 2209s. I have the jumpers in the spots for both SPI and stallgaurd so I assume its just a config issue at this point. I followed the guides to invert the diag pin on the 5160 section of the klipper config page but I don't think that the board is actually sensing anything, when attempting to home the tool head just hits the end and stalls until the firmware stops it for no endstop detection I have tried all sorts of driver_SGT settings along with swapping defining DIAG1 and DIAG0 with no luck. Any input as to how my config could be wrong would be appreciated.

My homing macros just in case.
[homing_override]
set_position_z: 0
axes: xyz
gcode:
G1 Z20 F4000
SENSORLESS_HOME_X
SENSORLESS_HOME_Y
G90
G1 X150 Y150 F10000
G28 Z
G1 Z10 F4000

[gcode_macro SENSORLESS_HOME_X]
gcode:
{% set HOME_CUR = 0.700 %}
#{% set driver_config = printer.configfile.settings['tmc2209 stepper_x'] %}
{% set driver_config = printer.configfile.settings['tmc5160 stepper_x'] %}
{% set RUN_CUR = driver_config.run_current %}
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CUR}
G4 P1000
G28 X0
G90
G1 X298 F2000
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CUR}

[gcode_macro SENSORLESS_HOME_Y]
gcode:
{% set HOME_CUR = 0.700 %}
#{% set driver_config = printer.configfile.settings['tmc2209 stepper_y'] %}
{% set driver_config = printer.configfile.settings['tmc5160 stepper_y'] %}
{% set RUN_CUR = driver_config.run_current %}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CUR}
G4 P1000
G28 Y0
G90
G1 Y298 F2000
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CUR}

muted mason
#

Those are crazy macros. Use the ones from the writeup. There's 5160 examples in there

eternal ember
#

I lifted them from a guide i found when I first setup sensorless with the 2209s and they worked fine. Which writeup are you talking about i have found like 5.

muted mason
#

THE writeup

covert gustBOT
eternal ember
#

I have been reading throught that but I didn't think just the macro would cause NO endstop detection. I'll change it and see, May have a try at Kalico also.

eternal ember
#

Ok so update. Swapped the macros over and I am detecting, but it seem to be VERY sensitive. Trying to tweak the driver_SGT settings 1 is too low and it just things its homed mid travel, and 2 just hits the end and doesn't detect.

#

well, ok I think i got it working. Turns out the homing current was just too low. My previous macro was working but both yours and mine had it set too low, changed it to 1 and it works

#

now just need to tweak

#

Thanks

muted mason
#

Kalico is great. Much easier

#

Ya .49 is a decent starting point usually. Glad it's working

indigo root
eternal ember
#

@indigo root all good. Only real issue is had was the homing current too low. Working fine now after tuning.