I am going through the process of trying to set up sensorless homing on a cartesian printer (only testing the y-axis for now). The first y-axis homing command succeeds and acts as expected, but subsequent homing attempts act as if a flag in the driver hasn’t cleared (homing immediately triggers regardless of where the carriage is).
I’ve tried a few speeds (between 5-50 mm/s) and sensitivities ( between 10-250) and the issue persists. Also tried a few homing retract distances with no effect. Really doesn’t seem like it has anything to do with the normal tuning process.
I read that the TMC2209 might have a sensorless homing flag-clearing issue of some sort/ it needs time to do so, but I found that waiting any amount of time (and even disabling the steppers) apparently does nothing to fix the issue. The only thing that seems to fix the issue is restarting the printer.
Requested a driver debug report with the “DUMP_TMC STEPPER=stepper_y” command.
Edit: Output is shown in the klippy log. Removed the code shown here because I work 16 hour days and I was tired of coming home and seeing some new pedantic comment about code formatting clogging up the discussion. Proof that no matter what you do to make someone else’s life easier, they will always complain.
As far as I can tell, none of these debug parameters indicate much about a flag not clearing, but I could be wrong. At a loss of what to try next.
Looking at the schematics, this is unnecessary because the “Y-STOP” signal going to the MCU runs through a buffer. I doubt this is your problem but, at the very least, this isn’t helpful.
Please explain/draw out how you’ve wired the endstop circuitry.
As a personal observation; if you’re working 16 hours a day are you in the right headspace to be setting up a 3D printer when you come home?
Making snide remarks to the people who are helping you (for free) when they simply ask you to format information in a way that makes it easier for them isn’t a strategy that will result in a successful resolution to your issues.
Okay, I just went over your klippy.log again and noticed that you’re running at high current and don’t have a lower current for homing.
Could I suggest that you add the two macros:
[gcode_macro global] ### Global Variables
variable_xyz_run_current: 0.875
variable_xyz_home_current: 0.3
variable_xyz_home_sgthrs: 70
gcode:
#### Macros to implement sensorless homing
[gcode_macro _HOME_X]
gcode:
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={printer["gcode_macro global"].xyz_home_current}
SET_TMC_CURRENT STEPPER=dual_carriage CURRENT={printer["gcode_macro global"].xyz_home_current}
SET_TMC_FIELD STEPPER=stepper_x FIELD=SGTHRS VALUE={printer["gcode_macro global"].xyz_home_sgthrs}
SET_TMC_FIELD STEPPER=dual_carriage FIELD=SGTHRS VALUE={printer["gcode_macro global"].xyz_home_sgthrs}
G4 P500 # Wait for StallGuard registers to clear
G28 X
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={printer["gcode_macro global"].xyz_run_current}
SET_TMC_CURRENT STEPPER=dual_carriage CURRENT={printer["gcode_macro global"].xyz_run_current}
SET_DUAL_CARRIAGE CARRIAGE=1
G91 # Move away to centre of build surface
SET_DUAL_CARRIAGE CARRIAGE=0
G91 # Move away to centre of build surface
[gcode_macro _HOME_Y]
gcode:
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={printer["gcode_macro global"].xyz_home_current}
SET_TMC_FIELD STEPPER=stepper_y FIELD=SGTHRS VALUE={printer["gcode_macro global"].xyz_home_sgthrs}
G4 P500 # Wait for StallGuard registers to clear
G28 Y
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={printer["gcode_macro global"].xyz_run_current}
G91 # Move away to centre of build surface
[gcode_macro _HOME_Z]
gcode:
SET_TMC_CURRENT STEPPER=stepper_z CURRENT={printer["gcode_macro global"].xyz_home_current}
SET_TMC_FIELD STEPPER=stepper_z FIELD=SGTHRS VALUE={printer["gcode_macro global"].xyz_home_sgthrs}
G4 P500 # Wait for StallGuard registers to clear
G28 Z
SET_TMC_CURRENT STEPPER=stepper_z CURRENT={printer["gcode_macro global"].xyz_run_current}
G91 # Move away to centre of build surface
[homing_override]
axes: xyz
gcode:
{% set home_all = 'X' not in params and 'Y' not in params and 'Z' not in params %}
{% if home_all or 'X' in params %}
_HOME_X
{% endif %}
{% if home_all or 'Y' in params %}
_HOME_Y
{% endif %}
{% if home_all or 'Z' in params %}
_HOME_Z
{% endif %}
The first macro sets up some variables so that you can set values that are used globally and you’re not searching through your printer.cfg looking for specific values to change.
The second & third macros loads the variable values into the TMC2209s, as required, and carries out the sensorless homing operation(s).
I don’t know if 0.3A is acceptable in your printer, that’s something you’ll have to experiment with. You’re looking for a current that moves the carriage/gantry but stalls out easily. You’ll have to experiment with it.