MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.35k stars 19.26k forks source link

TMC2130 - Printing issues, shifting axis and layers #9368

Closed eLement87 closed 6 years ago

eLement87 commented 6 years ago

Hello togehter,

tl;dr I had problems to get the TMC2130 working. When the Printer is moving in Example the X-Axis from left to right - 0mm to 10mm - than every Step back to 0 cause a shift to right. 0 - 10 - 3 - 15 - 6 - 19 and so on. I don't know if the Steppers are losing steps?! This happends on every Axis. Sorry it's hard to explain in englisch ;) One ore more Layers are okay and then it produce a extremly Layershift. The drivers are getting realy hot even if you drive only 30mm. (Heatsink on every driver and active fan does the job)

img_20180127_132442k

First Things first

Printer: Tevo Tarantula Stepper: Tevo Nema 17 17HD4401-C5.18 1.8° (maybe Busheng 17HD40005-22B, 36Ncm, 1.3A, 2V) Driver: 4x TMC2130 from Watterott Mainboard: MKS 1.4 from Amazon Marlin: 1.1.x (1.1.x Bugfix Branch from 25.01.2018) TMC2130 Library: teemuatlut/TMC2130Stepper 2.1.1

Since i bought the Printer i used the Original Board from Tevo with integrated driver with flashed Marlin. Nevermind in January i watched the YT Video from Tom with the SilentStepStick. So i got myself four TMC2130 Boards from Watterott. In order to get the things working i soldered the Boards and do the requiered stuff in Marlin:

img_20180114_142427

Configuration.h

#define BOARD_MKS_13
//                                      X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 1600, 100 }
#define DEFAULT_MAX_FEEDRATE          { 300, 300, 7, 50 }
#define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 }

Configuration_adv.h

#define HAVE_TMC2130

#define X_IS_TMC2130
#define Y_IS_TMC2130
#define Z_IS_TMC2130
#define E0_IS_TMC2130

#define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
#define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256

#define X_CURRENT          800  // rms current in mA. Multiply by 1.41 for peak current.
#define X_MICROSTEPS        16  // 0..256

#define Y_CURRENT          800
#define Y_MICROSTEPS        16

#define Z_CURRENT          800
#define Z_MICROSTEPS        16

#define E0_CURRENT         800
#define E0_MICROSTEPS       16

pins_RAMPS.h - Changed the Pinmapping for the LCD

#define X_CS_PIN           44 // 53 -> Pin D44
#define Y_CS_PIN           66 // 49 -> Pin D66

All Jumpers beneath the drivers are set.

As i mentiond above the Printer / Axis is not going back to his starting Point. Every Step back (to the left) it gets away from 0. There are several Posts with similar behaviour - #8478 #8967 #8927 But i have no shorts to ground nor a Chinese SilentStepStick. I changed the Current, tighten the Belt and check everything mentioned in the other issues.

Maybe the Mainboard is faulty or the Steppers? I think it's not a mechanical problem, but... i don't know!? With the Stock Mainboard i can't notice this behaviour. Is there something that i forgot?

Thanks and best regards Ben

SpaceCadet-Code commented 6 years ago

This issue also exist with simplify 3D. Currently using a prusa i3 clone with simplify 3d and active cooling on the steppers with the skipping showing after a few layers.

Lyr3x commented 6 years ago

What Kind of steppers? Which settings? (Accel., Jerk, etc)

SpaceCadet-Code commented 6 years ago

The Printer is an anet style straight from china with no labels on steppers below are the settings I am using.

#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 1600, 90 }   // Upgraded to DRV8825 stepper drivers 6/16/17 and had to change this setting    REMEMBER TO CLEAR EEPROM!!!!    { 100, 100, 400, 90 } 

#define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }

#define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 }

#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION  3000    // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION   3000    // X, Y, Z acceleration for travel (non printing) moves

#define DEFAULT_XJERK                 10.0
#define DEFAULT_YJERK                 10.0
#define DEFAULT_ZJERK                  0.3
#define DEFAULT_EJERK                  5.0
Lyr3x commented 6 years ago

Lower your Acceleration please to about 1000. Also you can try to set your x/y jerk to 12 or 15. After that you should check again if everything works fine

wbarber69 commented 6 years ago

I see a lot of info popping up here and there about the correct size and current motors playing a critical role in regards to tmc drivers. What would be the recommended steppers to use with tmc2130 drivers?

Sent from my iPhone

On Apr 28, 2018, at 4:04 PM, Kai notifications@github.com<mailto:notifications@github.com> wrote:

Lower your Acceleration please to about 1000. Also you can try to set your x/y jerk to 12 or 15. After that you should check again if everything works fine

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/MarlinFirmware/Marlin/issues/9368#issuecomment-385205290, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AB7M2sfE6qzzd9MddTpSidB1HwBPySUBks5ttNlHgaJpZM4RvTb_.

Lyr3x commented 6 years ago

So in my experience:

Running my Maschine @3000 acceleration and Up to 200mm/s. Dont have any problems

wbarber69 commented 6 years ago

Thank you

Sent from my iPhone

On Apr 28, 2018, at 6:33 PM, Kai notifications@github.com<mailto:notifications@github.com> wrote:

So in my experience:

Running my Maschine @3000https://github.com/3000 acceleration and Up to 200mm/s. Dont have any problems

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/MarlinFirmware/Marlin/issues/9368#issuecomment-385212523, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AB7M2pogl8L39avKbcI5Mi-utVEq2VLtks5ttPxTgaJpZM4RvTb_.

Lyr3x commented 6 years ago

The biggest Problem i had was really the steppers. While they were rated at .9A they overheated and lost torque

Artem-B commented 6 years ago

This prompted me to look up the specs for the motors I use on my CR-10 w/ 2208. I was somewhat shocked to see how quickly torque drops when the motors are driven by 12V. image

AFAICT at 12V the motor would lose most of its torque at speeds > ~150 RPM -> 2.5 rot/sec -> 100mm/s (20-tooth GT2 pulley).

Higher-amp steppers fare quite a bit better and keep reasonable torque at much higher speeds, which backs up @Lyr3x 's recommendation: image

Lyr3x commented 6 years ago

Thank you for your Tests! This is very helpful :+1:

SpaceCadet-Code commented 6 years ago

Yes lowering the acceleration will work but I was looking for a solution not something to mask the problem.The settings have been the same through 3 different types of steppers (I like trying new things so always try the newest and latest things that come out and this was looking stable so I decided to switch). The other steppers worked fine with these settings.

The actual fix was to disable interpolation and STEALTHCHOP which allowed to print at the same acceleration. I think STEALTHCHOP could be turned back on in hybrid mode but haven't tried that yet.

wbarber69 commented 6 years ago

I recently upgraded my power supply and fans and heaters to 24v as I was informed that my whine during spreadcycle was due to low voltage. But the motors still whine, anything else to look for?

Sent from my iPhone

On Apr 28, 2018, at 8:23 PM, thjubeck notifications@github.com<mailto:notifications@github.com> wrote:

Yes that will work but I was looking for a solution not something to mask the problem.The settings have been the same through 3 different types of steppers (I like trying new things so always try the newest and latest things that come out and this was looking stable so I decided to switch). The other steppers worked fine with these settings.

The actual fix was to disable interpolation and STEALTHCHOP which allowed to print at the same acceleration. I think STEALTHCHOP could be turned back on in hybrid mode but haven't tried that yet.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/MarlinFirmware/Marlin/issues/9368#issuecomment-385217988, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AB7M2hT2SRDPHqDoqIpPI7iluA2uoeLpks5ttRYHgaJpZM4RvTb_.

teemuatlut commented 6 years ago

You would need to do parametrization of spreadCycle to suit your motors. I try to provide some defaults that work but they're likely not optimal and I haven't done more comprehensive look into them when running pure spreadCycle, which I don't personally do. Finding better defaults might be something I could ask Trinamic to help with. However, deciding on suitable chopper parameters is not an easy task as people can have a wide variety of motors with widely different specifications and users don't even run on the same voltage levels. This is not a problem for manufacturers like Prusa who only need the parameters to work with their own hardware where the specs are well known. The spreadCycle parameters to look for would be off time, blank time, hysteresis values (start and end), current values. Possibly some others that I can't think of right now.

Trinamic's application note 001 provides more detail into the parameterization process.

wbarber69 commented 6 years ago

I’m using hybrid mode I should have said. On home I get whining maybe I need to look at something else

Sent from my iPhone

On May 1, 2018, at 7:34 AM, teemuatlut notifications@github.com<mailto:notifications@github.com> wrote:

You would need to do parametrization of spreadCycle to suit your motors. I try to provide some defaults that work but they're likely not optimal and I haven't done more comprehensive look into them when running pure spreadCycle, which I don't personally do. Finding better defaults might be something I could ask Trinamic to help with. However, deciding on suitable chopper parameters is not an easy task as people can have a wide variety of motors with widely different specifications and users don't even run on the same voltage levels. This is not a problem for manufacturers like Prusa who only need the parameters to work with their own hardware where the specs are well known. The spreadCycle parameters to look for would be off time, blank time, hysteresis values (start and end), current values. Possibly some others that I can't think of right now.

Trinamic's application note 001 provides more detail into the parameterization process.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/MarlinFirmware/Marlin/issues/9368#issuecomment-385660842, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AB7M2gJ5Hh5QZ3Vwf-uE2VESS0gNi-5sks5tuFZpgaJpZM4RvTb_.

patternseek commented 6 years ago

I noticed that the last Cura version was generating gcode with travel moves significantly over the speed limits I set in the settings. That's not 'the issue' exactly but it's worth noting that it happens. I hadn't had layer shifts previously (lightly upgraded A8) and then recently started getting them. That's what actually set me on the path that led to an Sbase board and TMC2130s. So I was a little sad to end up with the same problem after replacing most of the printer! Anyway as others have noted, finding a balance between reducing accel, increasing current and cooling and having decent motors all helped.

dammitcoetzee commented 6 years ago

I want to mention that I seemed to be having this problem until I realized I had the wrong rsense value configured. When I changed it to the value recommended for my board this issue went away. Might be worth double checking that yours is correct.

DavidThijs commented 5 years ago

After having had a dozen layershifts in various prints, I cranked up the current, replaced the steppers with higher current, improved cooling, tensioned belts etc... After several tests I concluded that none of this helped a lot and the only solution I had is to disable stealthchop and use spreadcycle. The whining stopped when I went for the other motors.

Artem-B commented 5 years ago

@DavidThijs I had some success improving TMC2208 behavior in stealthchop mode: https://github.com/KevinOConnor/klipper/issues/196#issuecomment-450083777

Basically the trick is to tell the driver to stop attempting to tune the chopper parameters all the time, but rather let it tune the parameters once under controlled conditions, then freeze them and tweak manually, if necessary.

megavolt0 commented 5 years ago

I reverted to the TMC library version teemuatlut/TMC2130Stepper@58f01ad and now everything seems fine and I'm still run Marlin 1.1.8

Hi! What version of library you use? I Have same problem...

I have found. version 2.2.1 work well. And it work softer then 2.5.0....))

One time was OK. But second time - layers was moved((

github-actions[bot] commented 4 years ago

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.