TMC2209 and Nema14 tuning / noisy and vibrating
-
Hi guys.
So I'm having a bit of trouble with two Nema14 stepper motors and the TMC2209 drivers. They run loud and vibrate a lot. With the standard settings I was afraid some screws would vibrate loose. The two steppers are for the X and U carriages on my new IDEX build (BCN3D Sigma R16 overhaul). I was able to tune the Z, Y and E steppers without any problems, but those are Nema17. I followed the guide on driver tuning and played around with M569 and M915. But somehow the Nema14s refuse treatment. It's better than the standard settings but still not acceptable. I also looked at the TMC2209 datasheet but 80 pages of not knowing what to look for and not understanding a thing is a difficult combination.
Datasheet Nema 14:
Relevant parts form my config file:; Configuration file for Duet 3 Mini 5+ (firmware version 3.3) ... ; Drives M569 P0.0 S1 ; physical drive 0.0 goes forwards M569 P0.1 S0 ; physical drive 0.1 goes backwards M569 P0.2 S0 ; physical drive 0.2 goes backwards M569 P0.3 S0 ; physical drive 0.3 goes backwards M569 P0.5 S0 ; physical drive 0.5 goes backwards M569 P0.6 S0 ; physical drive 0.6 goes backwards M584 X0.2 Y0.1 Z0.0 U0.3 E0.5:0.6 ; set drive mapping M350 X16 Y16 Z16 U16 E16:16 I1 ; configure microstepping with interpolation M92 X80 Y80 Z1600 U80 E400:400 ; set steps per mm M203 X10000 Y10000 Z1500 U10000 E5000 ; set maximum speeds (mm/min) M566 X750 Y750 Z60 U750 E900 ; set maximum instantaneous speed changes (mm/min) M201 X1000 Y1000 Z200 U1000 E1200 ; set accelerations (mm/s^2) M906 X800 Y1400 Z1100 U800 E650 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S60 ; Set idle timeout ; Motor Tuning ; Z-Stepper M569 P0.0 D3 V2000 ; stealthChop2 on, switch to spreadCycle at 0.2mm/s M915 P0.0 T2000 ; Y-Stepper M569 P0.1 D3 V50 ; stealthChop2 on, switch to spreadCycle at 187.5mm/s M915 P0.1 T50 ; X-Stepper M569 P0.2 D3 V50 ; stealthChop2 on, switch to spreadCycle at 187.5mm/s M915 P0.2 T50 ; U-Stepper M569 P0.3 D3 V50 ; stealthChop2 on, switch to spreadCycle at 187.5mm/s M915 P0.3 T50 ; E1-Stepper M569 P0.5 D3 V100 ; stealthChop2 on, switch to spreadCycle at 18.8mm/s M915 P0.5 T100 ; E2-Stepper M569 P0.6 D3 V100 ; stealthChop2 on, switch to spreadCycle at 18.8mm/s M915 P0.6 T100
Console returns for X and U:
M915p0.3 Driver 0.3: stall threshold 1, steps/sec 200, coolstep 32, action on stall: none M915p0.2 Driver 0.2: stall threshold 1, steps/sec 200, coolstep 32, action on stall: none M569p0.3 Drive 3 runs in reverse, active low enable, timing fast, mode stealthChop, ccr 0x00053, toff 3, tblank 0, tpwmthrs 50 (187.5 mm/sec), pwmScaleSum 9, pwmScaleAuto 0, pwmOfsAuto 36, pwmGradAuto 14, pos 24 M569p0.2 Drive 2 runs in reverse, active low enable, timing fast, mode stealthChop, ccr 0x00053, toff 3, tblank 0, tpwmthrs 50 (187.5 mm/sec), pwmScaleSum 9, pwmScaleAuto 0, pwmOfsAuto 36, pwmGradAuto 14, pos 8
Thanks in advance if anyone knows this stuff and is able to help me.
-
@pxp11 I've had NEMA14 motors with way to high current rating.
I'd try to reduce current to 400-500mA -
@o_lampe
I have tried as low as 400mA, but then there is absolutely no torque left.
I also did some more tests. The noise is amplified by the mechanical resonance of the XU gantry with the first resonance at about 30mm/s and then obviously the multiples 60, 90 and so on. But a little Nema14 should not be exciting the gantry like that. And I mean I got it better with some tweaking so there must be something that could be done. Mostly because the stepper is vibrating like in fullstep mode. I have the exact motor separately and if I plug it in as the X or U motor and hold it in my hand while conducting a speed sweep from 2 to 100mm/s, there is only some audible noise from the motor but it's shaking my hand like a 2$ electric toothbrush. Maybe there is something to be done with input shaping, but I think that's a band-aid solution and won't work because the resonance is a constant and not only an acceleration problem.PS: just had a look at the old BCN3D marlin versions. They drove them at 750mA.
// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
-
@pxp11 what firmware version? Send M115 and post response. RRF defaults to spreadCycle mode in earlier versions of 3.x, but motors will be quieter in Stealthchop mode. You can set the motor so it uses stealthchop when stationary and spreadcycle when moving. To test stealthchop, send
M569 P0.2 S0 D3 V0
This should set the X axis in stealthchop mode. You can adjust the point it changes over to spreadcycle by changing the V parameter.
Ian
-
@droftarts
I just updated yesterday from 3.3 to 3.4.M115 FIRMWARE_NAME: RepRapFirmware for Duet 3 Mini 5+ FIRMWARE_VERSION: 3.4.2 ELECTRONICS: Duet 3 Mini5plus WiFi FIRMWARE_DATE: 2022-09-13 15:14:33
I already tuned for the switchover velocity. It's in the first code window if you scroll down. But I'm wondering if I can change the other parameters of M569 and what effect each of them actually has on the motor performance (T,F,C,B,Y). I hoping someone here already had to do a deep dive once. Because I don't think it's a mechanical problem of the motors or they would not have worked in the original Sigma. I had a look at the BCN3D firmware but I don't know my way around Marlin firmware and where to look for those parameters.
-
@pxp11 there’s a somewhat incomplete page (it’s a complex subject) on stepper driver tuning here: https://docs.duet3d.com/en/User_manual/Connecting_hardware/Motors_tuning
Ian
-
Is it possible to have a running motor, although the coil-wires are mixed up?
Did you check the colours at the connector? There should be black/green on one side and red/blue (in any order) on the other side. -
@droftarts I consulted that but as you say it's incomplete. If there are no standard values it's hard to start somewhere because if it does not work you don't know what value to set it back to. That's why I was hoping someone already had to do this before.
@o_lampe The wires are correct, otherwise the coordinates would all be messed up and this is not the case.
Here are two videos. One with the U axis motor and one with an external stepper (same model). The speed sweep begins at 100mm/min and goes up to 8000mm/min.
!Audio WARNING!In the last video you can really see (and hear) that the stepper is vibrating like crazy.
-
@pxp11 what VIN voltage are you using? I'm guessing you are using 24V; but if you are only using 12V then that might explain the vibration at higher speeds, because those motors have quite high inductance and 12V may not be sufficient to overcome the back emf.
-
@dc42 That's correct I'm using 24V, Fluke says so too. And all the other steppers are whisper quiet.
I don't know if I would just be better off buying new Nema14s but then there's no guarantee that this would solve anything. BCN3D got it working so this has to be one or more of the parameters I was too afraid to change up until now. I just don't really know what the different parameters (except D and V, H is irrelevant for TMC2209 anyway) actually do and what value to set it back to if it gets worse. And I don't want to burn the coils crispy. There is also not a lot of literature and guides for non electrical engineers around which could help me as a novice. -
@pxp11 I'm going to have a look at this issue and try and suggest some settings for you to test.
I think this is somewhat related to the issue of VFAs (Vertical Fine Artefacts) seen in other printers equipped with TMC2209 stepper drivers. It seems VFAs (and, by extension motor vibration) may be caused by the default TMC2209 settings, possibly coupled with motors that are either relatively poorly designed/constructed or have a mid-band resonance that is right on the frequency you want to print at.
This thread https://forum.duet3d.com/topic/29885/fight-vfa has some information about tuning Klipper to eliminate VFAs, and may help with your situation. I'd guess that if you printed, you would see VFAs. I will look at the various stepper driver settings, and convert them into RRF settings.
Let me look into it, and I'll get back to you.
Ian
-
@droftarts Thank you very much. I just finished the XYU offset calibration and will start shortly with some normal test prints. I'll post my results.
-
@droftarts
So I did some test prints and there were VFAs but not as bad as I would have excepted, considering the sometimes absolutely frightening resonance while the X or U axis were moving. It was actually hard to take a picture of them because they were barely noticeable. I don't have any input shaping configured yet. And some slicer settings will definitely be addressed.
I also played around with the StealthChop settings that were suggested in the TMC2209 paper. However I could't notice any impact .So I blindly tested different values for the hysteresis settings, as well as blank and off times. Good news, the motors are still alive. Bad news, I couldn't make out a difference. I got them back to the settings I started off with.
I ordered some new Nema14s. Will be interesting to see if that makes a difference and if it was a hardware problem all along.
-
@pxp11
I had exacly the same issue on my previous printer when pulse duration for motor was too short. It was on different firmware and controller, but maybe the reason is the same...
I can't find way to set it directly, but I think that M569 with B parameter can help. -
@lem
I have tried playing around with the blank time (M569 B) and the off time (M569 F). Between these two and the minimum step puls width (M569 T a:b for TMC2209) I suspect the solution for my problem. However playing around with the T parameter is not easy because it needs to match with the other parameter combination or the control will not accept the change (bad timing error). The only way to analyse all those changes correctly would be to have a readout on a oscilloscope. But I don't have one and wouldn't be able to interpret the results anyway.
I will have at least some clarity on my theory once the new motors arrive and they behave differently or the same. -
I am fighting the same problem: TMC2209 with Nema17, CoreXY printer. At certain speeds (~40mm/s) and its multiples I get strong vibration of the motors. Cleaning up the wiring, tuning the stepper drivers, adding damping motor mounts did not help.
@PXP11
Did exchanging the motors improve anything or have you figured out something else to fix the problem? -
@nie-ls
Yes swapping out the motors did actually help. Totally forgot to close this thread...
Now they are whisper quiet in stealthChop mode as they should be. Searching a problem with the most obvious solution is time not well spent. In your case I would suggest swapping out the motors too. I don't know what was wrong with mine, but I could instantly feel the difference between old and new when turning the drive shaft by hand. No resistance or indexation. Due to the fact that even damper mounts can't help in your case, I would clearly point the finger at your NEMA 17s. If you have an other NEMA17 variant to swap out, try that. Otherwise they are not too expensive, as long as you don't use any special variety. -
-
@PXP11 Hey! What steppers did you end up getting?
-
@noobydp
I got theses ones: aliexpress
They matched the original sigma nema 14 steppers the closest. The manufacturer stepperonline is reputable and also has its own webshop. Depending on where you life and how much time you want to wait on your steppers the webshop ist the better place to order from.