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

    stepper precision

    Scheduled Pinned Locked Moved
    3D Printing General Chat
    6
    110
    6.4k
    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.
    • alankilianundefined
      alankilian @arhi
      last edited by alankilian

      @arhi Do you mean that the values you are reading are changing by plus or minus one if you read the encoder a lot of times?

      Because that's not unusual for such a high-resolution encoder where one count is 0.005-degrees of angle.

      Also, it's possible to get a +/- 1 oscillation if you stop RIGHT ON the edge of a line and move an infinitesimally-small angle. But I wouldn't expect that on every step. You showed three steps where it was doing it, so I think it's the controller.

      Hey, depending on how the s42b reads the TLE5012B angle sensor it can really only get either 15 bits or 16 bits of value from the angle of the magnet, so your encoder might have twice the resolution of the controller.

      15 bit representation of absolute angle value on the output (resolution of 0.01°)

      16 bit representation of sine / cosine values on the interface

      So I think the controller is doing about as well as it can.

      SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

      arhiundefined 1 Reply Last reply Reply Quote 0
      • arhiundefined
        arhi
        last edited by

        e122b982-443e-4008-9ef9-f7770789fd0f-image.png

        1 Reply Last reply Reply Quote 0
        • arhiundefined
          arhi @alankilian
          last edited by

          @alankilian said in stepper precision:

          @arhi Do you mean that the values you are reading are changing by plus or minus one if you read the encoder a lot of times?

          Yes. But if I turn motor off that does not happen.

          Also, it's possible to get a +/- 1 oscillation if you stop RIGHT ON the edge of a line and move an infinitesimally-small angle. But I wouldn't expect that on every step. You showed three steps where it was doing it, so I think it's the controller.

          Exactly, happens almost every time, and with TLC for e.g. it was not happening (we'll see how it will behave with alu coupler) and when I turn the driver off it does not happen so it's def "dancing", not by much but..

          So I think the controller is doing about as well as it can.

          WRT "dancing", probably. WRT "position", not really 😞
          The LCD is not showing errors, the "error" led (lost step) is off .. and 800 steps in forward and then 800 back we have error of 0.75° .. that's HUGE IMHO especially considering 1step/second speed

          fcwiltundefined 1 Reply Last reply Reply Quote 0
          • fcwiltundefined
            fcwilt @arhi
            last edited by

            @arhi said in stepper precision:

            The LCD is not showing errors, the "error" led (lost step) is off .. and 800 steps in forward and then 800 back we have error of 0.75° .. that's HUGE IMHO especially considering 1step/second speed

            If you were to configure the stepper (if possible) to only use whole steps would the error go away?

            Frederick

            Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

            arhiundefined 1 Reply Last reply Reply Quote 0
            • DaBitundefined
              DaBit
              last edited by

              That's half a step. I would expect a simple open-loop motor to perform better.

              On the other hand, I am sure you can interpolate a single rotating magnet with 15 bit resolution, but resolution != precision.
              A long time ago I did approximately the same for a customer, but back then it was an entire board with an FPGA, Burr-Brown ADC's and discrete analog frontend. We got ~9 bits of accuracy, the rest got lost in noise and nonlinearities.

              arhiundefined 1 Reply Last reply Reply Quote 0
              • arhiundefined
                arhi @fcwilt
                last edited by

                @fcwilt said in stepper precision:

                @arhi said in stepper precision:

                The LCD is not showing errors, the "error" led (lost step) is off .. and 800 steps in forward and then 800 back we have error of 0.75° .. that's HUGE IMHO especially considering 1step/second speed

                If you were to configure the stepper (if possible) to only use whole steps would the error go away?

                Frederick

                with S42B - not that I know ... I'll do as much tests with S42B first (open and closed loop) then moving to 2208 with different motors ... I'll add graphs as I go trough different tests but as you can see it is all rather slow as I'm doing 1step/sec

                1 Reply Last reply Reply Quote 0
                • arhiundefined
                  arhi @DaBit
                  last edited by

                  @DaBit said in stepper precision:

                  That's half a step. I would expect a simple open-loop motor to perform better.

                  I heard from some ppl S42B is awesome, but from some other I heard they are POS .. so I decided to try them out .. so far I already decided I will not be using them in my projects

                  On the other hand, I am sure you can interpolate a single rotating magnet with 15 bit resolution, but resolution != precision.

                  yeah but it does "calibration", moves a circle and records magnet readings at halfsteps I think so the resolution here should help a lot with precision.. but..

                  1 Reply Last reply Reply Quote 0
                  • arhiundefined
                    arhi
                    last edited by

                    what I seen on number of reports on-line, open-loop works better than closed loop with S42B 😞

                    cdebd7b1-9760-4f6b-bc65-9d9109036837-image.png

                    1 Reply Last reply Reply Quote 0
                    • DaBitundefined
                      DaBit
                      last edited by

                      That calibration only cancels fixed nonlinearities (and adds stepper imprecision). A slight magnetic short after calibration of changing operating point of the sensor due to temperature is not cancelled.

                      arhiundefined 1 Reply Last reply Reply Quote 0
                      • arhiundefined
                        arhi @DaBit
                        last edited by

                        @DaBit said in stepper precision:

                        That calibration only cancels fixed nonlinearities (and adds stepper imprecision). A slight magnetic short after calibration of changing operating point of the sensor due to temperature is not cancelled.

                        no clue how these magnet sensors work and what really is the supposed 15 bit precision. I normally deal with optical and mechanical ones, the magnetic ones I used only up to 4bit (for basic rotation)

                        1 Reply Last reply Reply Quote 0
                        • DaBitundefined
                          DaBit
                          last edited by DaBit

                          Basically 2 linear magnetic flux sensors oriented with 90 degree rotation. Rotating a magnet over them give a sin and cos signal from which you can calculate the angle.

                          Works fairly well. But usually not 15-bit well. A resolver would be more accurate.

                          [edit]
                          From the datasheet:

                          65d25a50-6001-452e-8968-6c312fc9f013-image.png
                          [/edit]

                          So that's 8.5 bits of precision. The extra 6.5 bits of resolution come in handy for the servo loop, but that is not precision.

                          1 Reply Last reply Reply Quote 1
                          • arhiundefined
                            arhi
                            last edited by

                            open loop, full circle, S42B

                            cda813ef-d752-4763-818a-48fc90b92f7d-image.png

                            1 Reply Last reply Reply Quote 0
                            • arhiundefined
                              arhi
                              last edited by

                              in closed loop mode the S42B display show constantly error between -0.04° to +0.04°

                              closed loop is running "much" colder than open loop and I doubt it's using full current I configured it to use (can't dig out my current probe to test, no way to get to it now)

                              1 Reply Last reply Reply Quote 0
                              • alankilianundefined
                                alankilian
                                last edited by

                                The closed-loop mode of the S42B is not intended to improve accuracy compared to open-loop mode when the motor load is well below the motor's load limit.

                                It's intended to improve accuracy when the load intermittently exceeds the maximum motor load.

                                Try your open-loop vs. closed-loop experiment and hold the rotor with something for 10 steps and see how the closed-loop corrects for that once you remove the load and the open loop mode does not correct the error.

                                THAT'S what the closed-loop mode is for. It might cost you some accuracy in the step-to-step positioning, but you gain the ability to (when the load is lessened) correct for overload conditions and missed-steps.

                                Open-loop cannot do that.

                                SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

                                arhiundefined 1 Reply Last reply Reply Quote 0
                                • arhiundefined
                                  arhi
                                  last edited by

                                  b763d0f1-891c-402c-88dc-5adbc8b982db-image.png

                                  1 Reply Last reply Reply Quote 0
                                  • arhiundefined
                                    arhi @alankilian
                                    last edited by

                                    @alankilian said in stepper precision:

                                    Try your open-loop vs. closed-loop experiment and hold the rotor with something for 10 steps and see how the closed-loop corrects for that once you remove the load and the open loop mode does not correct the error.

                                    it does correct the missed steps, but it should be also more precise than what I'm seeing 😞 ... 1° error !?!? that's more than half a step

                                    Anyhow done with S42B, moving on to TMC2208 driver and different motors

                                    fcwiltundefined 1 Reply Last reply Reply Quote 0
                                    • arhiundefined
                                      arhi
                                      last edited by

                                      Would also be cool if someone can reproduce measurements with S42B as this does not require super good/expensive/high resolution encoder, even cheap 1000 lines encoder should be able to see error 0.5° and 1°

                                      1 Reply Last reply Reply Quote 0
                                      • arhiundefined
                                        arhi
                                        last edited by

                                        54ee9d5f-b2b6-40db-b134-de6bcbfb7195-image.png

                                        1 Reply Last reply Reply Quote 0
                                        • fcwiltundefined
                                          fcwilt @arhi
                                          last edited by

                                          @arhi said in stepper precision:

                                          Anyhow done with S42B, moving on to TMC2208 driver and different motors

                                          Have you done any testing of the "two piece" closed loop systems consisting of a stepper/encoder and separate control unit?

                                          Thanks.

                                          Frederick

                                          Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                                          arhiundefined 1 Reply Last reply Reply Quote 0
                                          • arhiundefined
                                            arhi @fcwilt
                                            last edited by

                                            @fcwilt said in stepper precision:

                                            Have you done any testing of the "two piece" closed loop systems consisting of a stepper/encoder and separate control unit?

                                            Haven't got to it yet, can't find where I put my vallder stepper with encoder and driver combo. Also I wanna finish with few nema17 before I have to use another mount to test the bigger motor

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