Shop OBEX P1 Docs P2 Docs Learn Events
Servo stops in different place depending on travel direction - Page 2 — Parallax Forums

Servo stops in different place depending on travel direction

2»

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-08-22 22:29
    Doc -

    Myke Predko is a VERY affable guy, and I'm sure he'd be happy to address that Futaba issue for you. He can be contacted at the email address which follows below. Replace the word "at" with the at sign (@), compress out the spaces, and please use the following in the Subject line: "Myke Question" so it will be filtered properly, away from the junk mail.

    ····· myke at myke.com

    He also maintains a web site at myke.com and mentions on the lead page of that web site the book you mentioned above.

    Regards,

    Bruce Bates
  • The DoctorThe Doctor Posts: 37
    edited 2007-08-22 23:14
    D Faust said...
    I think that the servo for my ping (parallax servo) travels the 180 deg with a 1048 pulse and 452 (on a BS2). Center still seemed to be reached. As for what LILDI said, I thought servos do slow down when getting closer to their final position. That is what gives you speed control with a CR one. My guess for why the overshoot occurs is because the servo only notices that it reached its desire point when it went to far. I am not sure, just guessing.

    But it only overshoots in one direction.· And if you watch PhiPi's video, you will see his does the same thing.
  • MightorMightor Posts: 338
    edited 2007-08-25 12:18
    A very, very small pause can make all the difference. Remeber the graph I posted a while back with the massive shift in measurements depending on the direction? Well, I shifted some lines around, added a tiny bit of an extra wait between the last pulse to the servo and the PING))) pulse and the shift has totally disappeared. I am sure the same applies to your code. Add a little pause between the servo getting pulse train for one particular position and the next. Try 50ms, it's almost nothing [noparse]:)[/noparse]

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    servo PIN 8
    
    DO
      FOR B0 = 1 TO 50
        PULSOUT servo, 1000
        PAUSE 20
      NEXT
      PAUSE 30   ' with the pause 20 above, this will amount to 50
      FOR B0 = 1 TO 100
        PULSOUT servo, 750
        PAUSE 20
      NEXT
      PAUSE 30
      FOR B0 = 1 TO 50
        PULSOUT servo, 500
        PAUSE 20
      NEXT
      PAUSE 30
      FOR B0 = 1 TO 100
        PULSOUT servo, 750
        PAUSE 20
      NEXT
      PAUSE 30
    LOOP
    
    



    Try this, see what it does for you. Increase it from 30 to 50 if necessary.

    Before and After adding the 50ms pause in my own code.
    attachment.php?attachmentid=48800attachment.php?attachmentid=48863

    Gr,
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | To know recursion, you must first know recursion.

    Post Edited (Mightor) : 8/25/2007 12:24:24 PM GMT
    483 x 291 - 21K
Sign In or Register to comment.