Shop OBEX P1 Docs P2 Docs Learn Events
Centering ping servo — Parallax Forums

Centering ping servo

StickySticky Posts: 42
edited 2009-04-19 01:19 in Robotics
I'm pretty sure this is easy stuff, but how do I center the servo for a ping so that it is pointing right in front of the robot?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-18 22:15
    You set up a calibration program exactly the same as those used for the wheel servos as described in the Robotics for the BoeBot tutorial except that, instead of using the program to adjust the servo for no motion, you mechanically adjust the PING bracket for centering. You remove the screw holding the bracket on the servo shaft, run the program, and change the position of the bracket on the servo shaft until the PING is nearly centered. Since the shaft splines have some size, you can't center the PING exactly this way. After replacing the screw holding the bracket on the servo shaft, you loosen the screws holding the servo to the BoeBot (or other robot), run the program again, and get a little more adjustment that way. After tightening everything down, you change the value in the PULSOUT statement to get the PING exactly centered. Your programs will need to use an adjustment factor that's the difference between the centered PULSOUT statement and the default 750 (1.5ms) value.

    If you've got the servo on pin 13, the program would look like:
    start:
      PULSOUT 13,750
      PAUSE 20
      GOTO start
    
  • StickySticky Posts: 42
    edited 2009-04-19 01:19
    Thanks Mike , did the trick.
Sign In or Register to comment.