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

    Does M906 set RMS or peak current?

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    6
    46
    8.0k
    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.
    • wilrikerundefined
      wilriker
      last edited by wilriker

      @dc42 I just wrote a little tool in Go to create me the integer required for M569 Cnnnn based on a more human-friendly input. 😉 I used the macros in TMC2660.cpp as a basis but decided to allow only exactly the values as specified in Trinamic's documentation, e.g. 16, 24, 36 and 54 for TBL which should make it a little less brain-twisting when working with their guide. 🙂

      I have to check an issue with motor stall detection on low Y positions first that my today's print spit out a lot but after that I can start looking into CHOPCONF register.

      EDIT: can this value be set live or do I need to set them in config.g and restart?

      Manuel
      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
      with probably always latest firmware/DWC (incl. betas or self-compiled)
      My Tool Collection

      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        You can set the value live.

        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
        • wilrikerundefined
          wilriker
          last edited by wilriker

          @dc42 OK, my results so far: we are already at the more or less best values.

          Test Setup

          Motor: 42SHDC3025-24B

          • Axis: X
          • Step Angle: 1.8°
          • Rated current: 900mA
          • Resistance: 4.4Ohm
          • Inductance: unknown - estimated to 8-10mH
          • Rated torque: 40Ncm

          Motor current set to 400mA with idle current reduction disabled (by setting it to I100)

          Standstill noise is clearly audible and a high pitched sound.


          Results invalid, see post(s) below.

          Results

          Moves

          HSTRT/HEND
          I could get a little bit quieter moves on some circumstances and listening angles/distances when setting HSTRT=5 and HEND=0 (for clarification these are the values that will be put into the macros of the C++ code). But the difference is very faint.

          Standstill

          TOFF
          Regarding standstill noise, I could not find any combination that was quieter. TOFF starting from 8 or 9 up to 15 gets worse with every step but below that they are all about the same, so reducing this from 4 to 2 does not make any audible difference.

          rndtf
          I also tried enabling rndtf but that makes it very minimally worse or equal at best but definitely not better.

          TBL
          Also tried all values of tbl but the current value of 2 already gives best results regarding noise level.


          Any idea what else to test?

          Manuel
          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
          with probably always latest firmware/DWC (incl. betas or self-compiled)
          My Tool Collection

          1 Reply Last reply Reply Quote 0
          • wilrikerundefined
            wilriker
            last edited by wilriker

            @dc42 I only now realized that my X motor nearly does not give off any standstill noise. It were my Z motors I was hearing all the time because I did not disable them while testing. I will need to retest and come back with new results.

            Manuel
            Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
            with probably always latest firmware/DWC (incl. betas or self-compiled)
            My Tool Collection

            1 Reply Last reply Reply Quote 0
            • wilrikerundefined
              wilriker
              last edited by wilriker

              So, this was a rather quick one because currently I have some mechanical squeaking on my Z axis, so I cannot really test movement noises.

              TOFF
              For standstill noise setting TOFF=3 makes a noticable difference towards being more silent and a less annoying frequency. All other values are either equal to a value of 4 or are definitely worse.

              TBL
              TBL=2 is already the best value.

              rndtf
              Enabling rndtf this time makes it noticeably worse.

              Conclusion

              Reducing TOFF to a value of 3 will definitely go into my configuration for Z axis. 😉

              Manuel
              Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
              with probably always latest firmware/DWC (incl. betas or self-compiled)
              My Tool Collection

              1 Reply Last reply Reply Quote 0
              • wilrikerundefined
                wilriker
                last edited by wilriker

                I now also tested all other axes.

                Best values for TOFF per axis:

                • X: 6 (makes it inaudible in standstill)
                • Y: 3 (large improvement)
                • Z: 3 (large improvement)
                • E0: 4 (current default) even though 9 also gives a quite good result

                So it might be interesting to provide a dedicated parameter for TOFF to either M569 or M906 (or maybe M917?) so everyone could work out the perfect values for themselves without having to fiddle around with bitmasks.


                I will have to retest values fo HSTRT/HEND for all axes again tomorrow.

                Manuel
                Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                with probably always latest firmware/DWC (incl. betas or self-compiled)
                My Tool Collection

                1 Reply Last reply Reply Quote 0
                • wilrikerundefined
                  wilriker
                  last edited by

                  I just precalculated all (valid) combinations of HSTRT+HEND for all axes and uploaded 400 macros to the Duet via a remote connection - the UI was clearly never meant to do that. 😂

                  Manuel
                  Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                  with probably always latest firmware/DWC (incl. betas or self-compiled)
                  My Tool Collection

                  1 Reply Last reply Reply Quote 0
                  • wilrikerundefined
                    wilriker
                    last edited by wilriker

                    Another step done:

                    HSTRT, HEND and Standstill Noise

                    I played around with HSTRT and HEND. Main regard here as well was standstill noise.

                    Generally I can confirm my findings above that MSTRT=5, MEND=0 gives best or at least equal noise level except for extruder. For the extruder MSTRT=4, MEND=4 was the best value I could find.

                    General rules found while testing:

                    • MSTRT >= MEND gives least noise
                    • MEND >=8 is usually very noisy and annoying

                    HSTRT, HEND and Movement Noise

                    I only tested X and Z so far regarding movement noise and vibration and also my initial findings for Z stand that MSTRT=5, MEND=0 is equal to very slightly less noisy compared to current default of 3 and 3.

                    For X though I could not find a value that gives less noise on very slow movements than 3 and 3.

                    Basically these settings mainly influence noise level of very slow movements. I usually test them with G1 ... F1 - which is rather unusual for printing except maybe really with Z when Mesh Bed Compensation is active.

                    Manuel
                    Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                    with probably always latest firmware/DWC (incl. betas or self-compiled)
                    My Tool Collection

                    1 Reply Last reply Reply Quote 1
                    • dc42undefined
                      dc42 administrators
                      last edited by

                      Thanks for your excellent work! I've added a TOFF parameter for M569 to the work list for firmware 2.01.

                      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

                      wilrikerundefined 1 Reply Last reply Reply Quote 1
                      • wilrikerundefined
                        wilriker @dc42
                        last edited by

                        @dc42 You're welcome! Was fun to experiment with that a little bit.

                        Having a separate parameter will definitely make the config.g file (or more precisely the M569 commands) a lot more understandable without a comment. 🙂

                        Manuel
                        Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                        with probably always latest firmware/DWC (incl. betas or self-compiled)
                        My Tool Collection

                        1 Reply Last reply Reply Quote 1
                        • wilrikerundefined
                          wilriker
                          last edited by wilriker

                          For Reference

                          @dc42 said in Motor Whine/Loud Movement:

                          Could you provide chopper configuration values for various TOFF values, so that users who only need to change TOFF can try them?

                          Of course:

                          • TOFF=0 -> M569 C65968 (this means motors are off!)
                          • TOFF=1 -> M569 C65969
                          • TOFF=2 -> M569 C65970
                          • TOFF=3 -> M569 C65971
                          • TOFF=4 -> M569 C65972
                          • TOFF=5 -> M569 C65973
                          • TOFF=6 -> M569 C65974
                          • TOFF=7 -> M569 C65975
                          • TOFF=8 -> M569 C65976
                          • TOFF=9 -> M569 C65977
                          • TOFF=10 -> M569 C65978
                          • TOFF=11 -> M569 C65979
                          • TOFF=12 -> M569 C65980
                          • TOFF=13 -> M569 C65981
                          • TOFF=14 -> M569 C65982
                          • TOFF=15 -> M569 C65983

                          You'll have to add at least the Pnnn parameter to specify the motor.


                          I have written a small tool to create the values for the Cnnn parameter that takes into account all possible sub-values:
                          The source code as well as three precompiled binaries for Windows/Linux/Mac AMD64 have been uploaded to https://github.com/wilriker/chopconf-generator (binaries can be found at https://github.com/wilriker/chopconf-generator/releases).

                          There is also some very short usage description.


                          There is now a page at the wiki Reducing Stand-Still Noise.

                          Manuel
                          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                          with probably always latest firmware/DWC (incl. betas or self-compiled)
                          My Tool Collection

                          garisundefined 1 Reply Last reply Reply Quote 1
                          • garisundefined
                            garis @wilriker
                            last edited by

                            @wilriker Thanks for this - another great advantage of having a Duet. I wrote a macro for each motor with 10 seconds at each setting and voila! 2 quiet motors. But I have 4 on a core XY

                            I am using motors recycled from a scrapped old CTC printer. They are way out of David's recommended specs - they are 6 ohms and 9 mH. They now work quietly on X and Y with no apparent problems so even poor spec motors can work, I think. But the extruder motor went berserk (speed and direction both erratic) driving a Zesty Nimble so I quickly purchased a good 20mm pancake.

                            My issue is with the Z motor that as an integrated lead screw which I am hesitating on replacing. Because the 250mm leadscrew has different resonant frequencies none of the TOFF settings silenced it. Perhaps it is not possible? A fallback is to add some damping material around the Z screw near the T nut but that might be inelegant. Any suggestions?

                            wilrikerundefined 1 Reply Last reply Reply Quote 0
                            • wilrikerundefined
                              wilriker @garis
                              last edited by

                              @garis My motors are also not optimal with 4.4 Ohm and 10mH and with my extruder motor I was not able to find a better setting than the default. That said there is no guarantee that you can find a setting that will be silent.

                              I do have silicone dampers on my Z steppers (which I will replace with these standard Nema 17 dampers if I not keep forgetting to order them) and also change my nut to one made from POM/Delrin which also reduced the noise or at least shifted it to a nicer frequency. You could try that.

                              Manuel
                              Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                              with probably always latest firmware/DWC (incl. betas or self-compiled)
                              My Tool Collection

                              1 Reply Last reply Reply Quote 0
                              • Martin1454undefined
                                Martin1454
                                last edited by

                                So, I have been playing around a bit with it - But when I change TOFF from 72 to 69, the sound is a little bit better, but my stall detection/ sensorless homing stops working - @dc42 do you know why this happening?

                                dc42undefined wilrikerundefined 2 Replies Last reply Reply Quote 0
                                • dc42undefined
                                  dc42 administrators @Martin1454
                                  last edited by

                                  @martin1454 said in Does M906 set RMS or peak current?:

                                  So, I have been playing around a bit with it - But when I change TOFF from 72 to 69, the sound is a little bit better, but my stall detection/ sensorless homing stops working - @dc42 do you know why this happening?

                                  I don't. Trinamic has not made the full details of load sensing public, all we know is that it measures motor back emf. I think the back emf can only be measured during the off-time; so maybe it needs a minimum off-time to work.

                                  Have you checked whether you can get stall detection working again by changing the M915 setting?

                                  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
                                  • wilrikerundefined
                                    wilriker @Martin1454
                                    last edited by

                                    @martin1454 I can only say so much that stallGuard is very sensitive to any kind of changes. This means if you change TOFF you probably have to retune stallGuard. It might continue to work without adaption but there is no guarantee it will.

                                    Manuel
                                    Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                                    with probably always latest firmware/DWC (incl. betas or self-compiled)
                                    My Tool Collection

                                    1 Reply Last reply Reply Quote 0
                                    • dc42undefined
                                      dc42 administrators
                                      last edited by

                                      Please note, the TMC2660 datasheet says that the lowest TOFF setting available must not be used with the lowest TBL setting.

                                      I have just implemented a TOFF parameter in M569. I expect to release beta firmware later today or tomorrow.

                                      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

                                      wilrikerundefined 1 Reply Last reply Reply Quote 0
                                      • wilrikerundefined
                                        wilriker @dc42
                                        last edited by wilriker

                                        @dc42 said in Does M906 set RMS or peak current?:

                                        Please note, the TMC2660 datasheet says that the lowest TOFF setting available must not be used with the lowest TBL setting.

                                        All of the values posted above have a TBL setting of 36 which is RRF default and the second highest value for this parameter at the same time.

                                        I will add this restriction to the generator tool though.
                                        EDIT: Done and added a new release.

                                        I have just implemented a TOFF parameter in M569. I expect to release beta firmware later today or tomorrow.

                                        Looking forward to this! 👍

                                        Manuel
                                        Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                                        with probably always latest firmware/DWC (incl. betas or self-compiled)
                                        My Tool Collection

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