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.29k stars 19.24k forks source link

[BUG] [Bugfix 2.0.x] TMC2209 + Linear advance = Line stair for the diagonal + vibration #15692

Closed Gerggg closed 4 years ago

Gerggg commented 5 years ago

Description

Since the last update 2.0, the Linear Advance with a K value greater than 0 makes line stair for the diagonal that make the printer vibrate unnaturally.

Borad : SKR 1.3 (CPU : LPC1768) Stepper driver : TMC 2209 (in UART) Stepper NEMA17 0,9°

Steps to Reproduce

1- Set the linear advence with a value of K greater than 0 (0.1 can be a good value) 2- Start printing with a diagonal (45 °) 3- The printer turns into a vibration system 4- If during printing you return the value of K to 0, the vibrations stop.

Additional Information

my config files : Config.zip or : https://github.com/Gerggg/Marlin-for-my-printer

ManuelMcLure commented 5 years ago

Do you know what version did not show the problem? It helps if we can narrow down the changes to a specific time period.

Gerggg commented 5 years ago

@ManuelMcLure I think 1 or 2 weeks... sorry i can not be more specific

Gerggg commented 5 years ago

Despite the transition from K to 0, even if the vibrations are less present, the quality of the prints is far below my usual impressions. so that you can see the difference in quality, I add photos.

Photos.zip

Gerggg commented 5 years ago

@ManuelMcLure I saw that I have archives (on 8 days) of old version, I will recompile them to see from which I have the bug.

Gerggg commented 5 years ago

@ManuelMcLure it's obviously more than a week that the problem is present. I went back to 9 days and he is still present. As I'm not good with git, I reset my fork 9 days ago that's why I do not have the history before ... I think the bug appeared in week 42.

As it is more visible with the linear advance, I printed at 45 ° the attached gcode to test (beware there is a Z offset in the file)

Flash kfacto.gcode.txt

K factor

Gerggg commented 5 years ago

another piece of information, trips are jerky only during impressions. I did a test with the commands G1 X0 Y0 F7200 then G1 X240 Y240 F7200, no vibration.

Gerggg commented 5 years ago

I will test the dev-2.1.x. which seems an old version of the 2.0, I keep you informed

hearnia2k commented 5 years ago

Pretty sure I am getting the same thing here. I am using a download of Marlin from this morning (Oct 30th) I'm on an Anycubic Predator, with SKR 1.3 using TMC2208 drivers with UART enabled. With linear advance I first had issues with no extrusion, solved by adding #define MINIMUM_STEPPER_PULSE 2 however after adding this with linear advance enabled I can see and hear a lot of 'juddering' with the movement, it seems worse at some angles/places on the bed than others. Calibration works smoothly as far as I'm aware, homing also appears smooth.

Gerggg commented 5 years ago

For linear feed, you can solve the problem by adding SQUARE_WAVE_STEPPING and leaving MINIMUM_STEPPER_PULSE disabled. for the "juddering" no solution for the moment ...

BastR commented 5 years ago

A printer I'm working on have the same issue but with another board, config is:

-SKR PRO -TMC 2130 SPI all axis (X, Y, Z, Z2, E) -0.9° steppers

With LA > 0 the printer seems to print "very fast" with sudden movements when printing in diagonal, infill with gyroid seems to print normally With LA = 0, suddens movements are much lower but jerky (see picture) With LA disabled in firmware, all problems have gone.

76620550_611754126234682_8979012157471457280_n

For this printer I used the firmware I have on mine by modifying only some information about the hardware (steps/mm, offsets, etc...). On my printer I don't have this problem with the same build, it's very strange...the main difference between the 2 printer comes from the steppers, mine are in 1.8°.

Gerggg commented 5 years ago

I'm going crazy ... I tested the dev-2.1.x and I still have the problem. I even tested with the dev-2.1.x and TMCStepper v0.5.0 library. the problem is still present.

Gerggg commented 5 years ago

a photo to show the result

20191030_204353

BastR commented 5 years ago

I see you have 0.9° stepper too, I will try to put 8 microsteps and 100 steps/mm instead of 16 microsteps and 200 steps/mm.

Gerggg commented 5 years ago

the SRK is a 32 bit card, it should not have a problem for 16 microsteps. I will test by completely disabling the linear advance to see if I arrive like you to remove the "tremors"

BastR commented 5 years ago

Yes I know, but I'm thinking that marlin 2.0 is still under development and that not all boards are fully supported.

We just tried to put 8 usteps and 100 steps/mm on X and Y with LA enabled, and the problem is gone.

Second try, we return to 16usteps and put 200steps/mm instead of 200.50steps/mm, it works with LA @ 0.09

Third try, we stay @ 16usteps but we change 200steps/mm by 200.49 and it works.

Fourth try, we stay @ 16usteps but we back to 200.50steps/mm, and it works....

I'm a bit lost...

Gerggg commented 5 years ago

@BastR Hmm ... you mean if I go from:

define DEFAULT_AXIS_STEPS_PER_UNIT {160, 160, 800, 806}

to

define DEFAULT_AXIS_STEPS_PER_UNIT {160.5, 160.5, 800, 806}

it should, as for you solve the problem?

hearnia2k commented 5 years ago

@BastR so it sounds like now, you're back on settings you started with, which originally had the issue, yet now it's no longer presenting the problem, is that right?

Gerggg commented 5 years ago

@hearnia2k it seems to me that it has gone from 200 steps/mm to 200.50 steps/mm. No ?

BastR commented 5 years ago

We made a lot of test and yes, we back to 200steps/mm for X and Y with LA enabled and all work correctly

hearnia2k commented 5 years ago

I just ran a test myself here with a settings that yesterday were juddering. I have made 2 changes though:

BLOCK_BUFFER_SIZE 64 - this was changed because for some reason my FYSETC mini12864 v2.1 is not updating properly during prints. I tried setting 32, and it did not help, and nor does 64. My LCD periodically updates, and at other times it is frozen. The print continues as 'normal' while the LCD is frozen though.

SQUARE_WAVE_STEPPING - This was enabled, as suggested by @Gerggg

My print failed, I think I got a missed step, but I don't think it was related; I got a missed step or something I think.

I am curious: Are you guys using Delta printers? I'm wondering if the issue only affects deltas or not.

Gerggg commented 5 years ago

On my side I have a cartesian printer (a flash Tevo very modified)

I come back to the problem, how did you solve it?

hearnia2k commented 5 years ago

Oh, I just realized, I also disabled this MINIMUM_STEPPER_PULSE 2 previously I enabled this to help resolve the issue, but for me it's better with this disabled, and only the SQUARE_WAVE_STEPPING enabled.

Gerggg commented 5 years ago

I wonder if it is not an info stored by the firmware but is not reset to the firmware change. When you install a new version, do you do a default reset or an eeprom init?

hearnia2k commented 5 years ago

I tried several things. Normally an eeprom init, then store, then load failsafe, then store, because I'm paranoid :)

Sent from my Samsung Galaxy smartphone.

-------- Original message -------- From: Gerggg notifications@github.com Date: 31/10/2019 13:06 (GMT+00:00) To: MarlinFirmware/Marlin Marlin@noreply.github.com Cc: hearnia2k hearnia_2k@hotmail.com, Mention mention@noreply.github.com Subject: Re: [MarlinFirmware/Marlin] [BUG] Marlin 2.0 -- Line stair for the diagonal + vibration (#15692)

I wonder if it is not an info stored by the firmware but is not reset to the firmware change. When you install a new version, do you do a default reset or an eeprom init?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/MarlinFirmware/Marlin/issues/15692?email_source=notifications&email_token=AEDB26CXDCMSHXRQ65WXX53QRLJ5TA5CNFSM4JFQMDX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECXWDDQ#issuecomment-548364686, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEDB26CC5JLMNDXL3NCVMADQRLJ5TANCNFSM4JFQMDXQ.

Gerggg commented 5 years ago

Can you specify with what you compile? PlatformIO in VSCode or Atom? Which version of the TMC 0.5.2 libraries?

hearnia2k commented 5 years ago

I compile in Windows, suing PlatformIO in VSCode.
I'm not too sure how to check which TMC libraries.....I barely know how to use VSCode :-) When I start compiling it says it's using TMC librari 0.5.2, yes.

hearnia2k commented 5 years ago

I think I must not have cleared my settings every time, though I was generally clearing as I described if I do that, and try the again it is not behaving the same. However, the juddering/jerky movement is not present, but my extrusion is not working again, which was an issue I faced when first enabling LA.

Extrusion works, if I use Pronterface to heat the nozzle, and then extrude, however, during prints the extrusion does not work.

Gerggg commented 5 years ago

extrusion does not work despite activation of SQUARE_WAVE_STEPPING?

hearnia2k commented 5 years ago

Exactly. I now can’t get any extrusion with LA on, even with SQUARE_WAVE_STEPPING, and I have also tried setting the minimum pulse to 4 now.

For now, I am going to disable LA, and not worry about it, I think.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


From: Gerggg notifications@github.com Sent: Thursday, October 31, 2019 3:30:08 PM To: MarlinFirmware/Marlin Marlin@noreply.github.com Cc: hearnia2k hearnia_2k@hotmail.com; Mention mention@noreply.github.com Subject: Re: [MarlinFirmware/Marlin] [BUG] Marlin 2.0 -- Line stair for the diagonal + vibration (#15692)

extrusion does not work despite activation of SQUARE_WAVE_STEPPING?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/MarlinFirmware/Marlin/issues/15692?email_source=notifications&email_token=AEDB26AJP4VK5MIHQYMOUKTQRL2YBA5CNFSM4JFQMDX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECYGHEY#issuecomment-548430739, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEDB26ETVNUQM7KYNIRGIQDQRL2YBANCNFSM4JFQMDXQ.

Gerggg commented 5 years ago

sorry I forgot but I use MINIMUM_STEPPER_PULSE 4 for my printer: p

you can look my config file (LA disabled)

Configuration_adv.h.txt Configuration.h.txt

hearnia2k commented 5 years ago

Thanks for sending them over. I will take a look tomorrow or next week, and hopefully get things going.

Gerggg commented 5 years ago

the same impression without the LA ... the LA is obviously not yet operational

20191031_202610

boelle commented 5 years ago

LA works fine for me

Gerggg commented 5 years ago

@boelle can you post your configuration?

boelle commented 5 years ago

configuration.h: https://pastebin.com/XRbJfA8G configuration_adv: https://pastebin.com/35bQrF3v

Gerggg commented 5 years ago

yes it's normal that it works for you, the problem seems to be when there are drivers TMC2208 and TMC2209 on the extruder (with the TMC2100 no problem). I do not know about the other drivers.

hearnia2k commented 5 years ago

@Gerggg I've not seen any suggestion it also affects TMC2209? I understood in fact that 2209 would be OK? I guess I'll find out at some point, as I ordered some.

Gerggg commented 5 years ago

@hearnia2k I have TMC2209 and you can find the photos with LA and without the LA by looking at above. But I confirm that the LA worked for a time, I do not find the PR since the LA is working on with the TMC2209.

arminth commented 5 years ago

I ran into probably the same issue today. I had downloaded a snapshot on September 15 2019. I am using it on an Anycubic Kossel Linear Plus with an SKR 1.3, TMC2208 UART on all steppers. Linear Advance k=0.27 and SQUARE_WAVE_STEPPING enabled. I had this version pretty well dialed in and received great prints with no issues on halted steppers anymore. Today, I had the crazy idea, to get an up to date snapshot and transfer my September configuration in the November 4 snapshot. I went through the configurations line by line and put in the relevant values from September. It compiled and flashed perfectly on the machine. Everything looked great. Autocalibration and Bed Leveling went through no problems. Until I started a print. I got terrible vibrations (Printer was humming like a bumblebee when printing). Changing speeds didn't change the vibrations. I stopped the print, reflashed the September 15 version and everything was back to normal. Then I found this issue here which might match the issue I have. So I reflashed the today version to check, if switching off Linear advance stops the vibrations. Did the full setup procedure again (including factory reset for sure, calibration and leveling), started printing, had the vibrations,Extruder stopped moving!!, I switched of Linear advance and the vibrations were much less but the movement (a calibration circle) was very stuttery and unsmooth. Not nice...

I attach the configurations with this post. Hope it helps finding the issue! Cheers Armin

Marlin_conf.zip

Gerggg commented 5 years ago

I have a test with the version of this morning, the problem of LA seems solved ... I post my conf times it is used to someone.

Borad : SKR 1.3 (CPU : LPC1768) Stepper driver : TMC 2209 (in UART) Stepper NEMA17 0,9°

Configuration_adv.h.txt Configuration.h.txt

epicurean70 commented 5 years ago

Hi, I am having this same problem. is this only specific to TMC2208 , TMC2209 drivers for delta printers?

arminth commented 5 years ago

@epicurean70 That could be the case. Maybe, it's better to open a seperate new issue explicitly pointing to Delta, SKRV1.3 and TMC220X. What do you think @thinkyhead ?

hearnia2k commented 5 years ago

@arminth I don't think that makes sense. @Gerggg is using a cartesian and also experienced the issue, so it's not unique to deltas. Also @BastR has an SKR Pro, not an SKR 1.3, although they are similar, it's not as simple as the SKR 1.3, either.

arminth commented 5 years ago

You may be right. Still, this issue has been closed by @Gerggg. So there is no open issue visible...

Gerggg commented 5 years ago

Hello,

I just made an update and I have the same problem again ... one of you know if there may be a cache memory problem that is not properly initality during the firmware flash ?

In any case, while waiting, I turned off the linear advance and as before the problem is gone with.

and I said that I did not touch the configuration but just made an update.

swilkens commented 5 years ago

With K0.35 I can't replicate this on the most recent Marlin 2.0.x-bugifx.

Board: SKR Mini E3 V1.2 (STMF1) Drivers: TMC 2209 (stealthChop) K: 0.35 (first picture) - stable speed for the lines K: 0 -> 1 (second picture) - speed 20 - 50 - 20 using LA patern gen

IMG_20191115_145350

IMG_20191115_150253

Gerggg commented 5 years ago

well, I do not know where the problem is but it seems solved ... I flashed with a firmware without LA and then I flashed with a firmware with LA, I made an M502 and a M500.

the printer works perfectly

arminth commented 5 years ago

I will try today on the delta. Will keep you posted!

arminth commented 5 years ago

Tried it and the result is: There is still a hige vibration on the moves both xy/motion and extruder. Vibration on xy doesn't stop by switching off LA. I think this is a delta issue so I will open a new one. That might be supported by @epicurean70 with some infos on his machine. Cheers Armin

Gerggg commented 5 years ago

@arminth Did you activate the SQUARE_WAVE_STEPPING option? and / or MINIMUM_STEPPER_PULSE 2? I only have the SQUARE_WAVE_STEPPING option enabled.