TMC 2209 Sensorless Homing

SKR Pro v1.2, 2209 v3.0.

I need some help here. I can’t get this to work. I see videos where the carriage just slides along, then oops! the side!, lets back up a little.

Mine just runs into the side, starts skipping steps, and almost never stops until I kill the printer. I’ve tried sensitivity of 1, 254, and a few values in between.
My understanding is that the jumper pins for UART handle sending the diag signal to the endstop pin, so that’s the only thing I need to do on the board.

Any idea what I’m doing wrong? I can’t find anything about troubleshooting these except for trying to find a value that is too sensitive and working backwards. I’ve seen a half-dozen tutorials and I don’t understand what I’m doing differently aside from using corexy.

In config_adv I have:
#define SENSORLESS_HOMING // StallGuard capable drivers only

#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
// TMC2209: 0…255. TMC2130: -64…63
#define X_STALL_SENSITIVITY 200 //TR
#define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY
#define Y_STALL_SENSITIVITY 200 //TR
#define Y2_STALL_SENSITIVITY Y_STALL_SENSITIVITY
//#define Z_STALL_SENSITIVITY 8
//#define Z2_STALL_SENSITIVITY Z_STALL_SENSITIVITY
//#define Z3_STALL_SENSITIVITY Z_STALL_SENSITIVITY
//#define Z4_STALL_SENSITIVITY Z_STALL_SENSITIVITY
//#define I_STALL_SENSITIVITY 8
//#define J_STALL_SENSITIVITY 8
//#define K_STALL_SENSITIVITY 8
//#define U_STALL_SENSITIVITY 8
//#define V_STALL_SENSITIVITY 8
//#define W_STALL_SENSITIVITY 8
//#define SPI_ENDSTOPS // TMC2130 only
#define IMPROVE_HOMING_RELIABILITY
#endif
#define HOMING_BUMP_MM { 0, 0, 0 }
#define HOMING_BUMP_DIVISOR { 3, 3, 3 }
#define HOMING_BACKOFF_POST_MM { 2, 2, 2 }

(don’t know what x_rsense, x_chain_pos, , or the two commented variables are)
(these sections also have similar entries for X2, Y2, Z4, I, J, K, etc, but they are greyed out I think because they are not defined)

#if AXIS_IS_TMC(X)
#define X_CURRENT 725 // 900 // 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing
#define X_MICROSTEPS 16 // 0…256
#define X_RSENSE 0.11
#define X_CHAIN_POS -1 // -1…0: Not chained. 1: MCU MOSI connected. 2: Next in chain, …
//#define X_INTERPOLATE true // Enable to override ‘INTERPOLATE’ for the X axis
//#define X_HOLD_MULTIPLIER 0.5 // Enable to override ‘HOLD_MULTIPLIER’ for the X axis
#endif

#if AXIS_IS_TMC(Y)
#define Y_CURRENT 725 // 900 // 800
#define Y_CURRENT_HOME Y_CURRENT
#define Y_MICROSTEPS 16
#define Y_RSENSE 0.11
#define Y_CHAIN_POS -1
//#define Y_INTERPOLATE true
//#define Y_HOLD_MULTIPLIER 0.5
#endif

#if AXIS_IS_TMC(Z)
#define Z_CURRENT 650 // 900 // 800
#define Z_CURRENT_HOME Z_CURRENT
#define Z_MICROSTEPS 16
#define Z_RSENSE 0.11
#define Z_CHAIN_POS -1
//#define Z_INTERPOLATE true
//#define Z_HOLD_MULTIPLIER 0.5
#endif

#if AXIS_IS_TMC(Z2)
#define Z2_CURRENT 650 // 800
#define Z2_CURRENT_HOME Z2_CURRENT
#define Z2_MICROSTEPS Z_MICROSTEPS
#define Z2_RSENSE 0.11
#define Z2_CHAIN_POS -1
//#define Z2_INTERPOLATE true
//#define Z2_HOLD_MULTIPLIER 0.5
#endif

#if AXIS_IS_TMC(Z3)
#define Z3_CURRENT 650 // 800
#define Z3_CURRENT_HOME Z3_CURRENT
#define Z3_MICROSTEPS Z_MICROSTEPS
#define Z3_RSENSE 0.11
#define Z3_CHAIN_POS -1
//#define Z3_INTERPOLATE true
//#define Z3_HOLD_MULTIPLIER 0.5
#endif

Thanks.

I wonder if I read somewhere that it’s not recommended to use sensorless homing, because the driver is not accurate enough.

Glances over to my 3d-printer: hm, the Prusa uses sensorless homing!

SORRY! Don’t mind me, I’ll find my way out.

Yeah, i think the consensus is that it’s not good enough for tool changes on the cnc, but I only need to home the printer before I start a job. Honestly, if it were off by a full mm, it wouldn’t bother me.

I did manage to get it to stop once by moving the carriage away from the edge and letting it get moving pretty fast. But just once, so it might not be related. I can’t find a setting anywhere to change the homing speed except in the firmware, and a fifteen minute compile is extra frustrating. I’m gonna lose the whole friggin day trying to troubleshoot one feature.

Update: I’d updated the homing speed to 100mm/s earlier because I saw the vorons homing at a pretty high rate. Looks like sensorless only works on stealthchop (lowspeed), and my threshold was set to 100mm/s. Best guess, the one time it worked, it had hit the side at something slower than the homing speed, but faster than the original homing speed.
I bumped the threshold up to 120 for now, and it’s false stopping in the X axis (sensitivity currently at 240,dropping by 5 per test…if it keeps behaving, I’ll try bigger steps). So that’s nice.

Edit: that didn’t take long. Very next try it crashed and kept going. Bumped the value back up, still crashing. Bumped again, still crashing. Guess that wasn’t it.

Edit Edit: Of course that wasn’t it. Marlin devs are smart. Found this: “X, Y, and Z homing will always be done in spreadCycle mode.”

I give up. End of the second day trying to figure out why this doesn’t work. I can’t remember the last time I was so frustrated and angry at something that wasn’t alive.

I’m attempting sensorless homing on my MP3DPv4 for thr Z axis. It works sometimes, but not consistently. It seems to be worst when it’s already at the bottom of travel (ie: already homed.) Some of the RRF notes on it: apparently it works better at higher speeds. There is a minimum speed that you can tell RRF to ignore the driver reporting skipped steps at. This does seem to hold true, as I get better results at higher speeds, but not really consistent until the speeds are closer to what I get just turning motor power off.

There are 2 modes in RRF for detection. One will trigger on a single skipped step, the other requires a minimum of 4 skipped steps in a row. I don’t know if Marlin has those modes, but 4 full steps (64 microsteps = 0.64mm) seems better than it happering at the end of travel for a while. Still, I left mine on the 1 skipped stop setting in hope…

Still seems iffy to me, could be problematic.

With sensorless homing though, you will be at your target location plus or minus 1/2 full step, or 0.08mm, which seems acceptable for most things I use the CNC for. At worst you are 0.16mm different left to right. What bugs me is not knowing which way, or how much, but that’s a trifle OCD.

I don’t know. I figured if all the voron folk are using it then it must be sorted. Then again, they’re using klipper.