Skip to content
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

[bugfix-2.0.x] Layer shift during print with TMC2130 #11577

Closed
dmitry-kutergin opened this issue Aug 17, 2018 · 85 comments
Closed

[bugfix-2.0.x] Layer shift during print with TMC2130 #11577

dmitry-kutergin opened this issue Aug 17, 2018 · 85 comments

Comments

@dmitry-kutergin
Copy link

Description

Layers shifts with the latest bugfix-2.0.x.

Steps to Reproduce

  1. Start printing a part,
  2. After several hours I can see a layer shift

Expected behavior: I should print without layer shifts.

Actual behavior: Layer shift happens, sometimes multiple, mostly in Y direction, but sometimes in X,Y as well.

Additional Information

I use TMC2130 for my X,Y,Z,E0,E1. There was a similar issue with a huge investigation (can not find it now) that resulted in conclusion that the latest bugfix-2.0.x should fix it, apparently it is not. Anyways here are my configs attached.
I tried lowering the speeds, accelerations and jerks, does not seem to help. With 1.1.8 it seemed to work fine with higher speed settings, when I last printed beginning of this year.
It usually happens after 6-7 hours of print, and I ruined a dozen of prints already.

impeller_small

Configuration.h.gz
Configuration_adv.h.gz

@dmitry-kutergin
Copy link
Author

Now trying to print just the top part, since it happens more frequently closer to the top of the print, no issues so far.

@GhostlyCrowd
Copy link
Contributor

I've got the same experience and same driver setup. I've been pulling my hair out. 1 out of ever 3 prints of the same gcode will layer shift on the Y.

I've tried everything mechanical even replacing the stepper motor, belt and the driver. Making sure vref is good and giving it more RMS. And actively cooling the stepper even though it does not get over 45C

@GhostlyCrowd
Copy link
Contributor

Just lost an otherwise beautiful print as i was typing the above to this.

image

@smoki3
Copy link
Contributor

smoki3 commented Aug 18, 2018

I also get some layer shifts with the latest build...

CoreXY,
Trinamic 2130

@larsnordstrom
Copy link

Layershifting can occur for several reason and to pinpoint the exact reason is pretty complex. To begin with:

  • Do the drivers overheat.
  • Do the motors get enough current.
  • Acceleration is too high.
  • Slipping belts.
  • Too tight belts.
  • Homing sensitivity too low.
  • Triggering endstops.
  • Someone bumped into the printer. (The cat...)
  • Hybridthresholds are too low.
  • Printing faster that what your machine can handle.
  • Vibrations.
  • Binding on the bearings.

These are the things I have found affect layershifting in the past year using tmc2130.

@dmitry-kutergin
Copy link
Author

Drivers do show temperature prewarn for x and y. I have active cooling and my current is set to just 900 ma. However prewarn was present with old version as well and it did not have the issue. Anyway making sure motors have enough current and drivers are not overheating are two contradicting points in my case. I will try to raise sensorless homing threshold. Why do you say it is related to hybrid thresholds, how they can trigger layer shifts? I have threshold set to 60mm/s btw. All other points seems to be irrelevant for my case.

@larsnordstrom
Copy link

I found 600-700 to be enough for X/Y, 900 on Z and 450 on E.

I run my hybrid at 130 on X/Y, Z at 10, E at 40.

I’ve found that when thresholds are too low the machine can sometimes run just on the point where it is just about to move over to hybrid. In that case it can act as it does not have enough power for the speed it needs and therefore cause layershifting.

@dmitry-kutergin
Copy link
Author

So essentially you a running in StealthChop all the time? I actually came from StealthChop-only trying to solve the issue. When I set my current limits on 700 for X, Y I can not get even a single layer without skipped steps/layer shifts (my frame is CR-10 mechanically, with 3d printed belt tensioners, and 1.3A stock CR-10 steppers on Y,Z, and cheap 1.7A stepper on X).

@GhostlyCrowd
Copy link
Contributor

Being in stealthchop all the time makes this issue worse for me.

I can safely say its not a mechanical issue for my self Ive even went as far as buying new steppers to try and resolve its. It appears to be a marlin bug with lin adv and stalthchop some say?

I'm going to convert my tmc2130's to run on 24v to see if that solve it as some suggest it does.

@dmitry-kutergin
Copy link
Author

Yes I am waiting for a new steppers as well, also will try to disable "s curve acceleration" and "multi axis interpolation". Also will try with the 1.1.18 version I have from Dec 2017.

@GhostlyCrowd
Copy link
Contributor

S curve enabled or disabled ha not made a difference to me.

@truglodite
Copy link

I solved layer shift by increasing the stallguard threshold to 8 (defaults, I started much lower), and setting current to 550mA. This is on an a8 with stock motors. I was having layer shift at 500mA and below; the lower the current the more often it shifted. So I'd say try upping current and stall thresholds within thermal limits.

@GhostlyCrowd
Copy link
Contributor

GhostlyCrowd commented Aug 20, 2018

Thanks @truglodite I will investigate this change as i had another print fail after 6 hours whilst only in speedcycle mode. SO its not shifting as quickly but still an issue. I have not had a successful print since i flashed the most recent pull from git 3 days ago :/

Before this i was on a pull from March. it had issues but at least i could get some prints done. I might flash back as I really REALLY need to get some parts finished for my new printer I'm building from scratch.
Edit: Well its not stallguard, as i dont use sensorless homing at all.

@GhostlyCrowd
Copy link
Contributor

I'll add i have 1.7A rated steppers now and am giving them 900mA, which is Irms 1.25A i believe so i doubt current is an issue for me.

@cfelicio
Copy link

Oddly enough, I'm also having these weird layer shifts that happen after a few hours, but I'm using A4988.

I got it to happen pretty consistently on a huge D20 I'm trying to print, let me try to flash back to an older release and see if it still happens (so far I was suspecting mechanical or electrical issues with the printer itself).

@dmitry-kutergin
Copy link
Author

Upping currents is not really an option for me, since I am already using 900 mAh, and it already gives me overheat prewarns on TMC2130.

@GhostlyCrowd
Copy link
Contributor

Flashing back has worked for me mostly. The print that would layer shift every time now has printed fine for me flashing back to the compile from a march clone of the 2.0 bugfix.

after i get the parts i need done ill flash back to a current build and do some testing, also going to upgrade the steppers to 24V VMOT.

@cfelicio
Copy link

does the old flash have junction deviation / s curve enabled?

@GhostlyCrowd
Copy link
Contributor

For me no, But nor did the latest flash either. I tried with it on and off.

@GhostlyCrowd
Copy link
Contributor

Alright so after 6 Successful prints in a row after Giving my TMC2130's 24V+ (Now at 35V) I am comfortable saying my random layer shifting issue is finally solved. I am on a current Marlin pull and have hybrid mode enabled and my speeds are 120mm/s travel and 80mm/s print. no shifting at all.

@thinkyhead
Copy link
Member

Finding a balance between adequate current and adequate cooling is quite tricky with TMC2130 drivers. It's especially tough with stepstick-based TMC2130s (as opposed to board-integrated like the Einsy RAMBo), as they don't heatsink very well, and sometimes they're sinked improperly. So having a good airflow over the drivers is essential.

@GhostlyCrowd
Copy link
Contributor

If i had to make a guess it was a combo of stepper heat and torque loss on 12v. less current and more torque on 35V, so less heat naturally. Solved my issues at the very least. My drivers have always been actively cooled and as far as i know I've never triggered a thermal warning on them. :)

@dmitry-kutergin
Copy link
Author

dmitry-kutergin commented Sep 8, 2018

Ok, I think I also overcame the issue myself. I did not raise the voltage (I am running 14V). What I did was disabled S curves, and X,Y interpolation (not sure it matters), and what is more important I changed all my steppers to be at least 1.4 Amps, furthermore I changed my Y motor from 40mm to 60mm motor. Afterwards I set 900mAh current limit for X,Y,Z (was 900,900,800). Although I still see "OT prewarn was triggered" in M122. I did have 3 successful 10 hours prints in a row (which never happened before).
PS, My printer is modified CR-10.

@dmitry-kutergin
Copy link
Author

I tried to raise print speed and jerk a bit (to the values i had on 1.18) and I got a layer shift again.
There were actually multiple layer shifts in a row, all of those appear to be happening on complete layers (after a Z movement to a new layer, not in the middle of the layer).

@truglodite
Copy link

Fwiw, I forgot to mention I am running my 2130's at 20V. That allowed me to drop my current from 700 to 550, and I never get thermal flags (good heatsink and fan setup).

@wtarantul
Copy link

I have the same problem on TEVO Tornado 2.0 (the most relevant for today). With version 1.1.9 there is no such problem. I'm trying to fix the problem for 3 days. There is a solution ?
img_20181104_155642_941
img_20181104_164415_581
img_20181104_164429_785

@dmitry-kutergin
Copy link
Author

My solution is to move to 1.1.8 version. My suspicion is that the issue is somehow related to the tmc2130 library. I noticed layer shifts on 1.1.8 with tmc2130 with versions 2.2+, but it is stable with 2.0.1. I wanted to check the sources of the lib to see what changed there (the behavior of the steppers is definitely different between those two versions, especially at startup), but I did not have time yet.
Another possible solution is to add more torque to the motors by switching to 24v.

@triggad23
Copy link

I can confirm that going back to 1.1.8 and using tmc2130 2.0.1 solves the problem.
Had the the same issues since i upgrade to the latest version with the latest library.
I'm not sure but I think I had the problem too when i compiled the 1.1.7 with the new library. After that i upgraded to the latest 1.x version.

@dmitry-kutergin
Copy link
Author

yes if you have small parts you can have a choice to print slow. But when your part takes days to complete, and you are running all that time 600w worth of heaters to prevent warping, it is reasonable to sacrifice quality a bit, as long as it is only exterior quality, and layer bonding does not suffer, and make it print faster.

@dmitry-kutergin
Copy link
Author

As for 2.0, I would like to try but last time I spend 1.5 months and did not get a single completed print, so as long as it works for me with 1.1.8 until I finish my project I can not afford experiments.

@boelle
Copy link
Contributor

boelle commented Feb 23, 2019

i never compromise on quality, things just take the time they take,

i have some upcoming prints that take 40 hours and i dont speed it up :-D

@boelle
Copy link
Contributor

boelle commented Feb 23, 2019

at least you should edit title to reflext you are using 1.1.8 and not 2.0, just so we dont confuse the dev people :-D

@dmitry-kutergin
Copy link
Author

No actually the title is correct, I was using 2.0.x when it started to happen. Since then I moved 1.1.8 as an only solution I could find for a 2.0.x bug.

@dmitry-kutergin
Copy link
Author

i never compromise on quality, things just take the time they take,

i have some upcoming prints that take 40 hours and i dont speed it up :-D

Good for you. My strategy is different.

@iz3man
Copy link

iz3man commented Apr 24, 2019

My config is a bit different, as my Wanhao seems to have quite weak steppers. So it was 450mA for X,Y and 250 for Z. So there was no sign of overheating, neither the steppers nor the controllers. They are actively cooled and measured 30C at the heat sink.
I set my speed and acceleration to what @larsnordstrom has them:

DEFAULT_MAX_FEEDRATE { 200, 200, 12, 120 }
DEFAULT_MAX_ACCELERATION { 1000, 1000, 200, 5000 }
DEFAULT_ACCELERATION 1250
DEFAULT_RETRACT_ACCELERATION 1250
DEFAULT_TRAVEL_ACCELERATION 1250

Still i get constant layer shifting. Sometimes it takes an hour to appear, but than it's a constant shift. It also is strange, as i have two Z steppers, which seem to behave differently. That leads to a tilted Y axis after some time (really unwanted situation for the hardware).

image

I tried many times, but the result was always the same. Then i turned off STEALTHCHOP in the menu. Sure, the printer was as loud as before, but finished the print w/o any issues at all. That leads me to the conclusion that it's cleary related to stealthchop and NOT the TMC2130 as such?!

@iz3man
Copy link

iz3man commented Apr 24, 2019

Reading all this thread and sawing tmc2130 library mentioned as a possible cause: Would it make sense to downgrade the library from 2.5.0 to 2.0.1? I guess it can't make it worse :)

@larsnordstrom
Copy link

You didn't say what speed you're printing at but you could limit your travel speed in the slicer to 100mms.
Also decrease the jerk settings to about 7-8 on XY and check your belts.
Personally I would think your current is too low, those motors would easily run at 500mah at least with active cooling.

@iz3man
Copy link

iz3man commented Apr 24, 2019

I set the speed to the same values as what you posted. The belts have tensioners on them, and run perfectly fine. Do you mean that they are too loose or too tense? W/o stealchop they run perfectly fine.
Yes, 500mA is very low, but the motors on my Wanhao seem to be very small as well. 1A max.
I did raise the current to 750mA, and this didn't change a thing layer shiftingwise. Raising it to 800mA made it spit out over-temperature warnings.

@larsnordstrom
Copy link

What board are you using?

@iz3man
Copy link

iz3man commented Apr 24, 2019

MKS GEN-L

@larsnordstrom
Copy link

You have a fan cooling the drivers on the board?

@iz3man
Copy link

iz3man commented Apr 24, 2019

They are actively cooled and measured 30C at the heat sink.

@dmitry-kutergin
Copy link
Author

I disabled stealthchop myself many times, it just made printing louder, the layer shifts were still there.

@iz3man
Copy link

iz3man commented Apr 27, 2019

Now i switched to tmc2130 library 2.0.1 (from 2.5.0) but the problem still exists. So we can rule the library out as well. 😕

@larsnordstrom
Copy link

Do you have TMC_DEBUG enabled?
Check for temperature warnings, I know you said they were kept cool but just check if you get any.
From the config I posted above I have changed CHOPPER_TIMING to prusa 24v, E0 steps 16 (0.9mm pancake + Bondtech), E0 500mah.
It's a fine line with these drivers....

Check or try:

  • Motors hot
  • Steppers hot
  • Belts too tight
  • Belts to loose
  • Print too fast
  • Travel speed too high
  • Jerk too high
  • Have the belts slipped from the X-carriage
  • Have the belts slipped from the Y-beltholder
  • Vibrations in the frame
  • Slice with different slicers
  • 24v PSU or overvolt a 12v PSU(not recomended but most 12v can run at 13.5.)
  • Heatsinks on the drivers
  • Heatsinks on the steppers.
  • 80mm fan blowing on the drivers.

@dmitry-kutergin
Copy link
Author

I have my drivers set to 900 mA, and I always had overheat pre-warn messages, no matter whether I put fans to blow directly to them or not, 900 mA seemed to work reliably for several months, even with the pre-warn messages. If I go lower to say 800 or 700 the maximum speed is ridiculously slow. I tried 24v power supply it just made things worse more layer shifts, still pre-warn messages. Went back to 14v, much better. Now I reduced maximum speed to 100 mm/s but boosted acceleration, and it started to layer shift on Y again. So I bought Moons stepper to put on Y, to have a little bit more torque, did not tested yet, will see how it will go.
Still need to finish my linear advance 1.5 refactoring project, to eliminate extruder rattle and stop extruder to excessively retract filament on small fast moves.

@MarioStoilov
Copy link

You can welcome me on the wagon with the shifts.

Using a skr 1.3 and active coolling (one 120mm fan, one 80mm fan and 4 50 part cooling fans blowing directly on each heatsink). Decreasing jerk and acceleration to puny values seems to have some effect (jerk to 5 and accel to 900 and max to 4500). I have 2 printers and moving the board form one to another moves the issue along with it.

Using 12v supply, will try to move to a 24v when I get more parts.

@boelle
Copy link
Contributor

boelle commented Jun 22, 2019

should have bug label

@sschueller
Copy link

sschueller commented Aug 3, 2019

I can confirm the issue as well on my SKR 1.3 in my Ender 3. I had no issues running the ender 3 with an an old trigorila board running TMC2130s without active cooling with the same currents and jerk/accel values.

EDIT: I was able to solve the issue I had with layershifting (4 hours in so far and no issue, only passive cooling of TMC2130, in stealthchop mode) by reducing the current to 760. This guide also has some good information: https://medium.com/@damien.martin.guillerez/skr-1-3-tmc2130-on-a-creality-ender-3-b4ec4abfdfd1

@italocjs
Copy link
Contributor

italocjs commented Aug 5, 2019

@sschueller, i gave up on tmc2130, and started using 2208, i never had any issues with it, it doesnt heat nearly as much as the 2130 and has a bigger current limit.

things i tried (and didnt work)
-more heatsinks
-active cooling (80mm fan directly above it)
-more voltage (tried 12 - 24 - 30 and 35 using a xl6009 step up converter)
-another stepper motor
-different versions of marlin and repetier

Reducing the current and disabling stealthchop was the only thing that helped , but this isnt really a option for me, because i want to print fast and silent. using 500 acceleration was almost doubling printing time, i built my printer to handle about 300mm printing speed (using a volcano hotend)

So, in my opinion, throw those tmc2130 to the garbage and save yourself hours of trouble :(

@sschueller
Copy link

@italocjs The TMC2208 sound great but they don't do sensorless homing. Have you tried the TMC2209?

@italocjs
Copy link
Contributor

italocjs commented Aug 5, 2019

Never tried the 2209, i'll try to get some to test. For me the sensorless homing isnt so important, but the feature to detect lost steps sound really interesting.

@MarioStoilov
Copy link

Just switched to 24v power supply, and the issue is still there

  • 24v supply
  • Snail fans on each driver
  • stealthchop

IMG_20190807_094156

@omahena
Copy link

omahena commented Aug 19, 2019

I am using TMC5160 but perhaps my experience with configuring them may help with the TMC2130 as they are more than a little similar.

Since overheating stepper motors only lower their longevity and possibly precision, I try to lower the current as much as possible. I can attest that it is definitely a bad idea to overheat the extruder stepper as it will soften PLA filament when overeating leading to underextrusion and jamming.

According to Triamic support StealthChop is not intended for very fast motor rotation and should be kept under 1RPS. So SpreadCycle should be used at higher velocities or print speed should be kept in the range for StealthChop.

I wrote some UI controls for OctoPrint remote app to test the minimal current at which the steppers would reliably travel in a diagonal motion without skipping steps. This needs to be done in isolated StealthChop / SpreadCycle motor modes. So first I used the M596 command to do that, then used the G0 to define the "default feedrate", then used various current values to configure the X and Y axis using the M906 command with a slider in the UI. Next G0 motion command was used to traverse the head between the 0, 0 and top, right corner repeatedly.

A good initial current value (for me) would be around half the rated motor current, then search for a lower current value at which the motor still operates flawlessly. In my experience raising the current didn't really help with skipped steps, it just made the motors more hot. For example configuring the steppers at the full current they are rated for, resulted in burning hot steppers after 30min of printing and failed prints.

Perhaps the best mode to perform the test in order to find the best driving current would be SpreadCycle. Once the best current is found, switch to StealthChop and again test at various speeds to see if any steps are missed and at what speed. This value should then be used for the hybrid switch between StealthChop and SpreadCycle.

What is a little confusing in Marlin with the M596 command is how to turn on the Hybrid mode the firmware supports. So I assume that when one uses the M596 command to define either StealthChop or SpreadCycle mode, the hybrid mode is not available until the printer is restarted... Any insight into this would be welcome.

Unfortunately testing like I did, wasn't quite enough to guarantee a perfect print. While the XYZ 2cm test cube printed perfectly for me, an actual print (with fast head transition for OctoLapse) resulted in layer shifts. I fixed that with lowering the HYBRID_THRESHOLD values further.

The final values are still work in progress, but my CR-10 mini values are as follows:
X,Y,Z current: 400mA
E: 500mA (could maybe be lower)
I use 256 native microsteps on all axis to try an avoid any problems with interpolation
X,Y HYBRID_THRESHOLD is currently at 50 mm/s. Again, I am still testing the reliability... But the default 100 mm/s caused skipped steps at high speeds (G0 F9000).

This kind of works for me... For now...

Off topic... But if anyone can suggest how to successfully configure sensorless homing, I am all ears.

@thillRobot
Copy link

thillRobot commented May 10, 2020

I have also been wrestling with this issue recently. I have been able to find a some working settings but it requires keeping my speeds low (<75mm/s) and it does seem touchy.

I thought that the layer shift is happening because of stallguard2 triggering but GhostlyCrowd says it is not. What is the common consensus? Is it stallgaurd? If so collisions and jams are probably causing the layer shifts IMHO but I am never patient enough to watch. It is important to have smooth mechanics with sensorless homing. If collision or jamming is the cause less current seems backwards to me.

From my experience this week it seems to work better with higher stallgaurd2 sensitives and I am only able accomplish this with higher current. Is there a reason to run low current? Steppers can be run at their current rating but they will be hot. I am running 75% of the rated current. In a big machine that heat typically goes into the frame but a 3D printer is different. I would predict the driver would fail far before the motor but it has its own safety features.

I have recently upgraded to 24v and this has not solved the problem. I have also switched to a more powerful fan which has helped I think. I plan on ordering heat sinks for the TMC2130s.

control board: Einsey RAMB0 1.1b (TMC2130)
steppers: LDO-42STH47-1684AC
psu: generic 24v AC-DC (turned up to 24.6v)

homing: sensorless
probe: bltouch

TMC2130 settings (X and Y)
r_sense: 0.22
current: 1000 mA
stallgaurd threshold: 8
stealthchop enabled
hybrid threshold enabled: 60

Summary: TMC2130 + Sensorless Homing + 12/24v can work but it is touchy. The issue seems to be related to overheating of the TMC2130 drivers.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests