Duet 3 Mini 5 Sensorless Homing 0.9 degree motors
-
@ctilley79 With your current settings your motors will be switching to Spreadcycle when they reach a speed of 0.3mm/sec. Stall detection is not supported when operating in spreadcycle with TMC2209 drivers. Try adding something like V40 to your M569 P4 command and check the switch over speed ( tpwmthrs) again with M569 P4. Then try again to see if it stalls.
-
@gloomyandy Damn. I forgot that V parameter was counterintuitive. Now that I've gotten it to stall, the motor hits the endstop, then speeds into reverse until it hits X max. Any tips for that? lol
-
@ctilley79 said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:
Now that I've gotten it to stall, the motor hits the endstop, then speeds into reverse until it hits X max. Any tips for that? lol
Is that with the homex posted above?
-
@Phaedrux This is the current one I've been playing with. It semi works. Stealthchop sounds pretty awful after homing. I'm also getting sporadic short to ground with this config
G91 ; relative positioning M564 H0 S0 M915 P4 R0 F0 S-59 H391 M569 P4 D3 V1 M569 P4 M915 P4 M913 X30 ; Lower motor current % M400 M201.1 X800 G1 H2 Z5 F12000 ; lift Z relative to current position M17 X G4 P100 G1 H1 X-250 F4000 M400 G1 H2 Z-5 F12000 ; lift Z relative to current position G90 ; absolute positioning M400 M913 X100 ; return current to 100% M400 M564 H1 S1 M201.1 X1500
-
@ctilley79 said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:
M569 P4
Drive 4 runs forwards, active low enable, timing fast, mode stealthChop, ccr 0x00053, toff 3, tblank 0, tpwmthrs 12000 (0.3 mm/sec)That's likely the problem. On the TMC2209, stall detection only works when the driver is in stealthChop mode; but you have the driver configured to switch to spreadCycle mode at speeds above 0.3mm/sec. Use the M569 V parameter to select a much higher speed (lower V value) during homing, higher than the speed of the X homing move - which you currently have set (quite reasonably) as 4000mm/min aka 66.7mm/sec.
We advise against remaining in stealthChop mode during normal printing, because in that mode the driver doesn't respond well to sudden increases in load.
-
@dc42 Gotcha. Now that I've gotten it to stall, do you have a process to find out what current, sensitivity and H parameter to set and in what order I should set those?
-
@ctilley79 said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:
do you have a process to find out what current, sensitivity and H parameter to set and in what order I should set those?
Have you gone through this document? https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_stall_detection
-
@Phaedrux said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:
@ctilley79 said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:
do you have a process to find out what current, sensitivity and H parameter to set and in what order I should set those?
Have you gone through this document? https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_stall_detection
Absolutely. The document doesn’t really define a clear process. So it feels like I’m just pulling levers and hoping to land on the right combination. It seems like tuning sensorless homing can vary drastically from motor to motor, so it would be nice to have a better troubleshooting process.
The 2660 and 5160 were so much easier to tune, but the 2209s just don’t like 0.9 degree motors.
-
@ctilley79 i had similar issues with the 2209s switched too 5160's has been so much easier
-
@ctilley79 said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:
@dc42 Gotcha. Now that I've gotten it to stall, do you have a process to find out what current, sensitivity and H parameter to set and in what order I should set those?
You don't need to adjust the H parameter, it just needs to be low enough so that stall detection can occur at your chosen homing speed.
The motor current needs to be high enough to drive the axis reliably towards the endstop. Other than that, lower current makes stall detection easier. A value of 30% or normal current is typical. So try setting 30% in M913 and check that the axis moves reliably at that current. If it doesn't, try 40% or 50%.
Having selected the current, you can tune the M915 stall detection threshold. Too high and the stall won't be detected, or the axis will bang into the endstop too hard before the stall is detected. Too low and false stalls will be detected before the axis reaches the endstop.
One other parameter you can adjust is the M201.1 acceleration parameter for special moves, especially if you have a high normal acceleration set in M201. If there is a tendency to get a stall as soon as the axis starts moving, setting reduced acceleration in M201.1 may avoid that happening.