Help needed with Duet 3 6hc TMC5160 StealthChop config
-
Hi,
did you include the functionality yet?
Kindly regards, Pierre
-
I have the same problem. Give it a way to use stealthchope ore cool step?
-
I have read through this thread and the TMC5160 documentation and created a homing sequence that should do the stealthchop tuning within the homeall.g file. Maybe someone can double check if this works. Note that I only want to use stealthchop on X and Y although tuning for Z could be backpacked onto this script easily.
;homeall.g ;homing x and y in default mode of operation G91 ; relative positioning G1 H2 Z5 F240 ; lift z 5mm relative to current position G1 H1 X+/-(Xmax+5) Y+/-(Ymax+5) F3600 ; move quickly to x or y endstop and stop there G1 H1 X+/-(Xmax+5) ; home x G1 H1 X+/-(Ymax+5) ; home y G1 X(Xhome+/-5) Y(Yhome+/-5) ; back up 5mm G1 H1 X+/-(Xmax+5) F360 ; home x slowly (second pass) G1 H1 X+/-(Ymax+5) ; home y slowly (second pass) ;stealthchop tuning AT1 M18 X Y ; disable x and y steppers M569 P(Xdrv) D3 V5 H5 ; enable stealthchop and set tpwmthrs and thigh for X M569 P(Ydrv) D3 V5 H5 ; enable stealthchop and set tpwmthrs and thigh for Y M915 P(Xdrv) T5 ; set tcoolthrs for X [needed if stallguard is not used???] M915 P(Ydrv) T5 ; set tcoolthrs for Y [needed if stallguard is not used???] M17 X Y ; enable x and y steppers [will this enable full run current or idle current???] G4 P150 ; pause for 150ms to satisfy AT1 condition G92 X(Xhome) Y(Yhome) ; set home positions again after position loss due to M18 G90 ; absolute positioning ;stealthchop tuning AT2 G1 X(Xmax/2-ProbeOffsetX) Y(Yhome+/-5) F(240*beltpitch*pulleyteeth) ; tuning move at "typical speed" that is nearly a straight line in order to move both steppers (CoreXY) significantly i.e. >400 full steps @ 60-300RPM ;homing z G1 Y(Ymax/2-ProbeOffsetY) ; move probe to the middle of the bed G30 ; home z by probing the bed G1 Z10 F240 ; lift z again after probing
I tried to keep everything concerning positions and so on abstract, so that you have to enter your own correct home positions (or variables for that matter) and don't copy and paste a script that might damage your machine.
I have two questions though (see the end of lines 17 and 18) maybe this is something for David to answer... -
@schild0r page 76 of rev 1.14 of the TMC5160/5160A datasheet has this diagram:
The mention of "required ordering" suggests that VCOOLTHRS > VPWMTHRS is required, which in turn implies tcoolthrs < tpwmthrs. It's not clear what happens if you violate this.
-
@dc42 thanks for the answer. I think having it in wouldn't have hurt anyway.
What about the new M17 command? Does it enable the steppers with full run current although no movement is issued or does it enable them with idle current? -
@schild0r said in Help needed with Duet 3 6hc TMC5160 StealthChop config:
What about the new M17 command? Does it enable the steppers with full run current although no movement is issued or does it enable them with idle current?
M17 enables with full current. It will timeout to the idle current (set in M906) if there is no movement with whatever value you have set with M84 S#.
Ian
-