Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Servo not moving the correct angle

    Duet Hardware and wiring
    3
    21
    651
    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.
    • A Former User
      A Former User last edited by A Former User

      my bad, long night - national day celebrations here..

      It is refering to the high part of the pulse. the period is generally the same, normally 20ms/50hz, but most motors accept a little under, and a lot over.

      1000us high followed by 19ms low is 0 degrees. 2000us high followed by 18ms low is 180 degrees

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

        @bearer said in Servo not moving the correct angle:

        Edit: But i will agree that using the same S parameter for both angle and encoded pulse length can be confusing. Would be better to have different parameters for angles and pulse lengths widths.

        I copied the specification from Marlin, so don't blame me!

        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

        A Former User gnydick 2 Replies Last reply Reply Quote 0
        • A Former User
          A Former User @dc42 last edited by

          @dc42 said in Servo not moving the correct angle:

          @bearer said in Servo not moving the correct angle:

          Edit: But i will agree that using the same S parameter for both angle and encoded pulse length can be confusing. Would be better to have different parameters for angles and pulse lengths widths.

          I copied the specification from Marlin, so don't blame me!

          lol, I usually leave assigning blame to git;)

          But I get the rationale behind angles not being defined past 180 degrees for servos, and 200us being well below the 0 deg point of 1000us. Its also convenient to keep compatibility.

          In any case seems both hardware and firmware is doing exactly what it should here, so I would look into motor or wiring. OR maybe start a thread to have the output doubled to suit my wonky hardware..

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

            @dc42 I was only following orders?!? Just kidding. I've seen it elsewhere, there seem to be quite a few config params like that.

            1 Reply Last reply Reply Quote 0
            • gnydick
              gnydick @Guest last edited by

              @bearer how would it be doing what it should if it's moving half the distance? How can you rule anything out at this point?

              1 Reply Last reply Reply Quote 0
              • A Former User
                A Former User last edited by

                Because you said it generated the correct pulse? Then again your understanding of what is correct should maybe taken into consideration, that is a valid point.

                gnydick 1 Reply Last reply Reply Quote 0
                • gnydick
                  gnydick last edited by

                  and what about the crazy heat. Can a wiring problem cause this behavior?

                  1 Reply Last reply Reply Quote 0
                  • gnydick
                    gnydick @Guest last edited by

                    @bearer i don't remember saying it generated the right pulse. I don't know how to measure that. I might have misstated something. The servo spec says 110us for 60degrees. I sent S220 and it moved about 90. Which should have been 120, right?
                    https://servodatabase.com/servo/traxxas/2080

                    1 Reply Last reply Reply Quote 0
                    • A Former User
                      A Former User last edited by A Former User

                      I didn't see the (pulse width) specs in the link but if it says 110us for 60 degrees, then its not compatible with Reprap, or marlin or any of the other firmwares definitions of degrees.

                      What i did see was the spec saying it needs 0.11 seconds to move 60 degrees at no load.

                      1 Reply Last reply Reply Quote 0
                      • A Former User
                        A Former User @gnydick last edited by

                        @gnydick said in Servo not moving the correct angle:

                        It looks like using the pulse width is working correctly, but not angle.

                        I presumed you had some sort of qualified means of determining that. My bad.

                        gnydick 1 Reply Last reply Reply Quote 0
                        • gnydick
                          gnydick @Guest last edited by

                          @bearer ah, yes, I was wrong when I said that.

                          1 Reply Last reply Reply Quote 0
                          • A Former User
                            A Former User last edited by A Former User

                            If the servo has a standard interface you should get the same behavior with these two blocks. go to 0 degrees if not already there. wait 0-1s, go to 180 degress, wait about 0.5s, back to 0 degrees. Should sweep across the whole range, taking about 4-500ms from 0 to 180 at 5v.

                            If it has different movement for the two blocks then there is something fishy, if it moves less than 180 degrees there is something fishy, if it goes back to 0 without stopping then you may want to increase the dwell but 1s should be plenty if it moves 60 degrees pr 0.11s at 6v.

                            You'll need some means of measuring the pwm signal if it still doesn't behave as it should. If you have an arduino like board laying around pulseIn(PIN, HIGH, 20000); might give you some idea as to what the duet is doing. Or a scope.

                            M280 P3 S0 ;0 degrees
                            G4 P1000
                            M280 P3 S180 ;180 degrees
                            G4 P1000
                            M280 P3 S0 ;back to 0
                            

                            and

                            M280 P3 S1000 ;0 degrees 
                            G4 P1000
                            M280 P3 S2000 ;180 degrees
                            G4 P1000
                            M280 P3 S1000 ;back to 0
                            
                            gnydick 1 Reply Last reply Reply Quote 0
                            • gnydick
                              gnydick @Guest last edited by

                              @bearer how is M280 P3 S90 == 180 degrees?

                              1 Reply Last reply Reply Quote 0
                              • A Former User
                                A Former User last edited by

                                wow.....

                                gnydick 1 Reply Last reply Reply Quote 0
                                • gnydick
                                  gnydick @Guest last edited by gnydick

                                  @bearer the docs say for values <200 S is the angle, and I'm getting half the throw, not double. So, I'm not following.

                                  1 Reply Last reply Reply Quote 0
                                  • gnydick
                                    gnydick last edited by

                                    I also checked, my board is a 1.04a, so it should have the needed capacitor.

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