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.14k stars 19.2k forks source link

[BUG] TMC2209 with LDO 0.9 VERY noisy/resonant/vibratory #18286

Closed freighttt closed 3 years ago

freighttt commented 4 years ago

Ive got a strange issue with a new printer im settting up. i have a set of tmc2209's, on a 24v corexy.

the original 1.8 motors are louder than they should be, but i didnt think much of it. this week i installed a set of LDO 0.9 steppers, and they vibrate so hard that the x gantry sings. they arent missing steps, the printer operates fine, theres just insane resonance, even at low speeds. i spent the last 3 days working on the frame, replacing belts, went through marlin systematically and turned on and off every setting i could think of(LA, square wave, etc). i played with microstepping numbers, voltages, etc, to no avail. i had reached the end of my sanity when i decided to stick the steppers on another machine i have, running 2208s. suprise...smooth as butter.

another thing to note is that turning stealthchop on and off results in less vibration, but not lower noise. stealthchop is actually where most of the noise and vibration comes from, with it off there is less vibration(but still tons) and the 'r2d2' sounds are pretty pronounced. i do not use hybrid threshold, but have tested it on and off when i went through the various options systematically testing them(and combinations of them).

im positive now that this is something wrong with my build, not the motors themselves. in doing some online research, i see some people mentioning issues with PWM? Beyond config/config_adv im pretty lost with coding. i thought id ask here before i go randomly messing with stuff. the video this gent posted sounds pretty similar to what im experiencing.

https://github.com/teemuatlut/TMCStepper/issues/82

i feel this may be a bug because the same motors do not have this problem on a different machine. the vibration can be felt when just holding the motor in your hand, without it being connected to anything or under stress, and again on the other machine the same motor, being fed the same voltage and step count, feels like butter. that leads me to believe this is marlin/tmc not getting along. this resonance/vibration is experienced with both 1.8, and 0.9, however, 0.9* exacerbate the issue.

My Configurations

Required: Please include a ZIP file containing your Configuration.h and Configuration_adv.h files. Marlin-2.0.x.zip

Steps to Reproduce

  1. begin print.
  2. machine sounds like chewbacca
  3. enable/disable stealth chop
  4. similar but chewbacca has taken xanax and has calmed down a little with stealthchop off
  5. systemically test and eliminate settings like linear advance, square wave, etc
  6. still chewbacca
  7. install rubber dampers anywhere that vibration could be amplified
  8. han solo, please take your dog back, i dont want him anymore

Expected behavior: [What you expect to happen]

normal levels of stepper noise and vibration

Actual behavior: [What actually happens] video: imgur.com/a/ZEBlkVX

Logo2001 commented 4 years ago

@freighttt Did you activate SPREAD? Set also the Stepper to 256 Microsteps and the correct Current in configurations_adv.h (// @section tmc_smart)

freighttt commented 4 years ago

@logo2001 what do you mean by spread? spreadcycle? i currently have hybrid threshold off so they run either in stealthchop or spreadcycle only.

i currently have it set to 16 microsteps, should i increase it to 256 so the driver doesnt interpolate itself?(is that how it works?)

i will try setting the current via the firmware vs lcd and saving to eeprom.

Logo2001 commented 4 years ago

@freighttt Yes, i mean Spreadcycle. In your Case - Marlin give Steps out for 16 Microsteps. If Spread not activ, the stepper run with 16 microsteps only. On my mainboard I have to set a jumper to activate the spread function of the TmC2209 !!! Which Board you are using? You can also try to deactivate Stealthchop & Hybrid to check is Spreadcycle possible/available.

Logo2001 commented 4 years ago

one more question: which Stepper Driver and Version with TMC2209 do you have?

freighttt commented 4 years ago

@Logo2001 i am running BTT 2209 v1.2 on a BTT skr1.3

yes i have them running in spreadcycle, it is the only way to run them smoothly. unfortunately i run a small printing business and i have to run the machine, hopefully this issue isnt causing damage to the motors. it almost feels like a poor signal, but it is worse on stealthchop to where its not usable. spreadcycle is at least smooth enough that it doesnt seem to cause damage to the print. i would assume it was the drivers themselves but when i plug them into another machine, or the motors into another machine running 2208s, everything is silent and operates as it should. i have tried new fresh firmware, with no luck. i also tried and older version to no avail.

here i have found another thread with people having the same issue just last month in may. https://reprap.org/forum/read.php?415,852017,873784#msg-873784

Marlor commented 4 years ago

Did you remember to reset your eeprom after the adjustment of steps/mm and speed? Your max speed is halved and steps are double

freighttt commented 4 years ago

@marlor steps have been doubled. i wasnt aware that speed needed to be halved, 0.9's should have enough torque to handle normal print speed, but i will try dropping the feedrate to 250. am i understanding you correctly though?

even in stealthchop with the horrendous noise, they dont miss steps at 65mm/s, and in spreadcycle they dont have any issues with my current feedrates or acceleration.

Logo2001 commented 4 years ago

I don't understand how you can switch it around when you need soldering on the back... Spread_Jumper

Logo2001 commented 4 years ago

only when the jumper is removed, the software can set stealth Chop, Spread Cycle and Hybrid It is preset on your drivers and you cannot change it by software. It is written in the manual. It might confuse the drivers. But I have not tested the differences. Fact is that in Stealth Chop Mode my steppers (1,8°) are also loud.

freighttt commented 4 years ago

Y’all have lost me now.

BTT 2209s on an skr1.3 do not require any soldering to operate as standard with full uart control through the lcd provided your jumpers are correct.

My jumpers are correct and I can alternate between spread cycle and stealthchop through the lcd with a push of the button. There is an audible change in motor noise to confirm this. When operating correctly, they would be significantly quieter in stealth chop. In my case, the grinding noise goes away when placing them in spreadcycle, but they don’t get any louder than they already are. Stealthchop is as loud as spread cycle, though the tone and noises are different.

Most easily the difference can be demonstrated by switching between the modes at idle. With stealth chop on, there is no noise at idle with motors enabled, whereas with stealthchop there is some white noise that is audible if held close to your ear. It is under operation that stealth chop seems to send a ‘dirty’ signal causing the motors to be extremely loud and resonant, even when held loose in your hand, despite the motion being seemingly okay.

Logo2001 commented 4 years ago

my statement was not entirely accurate. I should finish reading the datasheet :) see picture. My setup definitely runs pure Spread Cycle. (Jumper to VDD) Spread2

Logo2001 commented 4 years ago

i have tested with M569 and its says "Stealth Chop mode" on all axis. I no longer understand the world. Stealthchop is commented out in Marlin config and the Jumper "Spread" on the MB is switched to VDD (measured). hmmm very suspicious

freighttt commented 4 years ago

@Logo2001 there is no spoon man

laurienzu commented 4 years ago

I have exactly the same problem as you!!! I switched to Marlin on my Sapphire Pro in order to enable UART mode on my new ERYONE TMC2209 drivers but I have some coil whine noise also when motors are not moving. The noise reduces when I disable StealthChop but starts again when motors are running... I tried everything (chopping time, lowering or increasing current) and it's impossible to remove, it only disappear in standalone mode so using the drivers not in UART 🙁 It's exactly as you described, motor works and moves correctly without missing steps but I don't want to have a singing printer (belts resonates a lot propagating the sound). I hope someone can help us, I would like to use these drivers at the maximum potentialities.

Logo2001 commented 4 years ago

@Loreagle please upload your Config and adv.h files. I want to see if I can find something for you and freighttt.

laurienzu commented 4 years ago

@Logo2001 Thank you for your help :) I'm using Marlin version from @le3tspeak that is modified and pre-configured for my printer (sapphire pro) but the problem source is related to TMC drivers configuration in my opinion. As I said when I use it in standalone the problem totally disappear and drivers are extremely silent, in UART, disabling StealthChop, noise reduces when motors not running but when running this terrible white noise at high frequency come again... Configuration_adv.h.txt Configuration.h.txt

Maybe this problem is related to chopper parameters that are not adequate to my motors/drivers combo, I found this file to calculate them but I don't really know right values to put in. TMC2209_Calculations.xlsx

freighttt commented 4 years ago

@Logo2001 there are one or two people on discord in the trinamic section, who are also experiencing the same issue. they just popped in this morning to say they too feel that their motors have gotten louder recently.

Portzal commented 4 years ago

I have just fitted E3D 0.9 degree steppers, I don’t think They are running as quite as the 1.8’s I replaced. There doesn’t seem to be a big difference in noise when swapping between Stealthchop and SpreadCycle either. I was on 2.0.5.3, then yesterday updated to the latest bugfix 2.0.x No change in the amount of noise in Stealthchop.

freighttt commented 4 years ago

@Portzal do you mind sharing your motor specs/rough print speeds?

Portzal commented 4 years ago

@freighttt I have tried different speeds from 100mm/s to 40mm/s, I would say noise increases with speed. I am on a Bigtreetech SKR V1.4 Turbo with Bigtreetech TMC2209’s, I tried increasing and decreasing current from 950 to 1100. No noticeable improvement. I have it set to 950 at present. Steps, 160. Micro steps, 16 Motor specs, https://e3d-online.dozuki.com/Document/FY6IQwcZVcDccZ5Q/Compact_But_Powerful_Datasheet.pdf

Logo2001 commented 4 years ago

@Loreagle please try to change the microsteps in adv.h from 16 to 32 or 64 on the axis you want. (X+Y?) Also update your config.h for the correct steps/mm. (X+Y?) Please Report. thx microsteps steps_mm

laurienzu commented 4 years ago

@Loreagle please try to change the microsteps in adv.h from 16 to 32 or 64 on the axis you want. (X+Y?) Also update your config.h for the correct steps/mm. (X+Y?) Please Report. thx microsteps steps_mm

Ok I will try to change microsteps! Can I try also 256? 80 Steps/mm for X and Y are correct, is a coreXY printer...

Logo2001 commented 4 years ago

No, when you change to 32 Microsteps the steps per mm will double. 80 -> 160. @ 64 microsteps 320 steps per mm and so on. @ 256 microsteps 1280 Steps per mm Take care, 256 microsteps basic setting needs a lot of CPU Resources. may be SD Card Read is no longer possible :) when you have a 32bit system u can try the basic setting raise up in acc to your final print speed the tmc220x interpolate from your basic to 256 automaticaly. normaly

laurienzu commented 4 years ago

Uh okay thanks, so I will try with 32 first and 160steps/mm :)

laurienzu commented 4 years ago

@Logo2001 Can this be related to our problem? image

And what about this defines for Serial1, they should be decommented? (default are commented) image

Logo2001 commented 4 years ago

maybe, i dont know. find it out :)

Logo2001 commented 4 years ago

regarding hardware-serial: i have looked in your board MKS_Robin_Nano.h at my place (Marlin 2.0 bugfix) I don't have these #defines with me. Adapted from let3speak ?

laurienzu commented 4 years ago

regarding hardware-serial: i have looked in your board MKS_Robin_Nano.h at my place (Marlin 2.0 bugfix) I don't have these #defines with me. Adapted from let3speak ?

Yes is adapted from let3speak but I tried and it doesn't work with those lines decommented.

Btw I made a video to show you the noise: https://youtu.be/TCpenqh1t78 The repetitive noise like a metronome is due to #define MONITOR_DRIVER_STATUS, when I disable it that sounds go away but the background noise remains (I don't know if it's possible to hear it).

Logo2001 commented 4 years ago

please deactivate #define Monitor_driver_status and make the video again. It´s not possible to hear out the noise. thx

laurienzu commented 4 years ago

Ok I'm so sorry, I correct my message about this because I have just found something : image

When those 4 lines are uncommented I have totally NO noise also with StealthChop enabled! (when I tried before it was not working because I had motor disconnected -.-). But there is another problem occurring: motors does not move correctly, If I move X about 10mm also Y is moving so I think we have to ask to @let3tspeak for that!

I will try to compile original marlin and see what happens!

Logo2001 commented 4 years ago

yes, right. but I am happy about the way forward

laurienzu commented 4 years ago

Wait, there is no UART mode on original Marlin for Robin Nano ahah :(

freighttt commented 4 years ago

@Loreagle it sounds like the issue you’re having is different from the one in question, though maybe they are connected?

laurienzu commented 4 years ago

@freighttt I don't know, the noise is as described so maybe something is wrong with UART mode. I just tried software UART instead of hardware and it's the same :(

Logo2001 commented 4 years ago

Question to the round: Is it possible that the DEactivated #Stealth Chop is active and vice versa? So the opposite? My printer is loud (rumbling, hissing) with #Stealth Chop enabled and very, very quiet with #Stealth Chop disabled.

freighttt commented 4 years ago

@Logo2001

Yes, it is possible to switch between the two. Stealthchop enabled us very very quiet at idle. In motion extremely loud, gritty, resonant. Stealthchop off is hissy at idle, and loud but smooth in motion.

Volume is the same between both modes in motion, but stealthchop introduces a very gritty and resonantly signal/motion/whatever. During printing you can cycle between the modes to toggle on and off the vibration and resonance.

Logo2001 commented 4 years ago

please make a test on your printer. at idle make a M569 in TFT-Terminal. which mode is activ?

freighttt commented 4 years ago

@Logo2001 drivers report as they should in correspondence with turning stealth chop on and off on the lcd

Here you can see each the same motor plugged into two different printers. Same voltage and steps, both on stealth chop. I’m sure you can tell which is the issue, but the one held in my hand is the problem machine, the one with it sat on a glass plate is the working machine. I also removed the driver from the problematic machine, plugged it into the working machine, and achieved the same silent result. https://imgur.com/a/z6D2kc7

thinkyhead commented 4 years ago

For those experiencing unusual vibration, please revert to earlier commit dates and run a quick test on each in order to determine the exact day where the problem first appears. Remember to send M502, M500 to Reset EEPROM and reboot again before testing each date.

laurienzu commented 4 years ago

I'm starting to think that my problem is related to my drivers, other people with same printer and other brand drivers doesn't have any noise issue!

Logo2001 commented 4 years ago

@Loreagle Stupid question: You removed the MS jumpers on the TMC Slots from the mainboard?

laurienzu commented 4 years ago

@Loreagle Stupid question: You removed the MS jumpers on the TMC Slots from the mainboard?

For software UART yes, for hardware UART I used jumpers to select the correct address

Logo2001 commented 4 years ago

ok, fine

freighttt commented 4 years ago

@thinkyhead

i tested 2.0.4.4 last night. i will continue rolling backwards. i must admit i dont know any faster way than to move my configs over manually using meld, so its a slow process.

Portzal commented 4 years ago

@thinkyhead I have a 2.0.3 build, if I get the time I will try it out today.

Portzal commented 4 years ago

@thinkyhead 2.0.3 did not seem to produce any positive results. There is still very little difference between StealthChop and SpreadCycle as far as stepper noise goes.

freighttt commented 4 years ago

@Portzal I also rolled tmcstepper back to 0.5.2 without improvement.

laurienzu commented 4 years ago

@freighttt I received this feedback from @let3tspeak but I didn't try yet. He said to try with this setting and software UART.

https://github.com/le3tspeak/Marlin-2.0.X-MKS-Robin-Nano/commit/1e859d163589300ff12207cf677044eafda36e0b?fbclid=IwAR35RjZDeN_dFOlDX4QYxyhLl29jrD8cNgOVitcuKsFJPKJ12A-fWlNXDDE#diff-237285c047dad808f73698c139144e1aR352

freighttt commented 4 years ago

@Loreagle i am not using an mks Robin

laurienzu commented 4 years ago

But if you use the drivers in standalone mode you have noise?