TMCStepper icon indicating copy to clipboard operation
TMCStepper copied to clipboard

Knocking noise when moving TMC2208 (UART) and MKS GEN L

Open michaelsheridan23 opened this issue 5 years ago • 26 comments

This has already been brought up in the Marlin GitHub, https://github.com/MarlinFirmware/Marlin/issues/14183.

Has anyone on this hub seen this issue? Or have a resolution for this issue?

This only occurs with Marlin 2.0.x and the TMCStepper library. With Marlin 1.1.9 and the TMC2208 library the issue does not occur. The current work around is to disable "“//#define MONITOR_DRIVER_STATUS" function. This gets the knocking noise to go away but also disables the ability to utilize the UART features.

michaelsheridan23 avatar Aug 15 '19 11:08 michaelsheridan23

Will you be able to provide test information if I create a branch for you try out which reverts many of the UART changes introduced by TMCStepper? It may not happen today but perhaps during this week.

teemuatlut avatar Aug 15 '19 13:08 teemuatlut

I would be happy to help.

michaelsheridan23 avatar Aug 15 '19 14:08 michaelsheridan23

@teemuatlut have you made any updates you would like me to test?

michaelsheridan23 avatar Sep 03 '19 16:09 michaelsheridan23

https://github.com/teemuatlut/TMCStepper/tree/revert_uart

teemuatlut avatar Sep 04 '19 16:09 teemuatlut

Does this remove the UART capability? Or does it revert it to the old settings? I am not sure, the readme was a little light on details.

michaelsheridan23 avatar Sep 04 '19 16:09 michaelsheridan23

It reverts the read/write methods to what they are in TMC2208Stepper library which is used by Marlin 1.1.9.

teemuatlut avatar Sep 04 '19 16:09 teemuatlut

Thanks for the clarity. Hopefully I will get the chance to try it tonight.

michaelsheridan23 avatar Sep 04 '19 16:09 michaelsheridan23

Unfortunately, the "_revert" files did not fix the issue. There is still a consistent thumbing when moving any axis with TMC2208s and UART Enabled.

michaelsheridan23 avatar Sep 06 '19 01:09 michaelsheridan23

@teemuatlut @michaelsheridan23 Marlin-bugfix-2.0.x_Knocking_recent_30_09_2019.zip Marlin-bugfix-2.0.x_OK_April_2019.zip

I've used Marlin 2.0 already with TMC2208 and MKS GEN L. Same knocking happens after recent update of Marlin - I've added BLTouch so it was an occasion to update whole software package. Last working normally Marlin 2.0 has Marlin.ino dated 13 April 2019.

BTW. After I've started 2 days ago ArduinoIDE it asked me to update libraries so right now I have 0.5.1 TMCStepper version.

The steppers knocking is present only on new Marlin 2.0 with TMCStepper 0.5.1 My old Marling 2.0 with new TMCStepper 0.5.1 works OK So it looks like it's not library dependable issue. All steppers knocks: X, Y, Z

Attached both ZIP packages. I've reuploaded right now the old April package with BLTouch support - no knocking - even if it's compiled using recent TMCStepper library.

jacekk015 avatar Oct 03 '19 22:10 jacekk015

TMC_New-Old_Comparision_1-tmc_util cpp TMC_New-Old_Comparision_2-tmc_util cpp

Took a quick comparison of some of the files using Beyond Compare and these sections look interesting. But honestly I have no idea what I am looking at. Hopefully someone smarter than me can find something more conclusive. These are both from the tmc_util.cpp file, Latest file is on the left and older file is on the right.

michaelsheridan23 avatar Oct 07 '19 17:10 michaelsheridan23

@michaelsheridan23 I've seen solutions saying to disable TMC_DEBUG

jacekk015 avatar Oct 07 '19 20:10 jacekk015

I can confirm with @jacekk015 the April 12, 2019 commit, Tree #57aaa9110b, does not exihibit the knocking noise with the latest version for TMCStepper, 0.5.1. Here are the files configured for my ender 3. Marlin-bugfix-2.0.x - MKSv1 Ender 3 - 2019-04-12.zip

michaelsheridan23 avatar Oct 08 '19 10:10 michaelsheridan23

Thanks. Knowing a specific commit is actually something I can work with and compare the changes in the file where the code is executed. Also knowing the platform narrows things down. If disabling TMC_DEBUG helps the issue, it further rules out parts of the code.

teemuatlut avatar Oct 16 '19 19:10 teemuatlut

@teemuatlut TMC_DEBUG disable don't help anything - just checked myself with downloaded version from 12.10.2019. I probably mistaken TMC_DEBUG with #define MONITOR_DRIVER_STATUS But I can't disable this since my TMC2208 runs on UART. However I can check this personally in a minute. ---edit--- I confirm that disable MONITOR_DRIVER_STATUS repairs everything. But that's not the point to work like this since the hybrid mode will not work. Also current reduction and etc.

jacekk015 avatar Oct 16 '19 20:10 jacekk015

And what about the effects of TMC_DEBUG with monitoring enabled?

teemuatlut avatar Oct 17 '19 04:10 teemuatlut

There’s no effect at all

jacekk015 avatar Oct 17 '19 14:10 jacekk015

I'm also suffering of this problem. Migrated from 1.1.9 to 2.0.0, configs are roughly equivalent but got that knocking noise and a bed leveling weirdness. Spent almost three hours debugging and changing options one by one until discovered that disabling "MONITOR_DRIVER_STATUS" makes the problem go away.

I'm willing to make tests if needed.

token47 avatar Dec 16 '19 20:12 token47

@token47 Without MONITOR_DRIVER_STATUS you can't use hybrid mode. So better stick with the old build.

jacekk015 avatar Dec 16 '19 21:12 jacekk015

I'm not using hybrid mode anyway. I'm using fixed stealthchopv2 on X and Y and spreadcycle on E (Z is still an A4988). But it was nice to have the current, temperature and connection monitoring and be able to see detailed status on M122.

token47 avatar Dec 16 '19 21:12 token47

@jacekk015 so from my understanding, solution for this issue is to migrate to the new board? eg. 32-bit? To have Marlin 2.0 + TMC2208 (and newer).

rjaros87 avatar Dec 16 '19 21:12 rjaros87

@rjaros87 Can't tell you that, since I have a 8-bit MKS GEN L, but that's what they think about here: https://github.com/MarlinFirmware/Marlin/issues/14183

BTW I just stayed with my 2.0.0 April build - it just works.

jacekk015 avatar Dec 16 '19 21:12 jacekk015

Let me take the opportunity to ask two things:

  1. is it expected that SPI boards (like 2209) will not suffer from this issue? They would use hardware SPI and just extra CS pins.
  2. In the specific case of 2208, in my board, it uses sense resistors labeled R100, but in marlin config X_RSENSE is default 0.11 (which would mean 10% more). Anyone else noticed this?

token47 avatar Dec 16 '19 21:12 token47

Driver monitoring isn't required for Hybrid mode. You should match the _RSENSE values in the configuration to your physical hardware. 2209 is UART, not SPI and so has the same limitations as the 2208.

There may be some things that can be adjusted to mitigate the issue but first I would need to know if the issue is with Marlin or with TMCStepper. Both introduce changes that may affect this behavior, but I've looked at the changes on Marlin side and didn't see anything immediately suspicious. Then again, it's also been said here that the issue goes away with an earlier build of Marlin 2.0 but still using the current TMCStepper version.

teemuatlut avatar Dec 17 '19 06:12 teemuatlut

I can confirm it is likely with Marlin. I have tested the April build with the latest TMCStepper and it works fine. However any newer build of Marlin causes the issue again.

michaelsheridan23 avatar Dec 17 '19 13:12 michaelsheridan23

Is there any fix for this problem yet? Except turning off MONITOR_DRIVER_STATUS?

I'm getting that noise on a MKS Robin Nano v1.2 (STM32F1) with 4 TMC2209 stepper drivers. The stepper drivers each get a dedicated pin on the board, where both RX and TX are connected to (UART, software serial).

Turning off MONITOR_DRIVER_STATUS removes the noise, and changing MONITOR_DRIVER_STATUS_INTERVAL_MS also changes the interval of the noise.

I doubt it is helpful, but there is a difference between the two TMC2209s from Fysetc (v2.1) and the two 2209s from Watterott. With the ones from Fysetc the noise is barely audible. You have to listen very closely and know what you're listening for to hear it. With the ones from Watterott the noise is really loud. Both types of 2209s are running in SpreadCycle mode.

Tested with the latest Marlin bugfix version (>2.0.5.3)

Miraculix200 avatar May 15 '20 15:05 Miraculix200

The noise should be only with AVR boards so you'll have to take your issue with whomever made the serial implementation you're using.

teemuatlut avatar May 15 '20 16:05 teemuatlut