diff --git a/config/software/sensorless_homing/sensorless_BTT_TMC5160.cfg b/config/software/sensorless_homing/sensorless_BTT_TMC5160.cfg new file mode 100644 index 000000000..a689b41c3 --- /dev/null +++ b/config/software/sensorless_homing/sensorless_BTT_TMC5160.cfg @@ -0,0 +1,37 @@ +# This file add support for Sensorless homing using tmc5160 drivers +# To use it, be sure to place the corresponding jumpers correctly on your MCU! +[gcode_macro _USER_VARIABLES] +variable_sensorless_homing_enabled: True +gcode: + + +[stepper_x] +homing_speed: 40 +endstop_pin: tmc5160_stepper_x:virtual_endstop + +[tmc5160 stepper_x] +diag1_pin: ^!X_STOP +driver_SGT: -64 # -64 is most sensitive value, 63 is least sensitive + +[stepper_y] +homing_speed: 40 +endstop_pin: tmc5160_stepper_y:virtual_endstop + +[tmc5160 stepper_y] +diag1_pin: ^!Y_STOP +driver_SGT: -64 # -64 is most sensitive value, 63 is least sensitive + + +## PLEASE READ THE FOLLOWING: +## -64 is the most sensitive value, 63 is the least sensitive. Here we set a default +## value of -64 to avoid any trouble or crash. Your axes should not move with this parameter! + +## 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 you can put it in your overrides +## file like that: + +# [tmc5160 stepper_x] +# driver_SGT: xxx + +# [tmc5160 stepper_y] +# driver_SGT: xxx diff --git a/user_templates/printer.cfg b/user_templates/printer.cfg index dfd2608e6..609e36826 100644 --- a/user_templates/printer.cfg +++ b/user_templates/printer.cfg @@ -255,6 +255,7 @@ # [include config/software/sensorless_homing/sensorless_TMC2209.cfg] # [include config/software/sensorless_homing/sensorless_BTT_TMC2240.cfg] # [include config/software/sensorless_homing/sensorless_MKS_TMC2240.cfg] +# [include config/software/sensorless_homing/sensorless_BTT_TMC5160.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