Duet 3 Mini 5 Sensorless Homing 0.9 degree motors
-
@ctilley79 please tell us what stepper motors you are using, what current you have set them to in M906, and what VIN voltage you are providing to the Duet.
Also run the following commands and report the response:
M569 P4
M915 P4 -
@dc42 said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:
@ctilley79 please tell us what stepper motors you are using, what current you have set them to in M906, and what VIN voltage you are providing to the Duet.
Also run the following commands and report the response:
M569 P4
M915 P4Vin is 24V
These are the motors I'm currently using:
https://www.linengineering.com/products/stepper-motors/hybrid-stepper-motors/4209-series/4209L-01PI also have these if it's a better option
https://www.moonsindustries.com/p/nema-17-high-precision-hybrid-stepper-motors/ms17ha6p4200-000004611110015926M906 X1100 Y1100 Z600 E500 I30
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), pwmScaleSum 97, pwmScaleAuto 10, pwmOfsAuto 255, pwmGradAuto 14, pos 392M915 P4
Driver 0.4: stall threshold -128, steps/sec 390, coolstep 0, action on stall: noneI set the S parameter very low to try and get it to stall. The H parameter was calculated using the formula in the sensorless homing/stallguard instructions.
-
@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.