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

    How to force a stepper driver into full step position?

    Scheduled Pinned Locked Moved
    General Discussion
    9
    27
    1.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.
    • DocTruckerundefined
      DocTrucker
      last edited by DocTrucker

      Hi all,

      Running some experiments at the moment to test repeatability of the system. With a grid of 16 identical parts my standard deviation is not massively larger than the step size of the printer. I can force the spacing of parts to be an integer number of full steps apart, but I'm not aware of a way of detecting when the driver is on a full step? Perhaps the only real way is to home the system move it to (0,0,30), power cycle, and set the position to (0,0,30) rather than home?

      Thanks!

      Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

      1 Reply Last reply Reply Quote 0
      • Danalundefined
        Danal
        last edited by

        Perhaps... and just for experiments... make your idle current zero, temporarily. When the motor quits getting current, it will cog to a full step. Then set it back to some reasonable percentage.

        Takes advantage of the fully dynamic nature of Duet config commands.

        Delta / Kossel printer fanatic

        DocTruckerundefined 1 Reply Last reply Reply Quote 0
        • DocTruckerundefined
          DocTrucker @Danal
          last edited by

          @Danal cheers. I was wondering about if M18 more conviently. I'll have to read up on the stepper docs to see if the counter resets, because I don't think the duet has any clue where in the cycle it is.

          Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

          1 Reply Last reply Reply Quote 0
          • Danalundefined
            Danal
            last edited by

            M18 will mark everything as not homed.

            Delta / Kossel printer fanatic

            DocTruckerundefined 1 Reply Last reply Reply Quote 0
            • mrehorstdmdundefined
              mrehorstdmd
              last edited by

              Cutting current may not move the motor at all depending on how much friction there is in the system. I think that when the current goes from zero to operating value you will see the motor cogging to a full step position.

              https://drmrehorst.blogspot.com/

              1 Reply Last reply Reply Quote 1
              • DocTruckerundefined
                DocTrucker @Danal
                last edited by

                @Danal said in Any way to tell when motor is on full step?:

                M18 will mark everything as not homed.

                That's not so much and issue. Something like the following should work...

                G1 X0 Y0 Z30
                M18
                [enable drives?]
                G92 X0 Y0 Z30

                ...but I don't know what will enable the drives!

                I'll read the driver docs about what happens when the current drops down then comes back up. I would have expected it to come back to the same point in the cycle, as the chip itself isn't powered down?

                Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                Danalundefined dc42undefined 2 Replies Last reply Reply Quote 0
                • Danalundefined
                  Danal @DocTrucker
                  last edited by

                  @DocTrucker said in Any way to tell when motor is on full step?:

                  I'll read the driver docs about what happens when the current drops down then comes back up. I would have expected it to come back to the same point in the cycle, as the chip itself isn't powered down?

                  That is a good point. The chip is sitting there holding a given microstep, by splitting current between the coils. Ramping down/up, it will still split.

                  Harumph.

                  Let's keep thinking...

                  Delta / Kossel printer fanatic

                  1 Reply Last reply Reply Quote 0
                  • Phaedruxundefined
                    Phaedrux Moderator
                    last edited by

                    Wouldn't you have to stall it to get a full step reliably?

                    Z-Bot CoreXY Build | Thingiverse Profile

                    Danalundefined 1 Reply Last reply Reply Quote 0
                    • Danalundefined
                      Danal @Phaedrux
                      last edited by

                      AH!! Dynamic configuration. Config for no microstepping. Step one pulse, config for whatever microstepping you want.

                      You are now sitting on a step, ready to move in microsteps.

                      M350 X1
                      Generate some movement.
                      M350 X16 (or whatever)

                      Delta / Kossel printer fanatic

                      botundefined 1 Reply Last reply Reply Quote 1
                      • botundefined
                        bot @Danal
                        last edited by

                        Isn't an axis flagged as unhomed when the microstepping is changed?

                        *not actually a robot

                        DocTruckerundefined 1 Reply Last reply Reply Quote 0
                        • Phaedruxundefined
                          Phaedrux Moderator
                          last edited by

                          Even if it did flag it as unhomed, if you've already put it in a known position, you could force the position again afterwards with G92

                          Z-Bot CoreXY Build | Thingiverse Profile

                          botundefined 1 Reply Last reply Reply Quote 1
                          • botundefined
                            bot @Phaedrux
                            last edited by

                            @Phaedrux right!

                            *not actually a robot

                            1 Reply Last reply Reply Quote 0
                            • DocTruckerundefined
                              DocTrucker @bot
                              last edited by DocTrucker

                              @bot said in Any way to tell when motor is on full step?:

                              Isn't an axis flagged as unhomed when the microstepping is changed?

                              @DocTrucker said in Any way to tell when motor is on full step?:

                              That's not so much and issue. Something like the following should work...

                              G1 X0 Y0 Z30
                              M18
                              [enable drives?]
                              G92 X0 Y0 Z30

                              I find the G92 trick worth remembering for machine commissioning of if you've been daft enough to modify a carriage and not consider if it can still hit the limit switch.

                              That has never happened to me... 😉

                              @Danal the change microstepping may just do it for the D3 board. I'll have to get that together and running before my little one gets kicked out of nursery on Monday!

                              Odd there's no apparent counter to M18 though. I wonder if it is triggered by something else, or if M18 is more like a 'switch state' than an enable.

                              Edit: Excuse the subject change! Matches the conversation now.

                              Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                              deckingmanundefined 1 Reply Last reply Reply Quote 0
                              • deckingmanundefined
                                deckingman @DocTrucker
                                last edited by

                                @DocTrucker Can't you just run with no microstepping and maybe alter your test procedure to suit? No sure what exactly your repeatability test is aiming to do but if you have a grid of objects, then each time you print then, they should be the same. Individual objects might be slightly different sizes and the spacings between them might vary but that variation should be the same each time you print.

                                Alternatively, assuming you use 80 steps per mm @16x then you'll have 5 full steps per mm or 0.2 mm per full step. If you design your test parts multiples of 0.2 mm in size with spacings between them also multiples of 0.2mm, wouldn't that work?

                                Just some random thoughts because I don't know what the goal is.

                                Ian
                                https://somei3deas.wordpress.com/
                                https://www.youtube.com/@deckingman

                                DocTruckerundefined 1 Reply Last reply Reply Quote 0
                                • DocTruckerundefined
                                  DocTrucker @deckingman
                                  last edited by

                                  @deckingman Morning Ian! I'm avoiding the tempation to go down discussing experimental plan in too much detail as that's a big can o' worms. Bare with me here as I am writing it up, and will share in due time. If I try and defend/discuss the work off the cuff I won't do myself or the work justice.

                                  These are preliminary tests that I have started simple and am gradually increasing adapting the test geometry, and procedure in order to reduce measurement errors as far as practical.

                                  In the first post I mentioned about forcing the positioning if the parts to be integer multiples of the full step size. Hopefully this will reduce the effect of microstep inaccuracies across one build. But unless I queue build after build without resetting the machine I can't escape needing to home which may result in a specific co-ordinate of the bed being in a subtly different absolute angle of the stepper than a subsequent build. One valid response would be to improve the limit sensing if that is the case, and the other is a cheaper route which is forcing a specific co-ordinate to be at a whole step position for the motors.

                                  That said first test this morning will be testing my limits to determine how repeatable they are!

                                  Other factors that are on-the-shelf for consideration in this body of work are:

                                  • Local bed temperature variations caused by heater or the use of glass bed (/ another) surface
                                  • Differences in x and y axis - ie mass.
                                  • Belt tensions and inconsistencies between axis.
                                  • Sticking points on the axis.
                                  • Variations in filament diameter - ie manufactures specified tollerance.

                                  That's just the tip of the potential causes. The stepping is the one I'm trying to investigate right now.

                                  Ultimate aim of work? Develop a simple procedure that can optimise achievable tollerance and accuracy for a machine. Not as trivial as you might expect as part geometry, cooling rate, and even extrusion velocity is likely to have an effect on shrinkage - polymers are weird...

                                  Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                                  deckingmanundefined 1 Reply Last reply Reply Quote 2
                                  • DocTruckerundefined
                                    DocTrucker
                                    last edited by DocTrucker

                                    ...just a final clarification on the previous post. This work is about identifying and fixing identified problems without doing the throw money at it/developer gold plating approach.

                                    I've found strong indications that I had positional related effects on the size of parts. I'm now working theough a list of potential causes - one by one - to try and identify the cause, or causes until there is little.indication of positional related effects on accuracy.

                                    I'm interested to benchmark what this system is capable off then compare it to another format such as core xy or improve it with controller or physical changes.

                                    Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                                    1 Reply Last reply Reply Quote 0
                                    • DocTruckerundefined
                                      DocTrucker
                                      last edited by

                                      Ok, got the machine powered up and checked.

                                      M18 is not a switch command it is definitely a disable command. I checked the machine and you could definitely move the steppers easily after issuing M18.

                                      However, the home all command worked fine after M18 with the steppers moving and the process completing.

                                      The following process seems to work fine and the machine is flagged as homed after:

                                      G1 X0 Y0 Z0
                                      M18
                                      G92 X0 Y0 Z0
                                      

                                      I've moved the machine to touching the nozzle on the bed to increase the resistance against dropping the bed. But that said I'm using 1mm pitch lead screws, so the chance of a major movement is minimal. Yes my first layer may be a little crap but I've designed the test geometry so that the measurement point is well above the section of the part that is likely to suffer the 'elephant foot' and between any significant changes in section such as the upper and lower solid areas or any change in XY section in the Z direction.

                                      Next challenge is a deep dive into slic3r in order to directly specify the part locations of 16 parts. That's one LONG command line string!

                                      Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

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

                                        @DocTrucker said in How to force a stepper driver into full step position?:

                                        I'll read the driver docs about what happens when the current drops down then comes back up. I would have expected it to come back to the same point in the cycle, as the chip itself isn't powered down?

                                        That's correct AFAIK. Disabling the the driver only disables the output stage. Whereas removing VIN power and reapplying it will reset the chip.

                                        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

                                        DocTruckerundefined 1 Reply Last reply Reply Quote 0
                                        • DocTruckerundefined
                                          DocTrucker @dc42
                                          last edited by DocTrucker

                                          @dc42 Ahh ok, my responce there was my thoughts that dropping current to 0 and increasing may not do it, rather tham M18. Just to be clear you are saying M18 may not reset the chip either?

                                          Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                                          1 Reply Last reply Reply Quote 0
                                          • DocTruckerundefined
                                            DocTrucker
                                            last edited by DocTrucker

                                            Confirmed for the A4982 drivers of the Duet v0.6 and 0.8.5, a power cycle will be needed. Cycling reset could achieve the 'reset to home position' but that is hard wired on the v0.6 & v0.8.5 to the 3.3V line. I've not looked over the Duet3 or Duet2 drivers spec sheets. I guess there may be an SPI command that could achieve the reset but as the use cases are limited to probably just my test it's not worth a feature request.

                                            Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

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