-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TMC 2208 drivers are disabled while printing #196
Comments
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. |
I also have a kossel mini pulley version. |
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? |
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. |
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). |
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. |
Confirmed it is a software / firmware issue. |
Maybe Klipper runs the driver 'faster' and they are overheating? |
No, TMC drivers have forced ventilation, heat sinks and are cold to touch. |
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. |
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. |
I use drivers with RAMPS 1.4+ Arduino Mega and Raspberry Pi 3. V ref is .8 volts. |
Are you using jumpers to configure the drivers or have you programmed them via UART? What mode are you using, spreadcycle or stealthchop 2? |
I'm using jumpers, don't connect them via UART yet. |
I have nothing configured or connected. Just plugged the drivers in as they come, i think the default mode is stealthchop 2. |
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? |
Will try! |
Does Klipper support tmc2208 drivers like Marlin? |
Programming via UART is not possible at the moment via Klipper. Was you using Marlin to program them before you setup Klipper? |
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". |
Please set your driver's to run spreadcycle with Klipper and report back on if this makes a difference. |
Hi, If Klipper can't set up drivers via UART, how can I do it? |
You can use a standalone programmer, but that's not straight forward if you don't have one or use the solder links on the steppers. How depends on the type of TMC2208 you bought. Solder link configuration is something the supplier of of the drivers should be able to help with. |
You can use separate arduino |
I was told that i should write here. |
I have drivers from FYSETC - https://ru.aliexpress.com/item/5pcs-TMC2208-Stepping-Motor-Mute-Driver-Stepstick-Power-Tube-Built-in-Driver-Current-1-4A-Peak/32817968874.html?spm=a2g0s.9042311.0.0.IC8XSU I have another arduino, but, as I understand, to check that issue I need to write initialization code in Klipper. If I set up drivers via UART that settings will be undone after power off. So, I need to do them every time I start to print. |
Here, some information on how to do it: mitry1974, the changes you make are saved inside the TMC2208 they will not disappear on power off! I will also try this, once i receive the new TMC2208, because one got burned when the arduino due pins touched the metal frame of the printer :( |
Thank you, will check! |
@mattthebaker - if one has the uart hooked up, my theory is that the problem goes away as long as one sets a reasonable stealthchop_threshold parameter as described in #196 (comment) . Specifically, with a reasonable stealthchop_threshold, my theory is that these quick steps on a direction change would result in an instantaneous switch to spreadcycle mode and then back, which should be harmless. So, I agree that step interpolation may influence the main problem, but once one has uart I think it's possible to avoid the issue without having to change that setting. -Kevin |
@Artem-B Would you care to make a quick guide how to determine the correct PWM_GRAD with an oscilloscope? I'm currently not sure how to wire this up and what to look for. |
It's pretty straightforward. I've bought a current sensor, wired IP+/IP- points in a break in the wire going towards one of the coils and connected oscilloscope between GND and VOUT. Then you can observe the current through the coil during axis movement commands. The absolute value does not matter much. We mostly care about relative current amplitude throughout movement. There are three distinct phases -- acceleration, steady speed, deceleration. Acceleration/deceleration phases are affected by PWM_GRAD. If it's too low, you will see that the current amplitude is noticeably lower than that during constant speed phase. You need to adjust PWM_GRAD so that the current amplitude during acceleration is similar (or, maybe a bit higher) than that during the constant velocity phase. Or you can reduce acceleration which would allow the driver to deliver higher current throughout the acceleration phase. |
Today I found this not to be the case. After enabling and tuning pressure pdvance and a handful of successful prints, I had the extruder driver shut itself off during a print. I don't have stealthchop_threshold configured for the extruder at all, effectively running it in spreadcycle mode.
I was surprised by this and I haven't had any issues with drivers disabling prior to turning on pressure advance. Skimming through the logfile I didn't see any error message. I'll try disabling interpolation as I'm otherwise out of ideas. |
Switched XYZ drivers from TMC2208 to TMC2100, the TMC2208 were hardwired to StealthChop and during test prints the z axis stopped working. There is an discussion on Klipper's Git Repo: Klipper3d/klipper#196 However, TMC2100 set to 16uSteps (256uSteps interpolation) and spreadCycle seems to work fine.
@lekv - there are a number of reasons that a trinamic driver may turn itself off. If you weren't using "stealthchop" then it's not due to this issue. If you see the failure again, you should run DUMP_TMC on the stepper to see if it is reporting an error (such as an over heating event). If you need further assistance, open a separate issue. -Kevin |
Thanks for the feedback @KevinOConnor. I configured the driver to use StealthChop mode and set
Based on the explanation from Bernhard from Trinamic, I imagine this could happen if the extruder changes velocity to quickly when using Pressure Advance (I didn't see this without PA configured):
A subsequent print of the same .gcode file without any changes succeeded. Does that indicate that my issue is different from this one, e.g. overheating? |
@lekv - we'd need the Klipper log file to assist. Please open a separate issue, as it does not appear related to this one. -Kevin |
I am experiencing a similar issue intermittently. I am using Klipper on a Geeetech A20M (GT2560) with TMC2208. When it occurs, the Y stepper stops responding while X and Z continue moving as expected. Moreover, I believe the Y stepper is no longer energized as I am able to push the bed back and forth. The behavior continues until I cancel the print which will issue an M84 disabling the steppers. After this G28 homing works again on all axis. At first I thought it was due to excessive speed or anything else causing the TMC2208 to overheat. However, that cannot be as there is forced cooling and I see that the driver is not hot. After further experimentation, I have found out that simple actions that as rotating the printed object 90 degrees will cause the problem to go away. Please let me know if you need logs and tell me how to get them. I will make sure to collect them the next time it happens. Additional info: the TMC2208 is in legacy mode with 1/16 steps. I believe that uses stealthchop 2 mode. Another evidence that this is not due to overheating is because it does not always happen and it can even print successfully at much higher speeds and over even longer periods of time. When it happens, it is the middle or early stages of the print, after about 20-50 layers. I have also confirmed the driver is not bad by switching it with other axis. The problem seems to be related to the motion or signals on the Y axis. |
This is a known issue with no solution, and it's been documented. You will continue to have print failures as long as you use these drivers in standalone mode. |
Do you know if the new TMC2209 is also affected by this issue? |
I am not sure if the TMC2209 has the same issue; however, the odd thing is that I have tested the same print models with both klipper and marlin 2 and I only see this issue with klipper. I would much rather use klipper as it solves all of my other issues with marlin but this particular issue is a blocker. I am using the same parameters with both as far as I know. Also, why only Y axis? It does not seem to happen with X axis. |
Hi, i use TMC2130 and during delta calibration motors disable randomly, sometime it's ok, sometimes not |
With the merge of PR #2565 it is thought that Klipper will no longer have an issue with the tmc2208, even if the tmc2208 is in standalone mode. -Kevin |
FYI, the updated work around in PR #2597 was merged a week ago. So hopefully this issue is now resolved. -Kevin |
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
The text was updated successfully, but these errors were encountered: