external drivers understanding



  • Hello, I have a question about the external drivers like Leadshine, M542, DM856, DM860 etc. :
    they support 256 step microstepping for a total of 51200 steps for one stepper rotation. But the maximum pulse frequency is 200 kHz. But 51200 steps with this frequency would mean only about 4 rotations per second as maximum. What is my error in reasoning? I cannot find information in the datasheet.

    TMC drivers seem to have much higher frequencies like 1/(100 ns).



  • high current drivers are very expensive when they are also high speed, these are fairly cheap drivers hence not very fast .. 200kHz input stepping frequency is a norm for low cost drivers (and also for low cost controllers too) so you match the step size with microstepping to get speed and movement you need.

    note btw, that while high microstepping on this drivers allow for slow and steady acceleration allowing for move of heavier load there is no precision in the microstepping on the open loop drivers like dm860 ..



  • @smece
    So did I understand the calculations correctly? The 200 kHz limits to 4 rotations per second or as alternative use less microstepping with higher speed?

    I choose DM860 because the support of maximum 7 A. Maybe I have to switch to TMC drivers with high current MOSFETs. In this specific case it is to drive a DIY tube bending machine.



  • Yes, that is right. With 51200 steps/rotation and 200000 steps per second it takes 0.256sec for a single rotation (or 3.90625 rotations / second). And 200kHz is the limit as min duration for the on period is 2.5usec and off period too 2.5usec so 5usec for a period == 200kHz.

    What can I suggest reeeeeeaaaaly depends on your use case.. It is for start question why you need 51200 steps? If you are trying to get resolution out of it, forget it, you are not getting any better resolution with 1/51200 then you get from 1/16, even worse, as those 51200 steps are not evenly distributed troughout move of a single step but are rather grouped around somepoints, and repeatability does not exist (you are like 5000 steps +- there for repeatability) .. on the other hand, if you have issues moving heavy load, get longer motors 😄 that can deliver more torque, don't rely on microstepping 😄

    Anyhow, for the "cheap mid current drivers" I love the leadshine closed loop ones .. for e.g. I have some experience with 6A HBS57, I don't have enough but so far I love it, on the other thread there's HBS86H, an 8A closed loop driver ... both are iirc 200kHz too but are closed loop so you can expect some precision and some repeatability ..

    As for high speed high current high microstepping drivers, I can't suggest none, not my price range 😞



  • @smece Thanks a lot for all your information!

    For the bending machine it will be best to use full step, to get torque, and probably a gear between. The reason I opened the thread was to understand the settings, thank you for explaining.

    I'll try the HBS drivers, I am on the way to use closed loop anyway with a DIY built optical encoder. I want to use Rasperry camera data as an endstop solution.



  • glad I could help. Check also clearpath, that's made in USA, high quality, good QA .. price is tad higher but if you need to know what you are getting and full support hey are 1000000x better than PRC made stuff ... as these PRC made ones are clones of the clones of the leadshine that's clone of the clearpath so getting to know what you actually purchased, full documentation and support is hard..



  • @smece Thank you for the ClearPath/Teknic recommendation, I'll consider it for CNC usage.

    I have a new question about configuring the external driver: in M569 documentation about the T parameter "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." Does it mean, when one of the drivers is very slow (e.g. direction hold time), all others are set to this slow values? Do you know the reason and whether this is still true for RRF3 / Duet3?



  • Does it mean, when one of the drivers is very slow (e.g. direction hold time), all others are set to this slow values?

    I think yes.

    Do you know the reason

    I did not look at the stepper generator code in RRF but I have some experience writing this code and making this value different for every output can make it overcomplicated and CPU consuming. Also, AFAIK RRF limitation is that all axes use always the same type of driver (for step/dir is not too important but different SPI registers for different drivers are not supported) so it's impossible with such architecture to have those timings different. Again, no clue how the stepper generator that runs a number of axes in sync is actually running but often there is a loop at a certain speed that runs them all at once making having different properties very hard. I'm pretty sure RRF2 is NOT doing it like that as I read somewhere that max stepping rate of Duet2 is "300kHz if you are driving just one motor", and the "just one motor" part implies that more motors drops this max speed so the step generator is probbly implemented in some other fashion. Now this is a bunch of guesses, you really need @dc42 to answer this as afaik he's the one writing the thing 😄

    and whether this is still true for RRF3 / Duet3?

    The board is IMO irrelevant here, only the firmware is important. RRF3 introduced an RTOS so in theory axes can run as separate parallel tasks. Dunno if I'd do it like that (pretty sure I wouldn't) nor I have a clue what @dc42 did with RRF3 and stepper generator, but theoretically - it is possible, practically I doubt so.... for start the MCU selected for Duet2 is not some super turbo mega one (weird choice if you ask me, I'd go with STM32, probbly cortex m7 or even some cortex A# but I'm not the one writing the firmware and those that do have my full support to chose whatever they feel comfortable with 😄 ) so loading the main loop with this is probbly not happening in RRF3 too .. again, guessing, I might be totally off 🙂 .. I'm interested at what will @dc42 write 🙂


  • administrators

    @smece said in external drivers understanding:

    As for high speed high current high microstepping drivers, I can't suggest none, not my price range

    How about Duet 3 ?



  • @smece Thank you for your information, the handling of frequencies and synchroization was my first guess also. I asked for Duet3, because he uses a new CAN bus and may have added possibilites to address different drivers/motors.

    @dc42 I know Duet3 will solve most use cases. The used TMC5160 is great.



  • @dc42 said in external drivers understanding:

    How about Duet 3 ?

    • AFAIK duet3 use TMC open loop drivers and there's no closed loop support in RRF3. Correct me if I'm wrong
    • I can't recommend a driver I never used, even recommending leadshine and clearpath is bordering acceptable as I have rather limited experience with them (own one leadshine and experimented for ~100hours with it, and used one clearpath for a week) but Duet3 I never had a pleasure to even touch 🙂
    • Isn't Duet3 still in beta testing phase, final board is not out yet?

    Now I'm really curious to how much I missed the target on my assumptions on the timing limitation 😄


  • administrators

    @smece said in external drivers understanding:

    AFAIK duet3 use TMC open loop drivers and there's no closed loop support in RRF3. Correct me if I'm wrong

    That's correct - for now.

    Isn't Duet3 still in beta testing phase, final board is not out yet?

    We shipped about 90 pre-production Duet 3 main boards in September. A much larger batch is currently in manufacture and available for pre-orders at https://www.duet3d.com/Duet3Mainboard6HC, expected to ship in late November.



  • @dc42 said in external drivers understanding:

    We shipped about 90 pre-production Duet 3 main boards in September. A much larger batch is currently in manufacture and available for pre-orders at https://www.duet3d.com/Duet3Mainboard6HC, expected to ship in late November.

    congrats! that's way past "beta" 😄 cool.


Log in to reply