external driver "iHSS60" connection-question



  • Hi,
    I want to connect an "iHSS60-36-30-31" (big 700mm axis) to the official "external expansion breakout board". In the datasheet from "Just Motion Control" they say the "iHSS60-36-30-31" takes 5V or 24V on those pins, so:

    • Is the "external expansion breakout board" working with 5V or 3V3? (I assume if with 3V3 I would give it also a try because it is more than 5/2...).
    • Can I connect the 6 pins directly to the other ones, means "S+/S-/D+/D-/E+/E-" to "PUL+/PUL-/DIR+/DIR-/ENA+/ENA-" becaus in the datasheet it tells me that either with commen cathode should use only the + signals and a common ground, and with commen anode should use only the - signals and a common VCC. Does wiring all + to + and all - to - do the same thing?

    EDIT: Just spotted on page 10 from JMC that "Differential signal" with "S+/S-/D+/D-/E+/E-" to "PUL+/PUL-/DIR+/DIR-/ENA+/ENA-" is also an option. So now it seems I just have to choose. Commen anode/commen cathode would be 2 less wires (ergo a thinner cable) but it seems I have to take either 5V or GND from one of the 2 "Heater"-outputs on the side... is this O.K.?

    Lucas


  • administrators

    You can either use the differential connection, or use a common 5V wire from one of the heater/servo connectors and just use the S-, D- and E- pins from the driver output connectors on the breakout board. Using a common 5V wire provides 5V drive. Using the differential signals provides a little less than 5V but it is still normally sufficient.



  • Thanks so much, opted for the differential-signal setup. Can you give me a last hint, how to setup microstepping:

    • duet is set for this axis to fullsteps -> external driver is set to *16 micro-steps
      or
    • duet is set for this axis to *16 microsteps -> external driver is set to *16 micro-steps

    I think it is the first? Having the duet for this axis in x1 and having the external driver to the microstepping???

    Best regards, Lucas


  • administrators

    When using external drivers, the microstepping set on the Duet is ignored. So don't configure it with M350. Set whatever microstepping you want to use on your external drivers, and set the steps/mm in M92 to be correct for that microstepping.

    Don't forget to use the T parameter in your M569 commands for the external drivers, to extend the step pulse timing.



  • @dc42
    Ah - thanks so much!
    -> So in M350 I leave x & y out (those have the external drivers) and just define z & e0 for the internal drivers
    -> in M92 I define all steppers with desired microstepping, e.g. for x&y 16times microstepping to match/adopt 1:1 to the 16times microstepping on the external driver
    -> in M569 I check with the datasheet to aim for the "needed/wanted" necessary on driverside


  • administrators

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

    in M92 I define all steppers with desired microstepping, e.g. for x&y 16times microstepping to match/adopt 1:1 to the 16times microstepping on the external driver

    In M92 set up the steps/mm for the axes/extruders using external drivers to be correct for whatever microstepping you use on the external drivers. If you change the microstepping switches on the external drivers, you will need to change the M92 steps/mm.



  • 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 >=/>/=/</<= ?


  • administrators

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



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

    ?


  • administrators

    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.



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


  • administrators

    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.



  • @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 ๐Ÿ™‚


  • administrators

    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.



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



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



  • This post is deleted!


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



  • @lb ๐Ÿ‘ happy it worked for you.



  • @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"

    ?


Log in to reply