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

    Connecting Hobbyservo TowerPro SG90

    Scheduled Pinned Locked Moved Solved
    Duet Hardware and wiring
    2
    3
    153
    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.
    • gringoundefined
      gringo
      last edited by

      I have a TowerPro Miniservo connected to out9 and we configured in the doc in a macro.
      I have created two macros for testing one for a rotation to the right and one for a rotation to the left.

      M950 S1 C "out9" ; right turn
      M280 P1 S80

      M950 S1 C"!out9" ; left turn
      M280 P1 S80

      A rotation to the right works fast
      A rotation to the left works very slowly.

      What could be the reason?
      It is an analog servo. I have also tested a digital servo that only rotates clockwise.

      Do you have any idea what I need to change to make the servo turn fast in both directions?

      Thanks
      Lars

      1 Reply Last reply Reply Quote 0
      • achrnundefined
        achrn
        last edited by achrn

        You should define the servo only once (e.g. with M950 S1 C "out9") then you set it to different positions by using e.g.

        M280 P1 S1000              ; right turn
        M280 P1 S2000              ; left turn
        

        (but I don't know your orientation, so left and right might be reversed).

        Also, servos are all over the place in respect to timing - so you need to do quite a lot of trial-and-error to determine the appropriate range for the S parameter. Either use the range 0-543 or the range 544 and greater - one is a pseudo angle, the other is pulse-width-in-microseconds

        gringoundefined 1 Reply Last reply Reply Quote 1
        • gringoundefined
          gringo @achrn
          last edited by

          @achrn

          it works, thanks a lot.

          1 Reply Last reply Reply Quote 0
          • droftartsundefined droftarts marked this topic as a question
          • droftartsundefined droftarts has marked this topic as solved
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA