From 328bd89fc11cad86802c5a35055f6b6d4a8243f0 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 20 Feb 2019 16:12:33 -0500 Subject: [PATCH] docs: Warn against using the TMC2208 in standalone mode Signed-off-by: Kevin O'Connor --- docs/FAQ.md | 49 ++++++++++++++++---- docs/img/tmc2208.svg | 96 +++++++++++++++++++++++++++++++++++++++ docs/img/tmc2208.svg.png | Bin 0 -> 7314 bytes 3 files changed, 135 insertions(+), 10 deletions(-) create mode 100644 docs/img/tmc2208.svg create mode 100644 docs/img/tmc2208.svg.png diff --git a/docs/FAQ.md b/docs/FAQ.md index 0f1eea532..bde845b2c 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -265,17 +265,46 @@ configured in Marlin. ### My TMC motor driver turns off in the middle of a print -There have been reports of some TMC drivers being disabled in the -middle of a print. (In particular, with the TMC2208 driver.) When this -issue occurs, the stepper associated with the driver moves freely, -while the print continues. +Short answer: Do not use the TMC2208 driver in "standalone mode" with +Klipper! Do not use the TMC2224 driver in "stealthchop standalone +mode" with Klipper! -It is believed this may be due to "over current" detection within the -TMC driver. Trinamic has indicated that this could occur if the driver -is in "stealthChop mode" and an abrupt velocity change occurs. If you -experience this problem during homing, consider using a slower homing -speed. If you experience this problem in the middle of a print, -consider using a lower square_corner_velocity setting. +Long answer: Klipper implements very precise timing. + +![tmc2208](img/tmc2208.svg.png) + +In the above picture, if Klipper is requested to move along the red +line and if each black line represents the nominal location to step a +stepper, then in the middle of that movement Klipper will arrange to +take a step, change the step direction, and then step back. Klipper +can perform this step, direction change, and step back in a very small +amount of time. + +It is our current understanding that the TMC2208 and TMC2224 will +react poorly to this when they are in "stealthchop" mode. (It is not +believed any other TMC drivers are impacted.) It is believed that when +the driver sees the two step requests in a small time frame that it +dramatically increases current in anticipation of high acceleration. +That high current can trip the driver's internal "over current" +detection which causes the driver to disable itself. + +This pattern of steps can occur on all stepper motors and on all +robot kinematics. + +The TMC2208 and TMC2224 do work well with Klipper when run-time +configuration mode is used (that is, when a wire is routed from the +micro-controller to the PDN-UART pin and the printer config file has a +corresponding [tmc2208] config section). When using run-time +configuration, either configure the drivers to use "spreadcycle mode" +or configure them to use "stealthchop mode" with a reasonable +"stealthchop threshold". If one wishes to exclusively use +"stealthchop" mode with run-time UART configuration then make sure the +stealthchop_threshold is no more than about 10% greater than the +maximum velocity of the given axis. It is speculated that with a +reasonable stealthchop threshold, then if Klipper sends a "step, +direction change, step back" sequence, the driver will briefly +transition from stealthchop mode, to spreadcycle mode, and back to +stealthchop mode, which should be harmless. ### I keep getting random "Lost communication with MCU" errors diff --git a/docs/img/tmc2208.svg b/docs/img/tmc2208.svg new file mode 100644 index 000000000..0a2d8c6e8 --- /dev/null +++ b/docs/img/tmc2208.svg @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/docs/img/tmc2208.svg.png b/docs/img/tmc2208.svg.png new file mode 100644 index 0000000000000000000000000000000000000000..f46a6f8d85791ee8bf8549ebbf09fa600849dd43 GIT binary patch literal 7314 zcmeHs_dA?j*Y@b05u%S8LbM2?MH?f8o2Vg)5?w|wqxU*G2`LycLzpyzTd#>Wl4vm! zE$T$OgDBC{7O{_q{|zwpj+n2T-gz1LoQt#h4gT`4BUdQ9{@^biPy>6Sji3<4or z1;6*uQiE?;U}qVUEVeUHrAjs{0WZ$X*!)!@Y~FRB!Q!={X59 z${fKzi5R-J>`Qx#p#g)_+r96;U72lrR1mq|I^!e##KUFHvwfQ;V(C}FfCk*-oi+mD zXDFabsqV!?>dDYDNL^DVek@&sAP|ABJ8$o5)q6{=P>P1=8X?%*1MhMZ(X77HVGQn* z--7s3$v6~QOm*W^R-Bx_@*zIYuam8^?{j>i3ftkg`(#BrtgMieUQM`_rS@Mhyw&LMcHnje<(#N@ zk_F(h_F#Z@oP!bm!;gj(N2L|kw5H$;4x4ryMNnIh$yeufM^#nTga#zf#xv1SgU;R!hmqVf)(h}COUWW6-~a|@rHh?G2)%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