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

Stepper Slaving

Scheduled Pinned Locked Moved
Duet Hardware and wiring
stepper slaving driver tmc2660
3
16
2.5k
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
    SnowCrash
    last edited by SnowCrash 24 Apr 2018, 02:32

    Hi,

    I hope I'm posting this thread under the correct category.

    First, general machine details:

    • Large Custom Delta with Ball Screws (aka Helix Rods) for running the carriages

    • DuetWifi (Duet2 Ver. 1.03) with latest firmware (v1.21)

    • Power Supply: 24V/14.6A

    • 3 x Nema-17 Steppers (2A, 0.9 Degrees, one in each tower) connected to Drives 0 (X-Motor), 1 (Y-Motor) & 2 (Z-Motor) terminals on the DuetWifi

    • Microstepping: x256

    • 3 x Endstops (one on each tower) connected to X-Stop, Y-Stop & Z-Stop terminals on the Duet Wifi

    • 2 x Extruders connected to Drives 3 (E0-Motor) & 4 (E1-Motor) terminals on the DuetWifi

    • 2 x 'filament out' sensors connected to E0-stop & E1-stop terminals on the DuetWifi

    What I'd like to do is add 3 additional steppers to the machine so that each ball screw will be driven by a pair of steppers (one on each end).

    All steppers will, of course, be identical.

    If I understand correctly, the way to achieve this is by 'slaving' each of the new steppers to an existing stepper by mapping 3 unused drivers on the DuetWifi onto the existing drivers.

    Naturally, the 3 new steppers will need to mirror the rotation of the existing steppers so that each pair will spin the ball screws in the correct direction. However, I don't know if this can be done in software or if I'll need to reverse the wires on the new steppers.

    Moreover, I'd like to be able to supply each of the 6 steppers with the maximum amount of current (2A), that is, not to divide the current between the steppers in each pair.

    Lastly, I'm hoping to run all 6 steppers with the TMC2660 drivers to maintain the present level of microstepping (x256).

    My main question in this context is if this is doable with the DuetWifi or would additional hardware be necessary?

    Also, as best I can understand, I'll need to use the M584 command in config.g to setup the slaving structure, but as I'm only starting to get to grips with G-code, any advice on how to do this correctly would be most appreciated!

    Many thanks in advance,
    SnowCrash

    1 Reply Last reply Reply Quote 0
    • undefined
      dc42 administrators
      last edited by 24 Apr 2018, 06:34

      Yes you can do that with a Duet WiFi or Ethernet + DueX5. You can use M569 on individual motors to get them turning in the correct directions. Use the M584 command to us multiple stepper drivers on each tower.

      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 24 Apr 2018, 13:07 Reply Quote 0
      • undefined
        SnowCrash @dc42
        last edited by 24 Apr 2018, 13:07

        @dc42 said in Stepper Slaving:

        Yes you can do that with a Duet WiFi or Ethernet + DueX5. You can use M569 on individual motors to get them turning in the correct directions. Use the M584 command to us multiple stepper drivers on each tower.

        Supplementing the existing DuetWifi with an additional DuetX5 is definitely one way to go about it, but it seems like a serious overkill for the present purpose.

        Would a more minimal solution also work, e.g. hooking-up 3 external drivers to the DuetWifi's expansion connector? Would there be any special requirements for this (software/hardware)?

        1 Reply Last reply Reply Quote 0
        • undefined
          jmjcoke
          last edited by jmjcoke 24 Apr 2018, 13:57

          I think mixing internal TMC2660 with an external TMC2600, on the same screw would invite problems that would be hard to solve. Overkill, maybe, but you will have all the TMC2660 functionality, stall sensing for sensor less homing and using x16 with 256 interpolation on both drives and changes to these features are one gcode line away.

          Joshua Coke

          Trick Laser Metal Max with Smart Effector
          Duet Wifi
          Zesty Nimble
          Mosaic Pallette+
          At work
          Renishaw AM250/400/ RenAM500M/500Q Powder Bed Fusion (Metal 3D Printers)

          undefined 1 Reply Last reply 24 Apr 2018, 15:06 Reply Quote 0
          • undefined
            dc42 administrators
            last edited by dc42 24 Apr 2018, 14:42

            You could add two external stepper drivers to drive the extruders instead. There is some information about doing that at https://duet3d.dozuki.com/Wiki/Using_external_stepper_motor_drivers.

            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 24 Apr 2018, 15:11 Reply Quote 0
            • undefined
              SnowCrash @jmjcoke
              last edited by SnowCrash 24 Apr 2018, 15:06

              @jmjcoke said in Stepper Slaving:

              I think mixing internal TMC2660 with an external TMC2600, on the same screw would invite problems that would be hard to solve.

              Could you please explain what kind of hard to solve problems you're referring to here?

              Have you tried setting this up and run into difficulties?

              From a logical perspective, I can't see a difference if the TMC2660 drivers are sitting on the DueX5 or on a different board - they will be 'external' either way, no?

              @jmjcoke said in Stepper Slaving:

              Overkill, maybe, but you will have all the TMC2660 functionality, stall sensing for sensor less homing and using x16 with 256 interpolation on both drives and changes to these features are one gcode line away.

              I take your point about the advantages, but there are significant drawbacks to consider as well, particularly:

              • cost : £82.5 (before VAT)
              • space: this is a big board and I won't be able to fit it into the machine without considerable modifications to the design.

              Moreover, why do you think a set of 3 x TMC2660 on a breakout board, for example, not offer all the functionality you mention above?

              undefined 1 Reply Last reply 24 Apr 2018, 15:34 Reply Quote 0
              • undefined
                SnowCrash @dc42
                last edited by 24 Apr 2018, 15:11

                @dc42 said in Stepper Slaving:

                You could add two external stepper drivers to drive the extruders instead. There is some information about doing that at https://duet3d.dozuki.com/Wiki/Using_external_stepper_motor_drivers.

                Thanks for the suggestion & pointer, dc42.

                I read this before posting the thread, but I can't see how moving the 2 extruders to external drivers achieve my goal given that I need 3 extra drivers for the steppers.

                Or am I missing something here?

                undefined 1 Reply Last reply 24 Apr 2018, 16:16 Reply Quote 0
                • undefined
                  jmjcoke @SnowCrash
                  last edited by 24 Apr 2018, 15:34

                  @snowcrash the internal communication that the duet has with the drives would not be present with the external drive. Lets say you would like to implement sensorless homing, you cannot change the external drives via a macro to lower the drive from 2000mA to 800mA.

                  Joshua Coke

                  Trick Laser Metal Max with Smart Effector
                  Duet Wifi
                  Zesty Nimble
                  Mosaic Pallette+
                  At work
                  Renishaw AM250/400/ RenAM500M/500Q Powder Bed Fusion (Metal 3D Printers)

                  undefined 1 Reply Last reply 24 Apr 2018, 15:58 Reply Quote 0
                  • undefined
                    SnowCrash @jmjcoke
                    last edited by SnowCrash 24 Apr 2018, 15:58

                    @jmjcoke said in Stepper Slaving:

                    @snowcrash the internal communication that the duet has with the drives would not be present with the external drive. Lets say you would like to implement sensorless homing, you cannot change the external drives via a macro to lower the drive from 2000mA to 800mA.

                    Thanks for the clarification, @jmjcoke, but there's something fundamental I'm still confused about in this context:

                    Based on the documentation mentioned above by @dc42, all the external driver would require is 5 connections, namely: 3.3V, GND, STEP, DIR & EN to work - in other words, there's no mention of a need for communication too.

                    More generally, the 3 x slave steppers will only need to rotate exactly like the 3 x main axis steppers (but in the reverse direction, of course). As best I can tell, there's no need for sensorless homing, endstop configuration, or similar.

                    However, the point you make about changing the drive's current is an important one and needs to be implemented as both the main stepper and slave stepper on each axis will have to operate with exactly the same current level.

                    This is where my understanding gets fuzzy and the reason I started this thread to begin with. Is setting the current level done over SPI? and, if so, will connecting the SPI1 terminals in the DuetWifi's expansion connector to the external TMC2660 provide this functionality? Or is there more to it?

                    undefined 1 Reply Last reply 24 Apr 2018, 16:23 Reply Quote 0
                    • undefined
                      dc42 administrators @SnowCrash
                      last edited by 24 Apr 2018, 16:16

                      @snowcrash said in Stepper Slaving:

                      @dc42 said in Stepper Slaving:

                      You could add two external stepper drivers to drive the extruders instead. There is some information about doing that at https://duet3d.dozuki.com/Wiki/Using_external_stepper_motor_drivers.

                      Thanks for the suggestion & pointer, dc42.

                      I read this before posting the thread, but I can't see how moving the 2 extruders to external drivers achieve my goal given that I need 3 extra drivers for the steppers.

                      Or am I missing something here?

                      No, I lost track of what you were trying to do.

                      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
                      • undefined
                        dc42 administrators @SnowCrash
                        last edited by 24 Apr 2018, 16:23

                        @snowcrash said in Stepper Slaving:

                        This is where my understanding gets fuzzy and the reason I started this thread to begin with. Is setting the current level done over SPI? and, if so, will connecting the SPI1 terminals in the DuetWifi's expansion connector to the external TMC2660 provide this functionality? Or is there more to it?

                        Yes current is set using SPI. In theory you could connect the SPI terminals of external TMC2660 boards to the Duet expansion bus, but I have never done it. You would need to be careful to get good signal integrity because the SPI clock speed is 2MHz and any signal errors could have dire consequences. The TMC2660 boards would need to use 0.051 ohm sense resistors to get the correct current setting.

                        You would also have to modify the firmware to tell it that the drivers connected to the expansion bus are TMC2660s, because unless it detects a DueX2 or DueX5, it will assume that they are dumb step/dir/enable drivers.

                        Btw the DueX5 is designed so that it can be mounted back-to-back with a Duet to save space. Although most users seem to mount them side-by-side.

                        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 24 Apr 2018, 23:25 Reply Quote 1
                        • undefined
                          SnowCrash @dc42
                          last edited by 24 Apr 2018, 23:25

                          @dc42 said in Stepper Slaving:

                          @snowcrash said in Stepper Slaving:

                          This is where my understanding gets fuzzy and the reason I started this thread to begin with. Is setting the current level done over SPI? and, if so, will connecting the SPI1 terminals in the DuetWifi's expansion connector to the external TMC2660 provide this functionality? Or is there more to it?

                          Yes current is set using SPI. In theory you could connect the SPI terminals of external TMC2660 boards to the Duet expansion bus, but I have never done it. You would need to be careful to get good signal integrity because the SPI clock speed is 2MHz and any signal errors could have dire consequences. The TMC2660 boards would need to use 0.051 ohm sense resistors to get the correct current setting.

                          You would also have to modify the firmware to tell it that the drivers connected to the expansion bus are TMC2660s, because unless it detects a DueX2 or DueX5, it will assume that they are dumb step/dir/enable drivers.

                          Btw the DueX5 is designed so that it can be mounted back-to-back with a Duet to save space. Although most users seem to mount them side-by-side.

                          Ah, that's the info I was after! Thanks for the detailed explanation, @dc42!

                          Being a minimalist, I'm very much tempted to create a dedicated PCB for this 🙂

                          Btw, is there a complete schematic and pcb design files for the Duex5 published somewhere like the ones for the DuetWifi?

                          undefined 1 Reply Last reply 24 Apr 2018, 23:39 Reply Quote 0
                          • undefined
                            SnowCrash @SnowCrash
                            last edited by 24 Apr 2018, 23:39

                            @snowcrash said in Stepper Slaving:

                            Btw, is there a complete schematic and pcb design files for the Duex5 published somewhere like the ones for the DuetWifi?

                            Nevermind, found it here

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              SnowCrash
                              last edited by 25 Apr 2018, 00:16

                              @dc42, had a quick look and it seems like the TMC2660 is out of stock everywhere... May I ask where you source them from?

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                dc42 administrators
                                last edited by 25 Apr 2018, 05:15

                                We buy them from Digikey, but we had to wait for our most recent delivery.

                                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 25 Apr 2018, 14:06 Reply Quote 0
                                • undefined
                                  SnowCrash @dc42
                                  last edited by 25 Apr 2018, 14:06

                                  @dc42 said in Stepper Slaving:

                                  We buy them from Digikey, but we had to wait for our most recent delivery.

                                  Thanks @dc42!

                                  Digikey doesn't even have a lead time for the next batch... :-@

                                  I hesitate to ask, but would you perhaps be able to spare 3 units for the sake of this project? I'll be happy to pay you back their cost, of course, as well as open source the design files for the board should any member of the Duet community find them useful.

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