Resonance, spreadCycle and stealthChop
-
@garethky thanks for your reply.
I ran some tests yesterday and the results are not comforting.
On my machine I can run stealthChop up to about 8000mm/m, after that I start losing steps . I can increase the current a little, but I'm testing without an extruder/hotend so the actual speed will be actually lower. I could try nema23 but I bet I would simply get resonance at a different speed.
Switching between stealth to spread is really not an option. I noticed that the switch happens even during acceleration/deceleration and movements become very jerky.
@garethky said in Resonance, spreadCycle and stealthChop:
Its the grease in the linear rails:
I thought about this too. I'm using a hiwin grease which is very thin and it slowly melts into an oil over time... so I would tend to exclude that as the cause of the resonance. But of course it's worth trying. Also the fact that with stealthchop it doesn't happen makes me think that it's something else.
@garethky said in Resonance, spreadCycle and stealthChop:
Maybe running the stepper pulses out of phase
I tried to make the two motors "different" in a multitude of ways. Different currents, backward/forward, playing with spreadcycle variables and trying various M593... but nothing seems to be working. I feel your "unavoidable frame resonance" is the most likely explanation.
Thanks again for your reply, you gave me something to work with.
@alankilian said in Resonance, spreadCycle and stealthChop:
If there's a way for you to add a copper or aluminum bar along your axis and then attack a magnet to the moving part and have them VERY close together with just a tiny gap, I think you'll see dramatic reduction in vibration.
I'll try this right away and report back!
-
@matt3o have you tried using different motors for x and y? Changing the current snd timing might shift the natural frequency a bit, but there's only so much you can do if the physical system is the same. I'm particularly thinking different length motors (so different torque and inertia). Maybe also try a 0.9 and a 1.8 combo?
On the other hand, you may just end up with two natural frequencies...
I'm currently rebuilding my corexy to fix some mechanical issues I found when looking into a very similar issue. One 9f the things I did to try and diagnose the frequency was to print a segmented arc as large as I could, going from pure x to pure y motion in steps of 10deg. Try running it at different print speeds and look for the spacing of the artefacts in the print. If you get them at 45deg at 2/3rds the speed you get in pure x/y, you'll know it is just individual motors resonating (as that will be the same speed for one motor). If not, it is either the two motors interacting, or some other vibration response in your system
-
I tried with strong neodymium magnets and made no difference, I don't know if the problem is the anodized aluminum @alankilian
@engikeneer said in Resonance, spreadCycle and stealthChop:
have you tried using different motors for x and y? Changing the current snd timing might shift the natural frequency a bit, but there's only so much you can do if the physical system is the same. I'm particularly thinking different length motors (so different torque and inertia). Maybe also try a 0.9 and a 1.8 combo?
I have tried with 1 LDO and 1 Moons, both 0.9°, and basically nothing changed. They are very close specs-wise though, so I don't know if that might be the problem.
I haven't tried but I feel like using a 1.8 and a 0.9 would work as the resonance changes quite a bit changing the motor angle... not sure what would be the effect on the print quality. Also there's a chance to get resonance at two different speeds
It's all very frustrating....
-
Throwing a log on the fire for Servos: someone has done it, with a Duet no less:
https://www.youtube.com/watch?v=m6DoKoESPdg
I don't really care about printing a sub 20 minute Benchy. I just want a quiet, high quality Benchy. The Clearpaths are about $250 each. You can run them on 24V, so you wont need an external power supply (they get de-rated but we clearly don't need all that power!). And they run on step+direction control, so no extra boxes are needed.
The only things stopping me are:
- The need for custom mounting brackets to adapt NEMA 23 to NEMA 17
Not having step+direction out of the Duet 3 (maybe I could get around that with some sort of opto-isolation board from the Trinamic Drivers?).There is a tool board for step/direction breakout, the 1XD: https://duet3d.dozuki.com/Wiki/Duet_3_Expansion_1XD- Will linear advance compensate for s-curve acceleration in the servos? i.e. will I get weird extrusion artifacts that I cant fix?
$500 in motors is swatting a mosquito with a laser, but... so cool!
-
I guess the cheap version of this would be using a planetary gearbox at maybe 10:1? If there is some speed below which we get resonance we should just gear the system to always run above that speed. Maybe something like this:
This has an effective step angle of 0.18. So 1/10th a 1.8 degree stepper or 1/5th a 0.9. I dont know exactly what the right values to use are, just throwing out ideas.
-
@matt3o said in Resonance, spreadCycle and stealthChop:
Have you tried using a vibration "finder"? It's like a stethoscope but it has a metal rod that you touch to different parts of the machine.
I have one and it works well for locating the nodes and antinodes.
It might help in your case.
Frederick
-
Around here it's called 'Mechanic's Stethoscope' in case you want to search for it.
The problem with stiff metal structures is that vibrations spread everywhere. There are fancy one with multiple electronic microphones but identifying source of vibration was not as easy as I thought. Had to do a lot of trial and error. Eventually stepper dumpers solve the problem here.
https://www.amazon.com/8MILELAKE-Electronic-Stethoscope-diagnosis-mechanics/dp/B01GFKIKN2
Edit: reminds me, met once a guy that worked at local car dealership and his expertise was 'squeaks and rattling'.
-
@zapta said in Resonance, spreadCycle and stealthChop:
Around here it's called 'Mechanic's Stethoscope' in case you want to search for it.
Thanks. Good to know.
Had to do a lot of trial and error.
Indeed. But I did eventually find the source of the noise - which in my case was caused by cheap bearings.
The one I got was a non-electronic unit - "Lisle 52750 Stethoscope Kit" - less than $20.
Frederick
-
@garethky I was thinking... would better external drivers help? quality stepper drivers are expensive but not expensive as two Clearpaths
@fcwilt thanks for the suggestion, I'll check that out too.
I'm now evaluating the possibility to switch to a corexyuv since I get resonance only when the two motors are interacting together in the corexy.
-
@matt3o said in Resonance, spreadCycle and stealthChop:
@garethky I was thinking... would better external drivers help? quality stepper drivers are expensive but not expensive as two Clearpaths
I think the Trinamic's in the Duet are pretty top of the line drivers, no?
-
@garethky I mean proper stepper drivers... not the 1-chip-embedded drives like trinamic. Gecko drives come to mind ( https://www.geckodrive.com/gr214v-bulletproof-high-resolution-stepper-drive.html ), but there are dozens of them.
-
@matt3o said in Resonance, spreadCycle and stealthChop:
@garethky I mean proper stepper drivers... not the 1-chip-embedded drives like trinamic. Gecko drives come to mind ( https://www.geckodrive.com/gr214v-bulletproof-high-resolution-stepper-drive.html ), but there are dozens of them.
I don't know, maybe? There are a lot of alternatives on the way to servos: better drivers, "better steppers", closed loop steppers etc. I could spend time and money trying all of those out or I could skip straight to the end game and get a conclusive answer.
My vibration/noise happens at constant speeds in long moves. I don't think that focusing on the Acceleration/Jerk/Jounce will fix that. My bet is the motor's physical design has to change to enable smoother operation.
-
I did some investigations today around SealthChop tuning. I found that my machine resonated worst at 55mm/sec. So I have a test that runs a loop around the bed and sweeps from 40mm/sec to 65mm/sec in 5mm/sec increments. There is a HUGE difference between 55 and 60. 55 is a horrible screech and 60 sounds like what you expect from StealthChop.
So one aspect I had ignored until now was auto-tuning StealthChop. Basically, are we even getting StealthChop if we don't do the tuning procedure right? The manual says you have to apply power, enable stealth chop mode, pause for 130ms and than make a medium speed move of at least 8 steps, but ideally 400 full steps. My homing procedure did not do that exactly, so I added this to the end of my homeall.g:
; StealthChop Calibration ; log driver state first M569 P0 M569 P1 ; first toggle between Spread Cycle and StealthChop modes to enter the calibration phase M913 X30 Y30 M569 P0 D2 M569 P1 D2 M569 P1 D3 M569 P0 D3 M913 X100 Y100 G91 ; use relative positioning ; apply current to the motors G1 Y0 F1000 ; dwell for at least 130ms M400 G4 P135 M400 ; move Y by at least 400 full steps. ; The move needs to be made at a "medium speed", I think RPM > 10 G1 Y20 F6000 ; log driver state after M569 P0 M569 P1 G90 ; back to absolute positioning
It did not make any difference at all in the noise in my test. My logs don't show a lot of
tuning
going on vs what already happened via homing:# before Drive 0 runs forwards, active low enable, timing fast, mode stealthChop, ccr 0x08053, toff 3, tblank 1, thigh 16 (234.4 mm/sec), tpwmthrs 16 (234.4 mm/sec), pwmScaleSum 17, pwmScaleAuto 1, pwmOfsAuto 24, pwmGradAuto 0, pos 200 Drive 1 runs in reverse, active low enable, timing fast, mode stealthChop, ccr 0x08053, toff 3, tblank 1, thigh 16 (234.4 mm/sec), tpwmthrs 16 (234.4 mm/sec), pwmScaleSum 15, pwmScaleAuto 0, pwmOfsAuto 23, pwmGradAuto 0, pos 840 # after Drive 0 runs forwards, active low enable, timing fast, mode stealthChop, ccr 0x08053, toff 3, tblank 1, thigh 16 (234.4 mm/sec), tpwmthrs 16 (234.4 mm/sec), pwmScaleSum 17, pwmScaleAuto 1, pwmOfsAuto 24, pwmGradAuto 0, pos 200 Drive 1 runs in reverse, active low enable, timing fast, mode stealthChop, ccr 0x08053, toff 3, tblank 1, thigh 16 (234.4 mm/sec), tpwmthrs 16 (234.4 mm/sec), pwmScaleSum 17, pwmScaleAuto 2, pwmOfsAuto 23, pwmGradAuto 0, pos 840
- I don't understand why
pwmGradAuto
is always 0 - pwmScaleAuto does seem to change, slightly
- I don't understand why
-
Yep, I was doing it wrong! @DC42 to the rescue:
So we need to kill the motor power with
M18
, then make a tiny move.So now I get real tuning values in my logs!!
# (log truncated to make it easy to read) Drive 0 pwmScaleSum 22, pwmScaleAuto 0, pwmOfsAuto 23, pwmGradAuto 22, pos 632 Drive 1 pwmScaleSum 23, pwmScaleAuto 0, pwmOfsAuto 27, pwmGradAuto 19, pos 600
And I can hear the difference! My 55mm/second resonance is gone. Its not gone at every step frequency but its an improvement. @matt3o do you have something like this in your homing script??
-
After some more testing this is a mixed bag. So tantalizing but still imperfect. I tested with different speeds to perform the auto tuning and different move lengths. I tried switching between StealthChop and Spread Cycle at different speeds. And I tried going back to 1.8 degree motors.
With the 0.9 degree motor I found:
- With tuned StealthChop slow moves are pretty much silent
- With tuned StealthChop speeds between about 110mm/sec and 170mm/sec are incredibly noisy. Much worse than Spread Cycle.
- Trying to switch between StealthChop and Spread Cycle at 100mm/sec causes the machine to loose steps.
- The best performance was switching from StealthChop to Spread Cycle at ~57mm/sec. But there were scary "popping" noises near the transition speed that I could not get rid of.
Knowing what I know now, I figure I have never heard tuned Stealth Chop on the 1.8 degree motors, so back on the Tool Changer they went:
- Slow moves are very quiet but with a low pitched rumble that wasn't there with the 0.9's
- Moves in tuned StealthChop above about 180mm/sec screech badly.
- I can tune the cut over from StealthChop to SpreadCycle to a higher speed, ~75mm/sec
- With that setting test sweeps from 50mm/sec to 200mm/sec in 10mm/sec increments don't turn up any objectionable screeching
But (and there is always a but right?) when you print with this setup it becomes apparent that the drivers do the StealthChop/SpreadCycle switch every time there is a hard change of direction. This causes a loud jerk/bang noise which isn't acceptable. Forcing StealthChop for printing works great until there is a rapid move and it screeches.
When it is quiet, its truly quiet, way quieter than it ever was with the 1.8 motors. It is quieter than my Prusa for some moves! The cheap/easy answer then is to run it in StealthChop all the time and limit all moves to a max speed of ~150mm/sec. Maybe put the printer on a big block of foam to damp out the rumble.
This is the script that I'm using. In my HomeAll.g I home X & Y, then run this, then home X, Y, Z, C.
; StelthChop Calibration G91 ; use relative positioning M18 ; cut all motor power M915 P0 T5 ; set coolstep threshold (disables stall detection) M915 P1 T5 ; set coolstep threshold (disables stall detection) M569 P0 D3 H16 V16 ; set stealthChop mode, set tpwmthrs and thigh M569 P1 D3 H16 V16 ; set stealthChop mode, set tpwmthrs and thigh ; log driver state after reset M569 P0 M569 P1 M564 H0 ; disable safe moves ; apply current to the motors G1 Y0.02 F1000 ; dwell for at least 130ms G4 P250 ; For CoreX/Y: move Y by at least 400 full steps, this moves both motors ; The move needs to be made fairly fast G1 Y100 F6000 ; dwell for at least 130ms G4 P250 ; move back to the starting location to speed up homing G1 Y-100 F6000 ; log driver state after tuning M569 P0 M569 P1 M564 H1 ; enable safe moves G90 ; back to absolute positioning
If you run
M569 P0
and yourpwmGradAuto
value is0
, you haven't auto-tuned and you are not getting the benefits of StealthChop.I don't fully understand what
M915 P0 T5
does.T5
should set the Coolstep control register to the value 5 in binary. But I also see documentation saying this is some sort of speed. Leaving it out breaks the tuning.And I'm not saying I won't still put servo's on it... in just doing my due diligence first
-
@garethky, thanks for the update!
-
@dc42 thanks! Can you say what
T5
inM915 P0 T5
is actually doing? -
@garethky said in Resonance, spreadCycle and stealthChop:
@dc42 thanks! Can you say what
T5
inM915 P0 T5
is actually doing?It's rather technical. See sections 5 and 6.7 of the TMC2660 datasheet. Unless you understand what you are doing, I suggest you remove that T5 parameter.
-
@garethky This is very interesting, can you confirm which drivers you are using (5160/2209/2660)? Having recently switched to 0.9 e3d steppers on a CoreXY I'd like to get rid of some of the noise as well!
@dc42 If/when you have have tuned a motor would it make sense to read the tuning values and then set them at startup (rather then tuning each time)? Is it possible with RRF to set all of the required register values (and which ones are they?).
-
@gloomyandy I'm using the Duet 3 with the
TMC2160TMC5160@dc42 removing the T5 parameter breaks the tuning! Nothing I have ever tried worked properly till I tried that suggestion.
WARNING: its smarter me from the future, everything below this line is WRONG! Leaving it here to demonstrate the confusion:
I'm technical . But even better, @Kolbi made a spreadsheet so we can have visual aids:
T5
sets all of the bits related to Stall Guard to 0/off. But it sets SEMIN to 5 or really 160. My guess is that the important part is assigning all the stall guard fields to 0. The value 5 is probably something that should be tuned.My machine config has no other calls to M915 except for the C axis. So there is some voodoo here about writing zeros to that register that I don't see documented in the manual. Maybe its TMC2160 specific?