klipper icon indicating copy to clipboard operation
klipper copied to clipboard

TMC 2208 drivers are disabled while printing

Open Nume1977 opened this issue 8 years ago • 130 comments

I have just installed klipper branch 20180220a on my Anycubic kossel delta with trigorilla board + RPi3b and a few lines after the print has started one of the stepper motors turns off (i can move it by hand)! I have had this problem on X axis or Y axis (Z has not yet shown this situation).

Here is the log (from start to emergency stop) klippy.zip

Nume1977 avatar Feb 26 '18 19:02 Nume1977

I have the same printer with basically exactly the same config (except step_distance: .01041666666 for the extruder, mine is the mini with 96 steps per mm) with no problems. I can't see any issues in the log, are the stepper drivers overheating perhaps? They will disable themselves if they get too hot.

I also noticed there is a space between the ! and pin for your extruder direction, wouldn't cause this issue but the config parser might not like it.

michaelshiel avatar Feb 27 '18 00:02 michaelshiel

I also have a kossel mini pulley version. The stepper drivers have a graphic card cooler blowing air on them :) How did you calculate the step distance? I cannot find any information on how to do that ! Also, can anyone share the pin configuration for a 12864 full graphic display?

Nume1977 avatar Feb 27 '18 09:02 Nume1977

In the Anycubic version of the Marlin firmware the E steps was set to 96 per mm (steps/mm), and since Klipper wants it in mm/step you just divide 1 by the Marlin value, i.e. 1/96 = 0.01041666667.

I'm guessing you used to run Marlin on it and that didn't have any problems with the steppers stopping?

michaelshiel avatar Feb 27 '18 13:02 michaelshiel

Anycubic Delta Linear Plus running Klipper and the display config. No issues either. Does sound like a mechanical or driver issue. Sounds like a loose connection to me. The 12864 full graphics display isnt the standard display on the Anycubic Delta, not sure Klipper has support for it yet or even if it's being worked on. Sure someone will correct me if I am wrong.

grantp69 avatar Feb 28 '18 12:02 grantp69

Just did extensive testing, using several baud rates, different configs, always the same result, a little bit after the print has started one of the X or Y axis drivers is disabled and the print fails (only 2 axis move). If i revert back to Marlin or MKDUO everything works fine and the same gcode prints for start to end. I am suspecting that it a software bug when using the TMC2208 has they have dynamic stealthChop (maybe some internal safety is triggered?), i will test now by installing the original drivers and see if the problem continues. I have also disabled the 12864 display, just in case it was conflicting and reverted back to the master branch...

Nume1977 avatar Feb 28 '18 14:02 Nume1977

I have the same problems with 2208 drivers - they stop to work with Klipper software and works well with Marlin. I have 2 versions with drivers - from Lerge and from Fysstec and have problems with both. The drivers have active cooling, heatsinks are installed using thermal paste. So, that is problem for me.

mitry1974 avatar Mar 02 '18 14:03 mitry1974

Confirmed it is a software / firmware issue. Any TMC2208 driver that is used with klipper will randomly get disabled mid print, resulting in failed print.

Nume1977 avatar Mar 03 '18 08:03 Nume1977

Maybe Klipper runs the driver 'faster' and they are overheating?

dragonnn avatar Mar 03 '18 09:03 dragonnn

No, TMC drivers have forced ventilation, heat sinks and are cold to touch. mitry1974 also reports having the same problem. Are there any users that have TMC2208 drivers working?

Nume1977 avatar Mar 03 '18 10:03 Nume1977

Hmmm can you disable dynamic stealthChop via UART accessible on the drivers? Worth trying if this fixes it. And maybe the driver dump something over UART when the got power off.

dragonnn avatar Mar 03 '18 11:03 dragonnn

It is important to say how you have these drivers configured and how you are configuring them as there are quite a few options with these drivers and right now there so many variables at play here.

grantp69 avatar Mar 03 '18 11:03 grantp69

I use drivers with RAMPS 1.4+ Arduino Mega and Raspberry Pi 3. V ref is .8 volts.

mitry1974 avatar Mar 03 '18 15:03 mitry1974

Are you using jumpers to configure the drivers or have you programmed them via UART? What mode are you using, spreadcycle or stealthchop 2?

grantp69 avatar Mar 03 '18 15:03 grantp69

I'm using jumpers, don't connect them via UART yet.

mitry1974 avatar Mar 03 '18 15:03 mitry1974

I have nothing configured or connected. Just plugged the drivers in as they come, i think the default mode is stealthchop 2.

Nume1977 avatar Mar 03 '18 19:03 Nume1977

You should be able to work out what mode they are in by how the solder links are set-up on the drivers, this also includes the solder to enable or disable uart programming, you can not assume they are in one mode or another. If they are in Stealthchop 2 that might be the issue with Klipper. Are you able to configure them as Spreadcycle to see if you get the same issue?

grantp69 avatar Mar 03 '18 19:03 grantp69

Will try!

mitry1974 avatar Mar 04 '18 09:03 mitry1974

Does Klipper support tmc2208 drivers like Marlin? Or I need to write some additional code to initialize and set up drivers via UART?

mitry1974 avatar Mar 04 '18 15:03 mitry1974

Programming via UART is not possible at the moment via Klipper. Was you using Marlin to program them before you setup Klipper?

grantp69 avatar Mar 04 '18 16:03 grantp69

I don't try to progam that drivers yet. I use them "as is". I think - they works in "Stealthchop" mode. But I will try to connect them via UART in Marlin.

But anyway, I don't know how to fing that issue on Marlin - they works fine without UART "from the box".

mitry1974 avatar Mar 04 '18 18:03 mitry1974