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

    external driver "iHSS60" connection-question

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    3
    24
    2.2k
    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.
    • A Former User?
      A Former User
      last edited by A Former User

      cool, on page 12 in the datasheet I found:
      Remark:
      a. t1: ENA must be ahead of DIR by at least 5μs. Usually, ENA+ and
      ENA- are NC (not connected).
      b. t2: DIR must be ahead of PUL active edge by 6μs to ensure correct
      direction;
      c. t3: Pulse width not less than 2.5μs;
      d. t4: Low level width not less than 2.5μs.

      So I guess this means for M569:
      M569 Px R1 T2.5:2.5:6:0 ; driver x requires an active high enable, 2.5us minimum step pulse, 2.5us minimum step interval, 6us DIR setup time and no hold time

      -> What exactly is "hold time" and are the vals in M569 >=/>/=/</<= ?

      dc42undefined 1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @A Former User
        last edited by

        @lb said in external driver "iHSS60" connection-question:

        M569 Px R1 T2.5:2.5:6:0 ; driver x requires an active high enable, 2.5us minimum step pulse, 2.5us minimum step interval, 6us DIR setup time and no hold time

        Correct.

        -> What exactly is "hold time"

        It's the length of time that DIR must remain stable after PUL before it possibly changes in readiness for the following step.

        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

        A Former User? 1 Reply Last reply Reply Quote 0
        • A Former User?
          A Former User @dc42
          last edited by A Former User

          @dc42
          WOW - thanks for the direction to aim for 🙂
          I already thank you so much for really helping superfast your users!

          (guess the exact timing issue is more complicated)

          Last question, let´s assume I understood the drive-order/mapping right for the duet2 with x=0, y=1, z=2, e0=3, e1=4, e2=5, e3=6, ....
          and I got the x&y external motors (equal/same type) hooked up to e2 & e3, the command(s) would be:

          M569 P5 S1 R1 T2.5:2.5:6:0
          M569 P6 S1 R1 T2.5:2.5:6:0
          or is also working something ike:
          M569 P5:6 S1 R1 T2.5:2.5:6:0

          & does it go before or after in my case "M584 X5 Y6 Z2 E3" mapping

          ?

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

            You need to use separate M569 P5 and P6 lines because the M569 syntax does not yet accept multiple P parameters.

            It doesn't matter whether it goes before or after M584. Most users put M569 commands at the start of the motion section in config.g, then M584, then anything else to do with axes and motors.

            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

            A Former User? 1 Reply Last reply Reply Quote 0
            • A Former User?
              A Former User @dc42
              last edited by A Former User

              @dc42
              Thanks so much!
              First I tried with this setting but nothing then the "Alarm"-Led was on... then slightly increased the time-amounts to:
              M569 P5 S1 R1 T2.51:2.51:6.01:0
              M569 P6 S1 R1 T2.51:2.51:6.01:0

              NOW IT WORKS! Yuhuu!

              BUT...
              sadly somehow the step-amount does not correspond to the moved amount in mm...? I double and triple checked all calculations with several approaches for checking in microsteps etc. but always get 83mm instead of 100mm, at least the error is consistent on both axis (x & y both have the external motor) and is also consistend independent of micro-steps-numbers, e.g. same error if set to 1/16 oe 1/256...

              (So question:
              Since my setup has a weired number of microsteps (34 tooth pulley but motor with 1:2 gearing before equals to 34/2="17"tooth pulley on a 2mm-pitch beltdrive with the 200stps-motor set to 256 internal microstepping (51200 m-stps) =ca. 1505,88235294118000000000 mircosteps per millimeter) I assume the error could be a rounding error (?) can the number of (micro-)steps per millimeter given finer then with two digits after the decimal point to avoid those rounding errors on the 700mm long axis...?)EDIT: NO, calculated the total error introduced by rounding to two decimals after point (leaving out 0,00235294118 each mm) is less than 2 microsteps on the 700mm; with 1505,88 microsteps in total per millimeter this is not measurable...

              What else is my error? Has it to do with the timing to the external motor?

              Best, Lucas

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

                It's most unlikely that you will be able to use x256 microstepping using external drivers because of the extended pulse timing needed, unless you accept very slow maximum speeds. I suggest you reduce the microstepping in your external drivers to get a steps/mm of 300 or less.

                Any microstepping you select with M350 is ignored for axes using external drivers.

                M569 T parameters are rounded up to the next available multiple of 1.067 microseconds. So I don't know why those small changes you made had any effect.

                I am surprised you needed to use the R1 option, because the expansion breakout board inverts the enable signal already.

                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

                A Former User? 1 Reply Last reply Reply Quote 0
                • A Former User?
                  A Former User @dc42
                  last edited by A Former User

                  @dc42
                  Thanks for getting back so fast and all your support.
                  Got that already a few posts earlier from you, so M350 since a few days does not define anything here anymore for the external drive - since then when writing in the context of micro-stepping for the external dirves, I mean the micro-steps adjusted via dip-switches on the external-drives, e.g. setting the external motor for 1/256 (51200) microstepping via dip-switches and sending then in config.g "M92 X1505.88 Y1505.88" or putting the dip-switches to 1/16 (3200) and sending "M92 X94,12 Y94,12"

                  BUT on both settings, same error: ca. 83mm instead of 100, & also when using a micrometer I get 0,83mm instead of 1,00mm, so I have a repeatable error independent of microstepping (1/16 or 1/256...) and independent of micro-steps or big steps (0,1mm or 100mm)... but when I use https://www.prusaprinters.org/calculator/ this is what I had to put into it... will try with 0,01 more in the timing and report back 🙂

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

                    Are you certain that the belt is 2mm pitch, that the pulleys have 34 teeth, and the motor gearing is exactly 2:1? It's unusual to have gears in exact ratios like that. Usually the numbers of pulley teeth the gears are two relatively prime numbers.

                    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

                    A Former User? 1 Reply Last reply Reply Quote 0
                    • A Former User?
                      A Former User @dc42
                      last edited by A Former User

                      @dc42
                      🙂
                      That is the same that I thought... scratching my head and checking my e-mails if I ordered something else then what I thought I did... 🙂

                      Belt
                      gates-gt3-powergrip-2mgt (beware this is the gates 3rd gen(?) powergrip belt with 2m pitch meaning 2mm! They are available as 2mgt, 3mgt, 5mgt and 8mgt standing for the pitch in metric (mm) with GT-profile. Do not confuse with other naming conventions as gt3 belts with 3mm)
                      Measured the belt with caliper: 5 pitches are exactly 10mm... (5 pitches with 3mm would have been 15mm - I would have spotted that... 🙂 )

                      Pulleys
                      GPK68MR2090-A-P8-KC90 (68tooth on a 8mm axis)
                      GPK34MR2090-B-P8-KC90 (34tooth on a 8mm axis)
                      (praised by misumi as pulleys for "gates gt3 powergrip 2mgt" belts...)
                      68/34 is 2/1...

                      I am using the same belt and pulleys on the z-axis to sync 2 pieces of tr2-spindles and there all calculation works out perfect... measured the z-axis with a borrowed micrometer: Only when changing directions the error is 0,03mm (slack in the 1830mm long belt), when moving in the same direction the error is less than 0,01mm (can not measure any... 🙂 ) even after 100mm movements 🙂

                      Just tried to give all timings +0.01, did not change anything...
                      What exactly does hold? And could it be the communication-frequency? Datasheet says "pulse frequency max 200K" and "communication rate 57.6Kbps" (but I guess that is for the 232 Serial Communication Interface?)

                      Could that be something?

                      The drive-config in the config.g:

                      ; Drives config
                      ; seems to be: 0=X, 1=Y, 2=Z, 3=e0, 4=e1, 5=e2(exp-pcb:Drv5), 6=e3(exp-pcb:Drv6), ... see https://duet3d.dozuki.com/Wiki/Using_external_stepper_motor_drivers
                      M569 P2 S0 ; Drive 2=Z; S1 = def, only needed when S0
                      M569 P3 S0 ; Drive 3=e0; S1 = def, only needed when S0
                      M569 P5 S1 R1 T2.52:2.52:6.02:0.01 ; the external driver individual timing;
                      M569 P6 S1 R1 T2.52:2.52:6.02:0.01 ; the external driver individual timing;
                      ;
                      M584 X5 Y6 Z2 E3 ; drive mapping - better to USE IT ONLY ONCE, since additional use will not overwrite older definitions...
                      ; M350 MUST BE later then any M584!
                      M350 Z16 I1 ; Config (micro)stepping with(I1)without(I0) interpolation (trinamic microplyer provided only with *16-stepping)
                      M350 E16 I1 ; Config (micro)stepping with(I1)without(I0) interpolation (trinamic microplyer provided only with 16-stepping)
                      ; leave x & y out since external
                      ; z= 400 for fullstep, 400
                      16=6400
                      ; check out https://www.prusaprinters.org/calculator/ for some val-tweaking:
                      M92 X94.12 Y94.12 Z6400.00 E415.00 ; Set steps per mm corresponding to the before defined microstepping
                      ; M92 ; M92 without parameters = Report current steps/mm (since M500 at end of this file saves recalced vals)
                      M566 X300.00 Y300.00 Z0.1 E120.00 ; Set maximum instantaneous speed changes (mm/min)
                      M203 X10000.00 Y10000.00 Z225.00 E1200.00 ; Set maximum speeds (mm/min)
                      M201 X200.00 Y200.00 Z1.00 E200.00 ; Set accelerations (mm/s^2)
                      M906 Z2400.00 E850.00 I25 ; Set motor currents (mA) and motor idle factor in per cent
                      M84 S5 Z E0 ; Set idle timeout with S in seconds, only for internal drives

                      1 Reply Last reply Reply Quote 0
                      • Tytnundefined
                        Tytn @A Former User
                        last edited by Tytn

                        @lb
                        I have the same motors in a coreXY setup and noticed I was getting unexpected movement, redesigned the carriage 3 times to make it more rigid. I was assuming this was where my movement was coming from. Even with a all aluminum design I was still experiencing these movements. Then I noticed one motor was moving slightly more than the other.

                        The key for me was to increase the T parameter to T3.5:3.5:6:0

                        As soon as I did that everything ran smooth as butter, you can barely hear these things running. I am running 128 microstepping on the drives.

                        This slight movement may be whats throwing off your calculations!

                        I will double check my exact T config later if you need it, I am going off memory here but I am almost positive these are the amounts I had in. I know I had to increase them before everything ran smooth and accurately

                        Tytnundefined A Former User? 2 Replies Last reply Reply Quote 1
                        • Tytnundefined
                          Tytn @Tytn
                          last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • A Former User?
                            A Former User @Tytn
                            last edited by A Former User

                            @tytn
                            YUHUU: I OWE YOU A BEER! THAT WAS IT!!!
                            THANKS!
                            (Sh?%$§ datasheet with it´s >2.5val... - HA!)
                            Buttersmooth, almost cannot hear anything 🙂 !
                            Since kinematics (just those optical-endstops need resistors with less ohm) works now I can jump over to start filament-templates! THANKS BOTH OF YOU!

                            Edit: could go down until 3.3, from 3.2 on it had the "old" behaviour; to have security margin instead of 3.3 I put 3.4 in the config.g...

                            Repeatability on both axis even with fast directionchanges <=0.01mm - I am so happy now!

                            Best regards

                            Tytnundefined 1 Reply Last reply Reply Quote 0
                            • Tytnundefined
                              Tytn @A Former User
                              last edited by

                              @lb 👍 happy it worked for you.

                              A Former User? 1 Reply Last reply Reply Quote 0
                              • A Former User?
                                A Former User @Tytn
                                last edited by A Former User

                                @tytn
                                @dc42

                                Question that came to my mind a few days later now:

                                If those motors are defined AFTER (in my case) the Z & E0 that use the internal TMC-drivers from the duet2, the "T3.4:3.4:6:0" for P5 & P6 do not "destroy" the values that are saved for Z & E0 internally that were without T? Just want to be sure, if I have to explicitly put/define T for the internal drives also as soon as an external drive is defined and what would be those values then...

                                Why am I asking:

                                The Gcode-website for M569: "RepRapFirmware only remembers the highest T parameters seen in any M569 command, and applies that value to all drivers for which any nonzero T parameter was specified"

                                ?

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

                                  The M569 T parameters default to zero, so they will be zero for the internal drivers assuming you don't change them.

                                  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

                                  A Former User? 1 Reply Last reply Reply Quote 1
                                  • A Former User?
                                    A Former User @dc42
                                    last edited by A Former User

                                    @dc42
                                    Thanks!
                                    Also thanks for your advise with the maximum obtainable speed related to the microsteppingamount -> Will shoot for something around 200-300 steps per mm then 🙂
                                    Edit: Faster(more/higher) possible micro-stepping for external drives could be a cool feature for the new board you are cooking up, just sayin 🙂

                                    dc42undefined 1 Reply Last reply Reply Quote 0
                                    • dc42undefined
                                      dc42 administrators @A Former User
                                      last edited by

                                      @lb said in external driver "iHSS60" connection-question:

                                      Edit: Faster(more/higher) possible micro-stepping for external drives could be a cool feature for the new board you are cooking up, just sayin

                                      That's likely to be impossible. The step pulse length and step pulse interval needed by the external drivers limit the maximum step pulse frequency. Whereas for the internal drivers, we expect to see an increase in the maximum step pulse rate.

                                      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

                                      A Former User? 1 Reply Last reply Reply Quote 0
                                      • A Former User?
                                        A Former User @dc42
                                        last edited by

                                        @dc42
                                        Ah - learned something. Thanks!

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