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

Closed Loop Motor Setup

Scheduled Pinned Locked Moved
Duet Hardware and wiring
13
61
6.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
    dc42 administrators @Toastinator
    last edited by dc42 20 Mar 2021, 20:15

    @Toastinator said in Closed Loop Motor Setup:

    During Prints there is a Continuous Layer Shift Indicating to me that Moves are not Finishing before starting the Next.

    That usually means that one of the last two T values is too low for your driver. Low cost step servo drivers are often very slow to respond to direction changes. The manual you linked to did not specify the required timings, other than 200kHz maximum step pulse frequency.

    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 20 Mar 2021, 20:18 Reply Quote 0
    • undefined
      Toastinator @dc42
      last edited by Toastinator 20 Mar 2021, 20:18

      @dc42 Thanks! I have Tried Numbers Varying up 500.

      T5:5:50:250 And So On, How High is TOO High? 1000? 10000?

      I Will keep Playing with Timing Keep Checking back

      Edit: The Stupid Manual is not much of a manual. I saw the Step Pulse Frequency, But not Direction Setup time and Hold Times

      undefined 1 Reply Last reply 20 Mar 2021, 20:19 Reply Quote 0
      • undefined
        dc42 administrators @Toastinator
        last edited by dc42 20 Mar 2021, 20:19

        @Toastinator said in Closed Loop Motor Setup:

        @dc42 Thanks! I have Tried Numbers Varying up 500.

        T5:5:50:250 And So On, How High is TOO High? 1000? 10000?

        I Will keep Playing with Timing Keep Checking back

        T2.5:2.5:50:50 should probably be high enough.

        PS which Duet do you have, and how have you connected the drivers to it?

        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 20 Mar 2021, 20:26 Reply Quote 0
        • undefined
          Toastinator @dc42
          last edited by 20 Mar 2021, 20:26

          @dc42

          Just Tried T2.5:2.5:50:50 Timing and It still Does the Same thing. Im wondering if this is a CoreXY Related Issue.

          Im using a Duet 3 6HC, Duet 3 Expansion 3HC and 2 - Duet 3 Expansion 1XD Boards
          The Motors are Connected by a "Differential Connection"

          After Homing X and Y, X and Y Move Toward Center, When Y Finishes. X Continues Toward Center But now Z Starts Lifting Before getting to Center.

          1 Reply Last reply Reply Quote 0
          • undefined
            Phaedrux Moderator
            last edited by 20 Mar 2021, 20:29

            Can you use M122 B# to check that your mainboard and all expansion boards are updated as well?

            Z-Bot CoreXY Build | Thingiverse Profile

            undefined 1 Reply Last reply 20 Mar 2021, 20:34 Reply Quote 0
            • undefined
              alankilian
              last edited by alankilian 20 Mar 2021, 20:30

              I wonder what this means from the manual;

              13 Pulse command filtering time
              Unit: 50us
              Range: 0~600
              Default: 60
              The larger the value, the smoother the motor runs and the noise,
              but the position tracking lag time also increases.

              50 microseconds times 60 is 3 milliseconds which is a LONG time.

              The mention of "the position tracking lag time also increases" makes me think this thing might be accumulating a bunch of input pulses before starting to move the motor depending on whatever it's gains are set to.

              But that would make these motors completely unsuitable for CNC or 3D printer applications, so I just don't know.

              1 Reply Last reply Reply Quote 1
              • undefined
                Toastinator @Phaedrux
                last edited by 20 Mar 2021, 20:34

                @Phaedrux

                Yes, They all Report Back. I Had to Down Grade Firmware too 3.3Beta1 Because Using 3.3Beta2 Was Causing the Temperature of my Thermocouples to not read anymore.

                @alankilian

                Good Catch, If these Motors end up being Unusable. Would you or anyone else have a Suitable Option for Replacement? I Thought the Default 60 Meant 60us, Not 50us x 60.

                1 Reply Last reply Reply Quote 0
                • undefined
                  alankilian
                  last edited by 20 Mar 2021, 20:38

                  How about trying some square motion starting very slowly and getting faster and faster and make sure only one axis moves at a time?

                  I don't know the size of your machine or where the origin is, but something like this: (Made-up GCODE, you'll need to make real code)

                  G0 X0 Y0 Z10
                  G1 X300 F50
                  G1 Y300
                  G1 X0
                  G1 Y0
                  G1 X300 F100
                  G1 Y300
                  G1 X0
                  G1 Y0
                  G1 X300 F150
                  G1 Y300
                  G1 X0
                  G1 Y0
                  G1 X300 F200
                  G1 Y300
                  G1 X0
                  G1 Y0
                  G1 X300 F250
                  G1 Y300
                  G1 X0
                  G1 Y0
                  undefined 1 Reply Last reply 20 Mar 2021, 20:43 Reply Quote 1
                  • undefined
                    Toastinator @alankilian
                    last edited by 20 Mar 2021, 20:43

                    @alankilian

                    Ill give it a shot. Im also Checking into a way of Modifying that setting from 60 to somthing Much Lower. Should that be Lowered to 1? to = 50us

                    I don't see that as an option. A 3d Printer that can only Print square Objects! lol

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      alankilian
                      last edited by alankilian 20 Mar 2021, 20:48

                      I'm interested in seeing if when you move very slowly that only one axis moves at time and (maybe) when yo move faster, it's not waiting for the move to complete and starting the next move due to "the position tracking lag..." mentioned above.

                      That would indicate it's more likely the drives and not a Duet firmware thing.

                      undefined 1 Reply Last reply 20 Mar 2021, 20:56 Reply Quote 1
                      • undefined
                        Toastinator @alankilian
                        last edited by Toastinator 20 Mar 2021, 20:56

                        @alankilian Thanks for your help, I really appreciate it!

                        Alright, Heres what happened.
                        I Had to change the Speed because the original was moving at 0.5mm Per second. I did Pick Ridiculous Speed Numbers To see what would happen, and the Speed Remained CONSTANT the entire time suggesting the Speed is Controlled by the External Driver?

                        G90
                        G0 X0 Y0 Z10
                        G1 X300 F3000
                        G1 Y300
                        G1 X0
                        G1 Y0
                        G1 X300 F5000
                        G1 Y300
                        G1 X0
                        G1 Y0
                        G1 X300 F10000 <- Here is where it said the Print was Finished.
                        G1 Y300
                        G1 X0
                        G1 Y0
                        G1 X300 F15000
                        G1 Y300
                        G1 X0
                        G1 Y0
                        G1 X300 F20000
                        G1 Y300
                        G1 X0
                        G1 Y0

                        Edit: The External Driver Doesn't Fully Control the Speed, But Perhaps the Maximum Speed? When Requesting a Low Speed Like 50, it Moved at 0.5mm Per second. But at 3000, It was moving more like 50mm Per Second.

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          alankilian
                          last edited by 20 Mar 2021, 23:19

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • undefined
                            Toastinator
                            last edited by 22 Mar 2021, 03:28

                            I Just Got the Software to Modify the Settings Built in to the Closed Loop Stepper.

                            Will change the Motors back and Get back Tomorrow with the Findings

                            My First Attempt will change the Timing:

                            13 Pulse command filtering time
                            Unit: 50us
                            Range: 0~600
                            Default: 60 <- Will Change to 1 = 50us
                            The larger the value, the smoother the motor runs and the noise,
                            but the position tracking lag time also increases.
                            1 Reply Last reply Reply Quote 0
                            • undefined
                              Toastinator
                              last edited by 22 Mar 2021, 23:58

                              @alankilian @dc42

                              Alright Here's what I Found. I was able to use the Software to Communicate with the Drives. Changed the Setting to be MUCH Lower. Also Tried Changing these to act like Regular Stepper Motors. But Nothing I Changed Would Work.

                              Here's My Options:

                              1 - I need to Find a way to make EVERY Move Wait for An End Stop to be activated before moving to the next (Seems Slow and Unreasonable) So Im Ditching These Motors Unfortunately.

                              2 - Find another Nema 23 Closed Loop Motor that WILL Work with Duet 3 1XD.

                              3 - Continue to Rip Hair out until Bald.

                              Would Prefer #2 at this Point. Cost is not Much Of an issue. Any Suggestions would be awesome!

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                alankilian
                                last edited by 23 Mar 2021, 00:36

                                Well, we don't really know what the problem is with these motor-drivers yet, so I'm reluctant to try any other suggestion.

                                As an experiment (if you're still willing to experiment) set the drivers for open-loop mode and see how they perform.

                                • Do they finish the moves as expected?

                                Can you try slow movements and see if they complete the move at the same time?

                                What is your microstepping value on the drives?
                                Do you have steps-per-mm set right?

                                • If you move 20mm, does the axis actually move 20mm?

                                Laqst one: WHY do you need closed-loop control?

                                • What are you trying to get out of a closed-loop system that you don't get from an open-loop system?
                                undefined 1 Reply Last reply 23 Mar 2021, 03:42 Reply Quote 1
                                • undefined
                                  Toastinator @alankilian
                                  last edited by 23 Mar 2021, 03:42

                                  @alankilian Great Questions,

                                  Currently Only the X+Y are using these Motors. I Think this Might work if I also Had All 3 Z Motors using the same Motor as well. (Maybe add the same Delay to all Motors Canceling out any issues?)

                                  With the Software, I Changed the Parameters, Saved them and Read them again to make sure it was saved. After changing the Parameters. It doesn't seam like anything actually changed.

                                  I changed them to Open-Loop Mode and it did not change its behavior at all. Slow Movements Repeated the same Issue.

                                  Micro stepping was turned off. Full Steps Only. The Steps Per mm was also Set correctly, 20mm Was Moved 20mm.

                                  Last, Closed Loop was More of a "Want" Then a "Necessity". I Changed these Motors Out just now for Nema 23 Steppers. I Purchased 2 Duet 3 1XD Boards for Closed Loop, and I was Hoping to Utilize them.

                                  Didn't Think I would have a hard time getting them setup

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    alankilian
                                    last edited by 23 Mar 2021, 14:44

                                    @toastinator

                                    These motors are US$100 for me, so I don't really want to invest US$200 to see if I can figure out what's going on.

                                    Where are you located?

                                    If you are interested, would you send me these motors/drivers and I'll hook them to a logic analyzer and see if I can make them work for you and then send them back?

                                    If you're too far away i understand.

                                    undefined 1 Reply Last reply 23 Mar 2021, 20:08 Reply Quote 1
                                    • undefined
                                      Toastinator @alankilian
                                      last edited by 23 Mar 2021, 20:08

                                      @alankilian

                                      Sure I don't mind. They will be sitting around Collecting Dust Otherwise. Do you want me to Send 1 Or Both?

                                      The Software they Gave to Change the Parameters:
                                      ESS Protuner

                                      Im Located in Baltimore, Maryland.

                                      Let me know if you need anything else with them, PM me with the details.

                                      1 Reply Last reply Reply Quote 1
                                      • undefined
                                        alankilian
                                        last edited by 23 Mar 2021, 21:30

                                        OK, moving to PM.

                                        undefined 1 Reply Last reply 29 Mar 2021, 19:18 Reply Quote 1
                                        • undefined
                                          alankilian @alankilian
                                          last edited by alankilian 29 Mar 2021, 19:18

                                          @Toastinator I have one drive up and running.

                                          I can read and write the internal motor-controller parameters and (sometimes) they survive a power-cycle.

                                          I am driving the motor from an Arduino so I can precisely control the step pulse count and timing.

                                          I'm capturing data using a Saleae Logic 16 probe so I can see the step pulses and the encoder output as a measure of motor angle.

                                          I'm using a 2000 Count-per-revolution encoder and looking at one phase so I get 500 pulses-per-revolution captured.

                                          I'm seeing things that looks pretty good, but it might be good to get some feedback on what others think.

                                          • I'm seeing about 70 step pulses at the beginning of a move before the motor shaft moves. (That's 2.x step at 0.9 degrees-per-step) It seems like this is acceptable for 3D printing.
                                          • I see in the neighborhood of 16 encoder pulses at the end of a move after the step signals complete before the motor stops. This is about 12 degrees (13 steps) which seems like a LOT and I would think would cause printing problems.

                                          I'll update so I can capture both encoder signals to see if the motor is oscillating around at the end of a move or if it's actually decelerating and continuing to move in the same direction.

                                          As it stands, I'm not sure these will work for printer drivers (yet)

                                          Setup:
                                          IMG_6030.JPG

                                          Beginning of move:
                                          BeginningOfMove.PNG

                                          End of move:
                                          EndOfMove.PNG

                                          undefined 1 Reply Last reply 31 Mar 2021, 13:53 Reply Quote 2
                                          18 out of 61
                                          • First post
                                            18/61
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA