• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Resonance, spreadCycle and stealthChop

Scheduled Pinned Locked Moved
Tuning and tweaking
13
85
13.7k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    matt3o @garethky
    last edited by 31 Jan 2021, 08:15

    @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!

    undefined 1 Reply Last reply 31 Jan 2021, 11:01 Reply Quote 1
    • undefined
      engikeneer @matt3o
      last edited by 31 Jan 2021, 11:01

      @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

      E3D TC with D3Mini and Toolboards.
      Home-built CoreXY, Duet Wifi, Chimera direct drive, 2x BMG, 300x300x300 build volume
      i3 clone with a bunch of mods

      undefined 1 Reply Last reply 31 Jan 2021, 11:40 Reply Quote 0
      • undefined
        matt3o @engikeneer
        last edited by 31 Jan 2021, 11:40

        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....

        undefined 1 Reply Last reply 5 Feb 2021, 04:04 Reply Quote 0
        • undefined
          garethky
          last edited by garethky 2 May 2021, 08:41 5 Feb 2021, 03:03

          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! 😹

          undefined 1 Reply Last reply 7 Feb 2021, 20:09 Reply Quote 0
          • undefined
            garethky
            last edited by 5 Feb 2021, 03:20

            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:

            https://www.omc-stepperonline.com/precision-planetary-gearbox/nema-17-stepper-motor-l39mm-gear-raio-101-high-precision-planetary-gearbox-17hs15-1684s-hg10.html

            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.

            1 Reply Last reply Reply Quote 0
            • undefined
              fcwilt @matt3o
              last edited by 5 Feb 2021, 04:04

              @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

              Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

              undefined 1 Reply Last reply 5 Feb 2021, 04:20 Reply Quote 0
              • undefined
                zapta @fcwilt
                last edited by zapta 2 May 2021, 04:22 5 Feb 2021, 04:20

                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'. 😉

                undefined 1 Reply Last reply 5 Feb 2021, 05:39 Reply Quote 1
                • undefined
                  fcwilt @zapta
                  last edited by 5 Feb 2021, 05:39

                  @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

                  Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    matt3o @garethky
                    last edited by 7 Feb 2021, 20:09

                    @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.

                    undefined 1 Reply Last reply 8 Feb 2021, 01:10 Reply Quote 0
                    • undefined
                      garethky @matt3o
                      last edited by 8 Feb 2021, 01:10

                      @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?

                      undefined 1 Reply Last reply 8 Feb 2021, 08:59 Reply Quote 0
                      • undefined
                        matt3o @garethky
                        last edited by 8 Feb 2021, 08:59

                        @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.

                        undefined 1 Reply Last reply 8 Feb 2021, 20:09 Reply Quote 0
                        • undefined
                          garethky @matt3o
                          last edited by 8 Feb 2021, 20:09

                          @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.

                          1 Reply Last reply Reply Quote 1
                          • undefined
                            garethky
                            last edited by 10 Feb 2021, 20:17

                            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 🤷
                            1 Reply Last reply Reply Quote 0
                            • undefined
                              garethky
                              last edited by 10 Feb 2021, 22:50

                              Yep, I was doing it wrong! @DC42 to the rescue:

                              https://forum.duet3d.com/topic/16297/help-needed-with-duet-3-6hc-tmc5160-stealthchop-config/64?_=1612995436610

                              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??

                              1 Reply Last reply Reply Quote 1
                              • undefined
                                garethky
                                last edited by garethky 2 Nov 2021, 07:20 11 Feb 2021, 06:33

                                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 your pwmGradAuto value is 0, 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 😉

                                undefined undefined 2 Replies Last reply 11 Feb 2021, 07:14 Reply Quote 0
                                • undefined
                                  dc42 administrators @garethky
                                  last edited by 11 Feb 2021, 07:14

                                  @garethky, thanks for the update!

                                  Duet WiFi hardware designer and firmware engineer
                                  Please do not ask me for Duet support via PM or email, use the forum
                                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                                  undefined 1 Reply Last reply 11 Feb 2021, 07:21 Reply Quote 1
                                  • undefined
                                    garethky @dc42
                                    last edited by 11 Feb 2021, 07:21

                                    @dc42 thanks! Can you say what T5 in M915 P0 T5 is actually doing?

                                    undefined 1 Reply Last reply 11 Feb 2021, 08:55 Reply Quote 0
                                    • undefined
                                      dc42 administrators @garethky
                                      last edited by 11 Feb 2021, 08:55

                                      @garethky said in Resonance, spreadCycle and stealthChop:

                                      @dc42 thanks! Can you say what T5 in M915 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.

                                      Duet WiFi hardware designer and firmware engineer
                                      Please do not ask me for Duet support via PM or email, use the forum
                                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                                      1 Reply Last reply Reply Quote 0
                                      • gloomyandyundefined
                                        gloomyandy
                                        last edited by 11 Feb 2021, 09:41

                                        @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?).

                                        1 Reply Last reply Reply Quote 0
                                        • undefined
                                          garethky
                                          last edited by garethky 2 Nov 2021, 21:26 11 Feb 2021, 10:39

                                          @gloomyandy I'm using the Duet 3 with the TMC2160 TMC5160

                                          @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:

                                          Screen Shot 2021-02-11 at 2.21.01 AM.jpg

                                          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?

                                          1 Reply Last reply Reply Quote 0
                                          23 out of 85
                                          • First post
                                            23/85
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA