Shop OBEX P1 Docs P2 Docs Learn Events
Using a Basic Stamp with my old servo controller. — Parallax Forums

Using a Basic Stamp with my old servo controller.

markustermarkuster Posts: 184
edited 2012-12-13 09:40 in BASIC Stamp
Hi,

I have a B.Stamp 2 and I am sending the "SEROUT" command to
a serial servo controller to move the servos.

But the servos speed is to high and I need to reduce it.

here is the serout of one servo :

SEROUT 15,84,[170,12,4,2,60,15]

The serial servo I have is from Pololu. Perhpas the link to
the servo controller will help:
http://www.pololu.com/docs/0J40/5.b

I understand that the servo controller is not from Parallax but perhpas
you could bring me some idea to reduce the speed.

In this momment I have 3 servos attached and I am moving the servos
"pretty well" using the SEROUT , but the speed is to high.

Some help please or an example will help me.

Thanks.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-12-13 08:56
    You'll have to read through the Pololu documentation to figure out how to use the servo controller and ask questions of their support people.

    When talking about servos, you have to be clear what you mean by "speed". Are you talking about a standard servo where the number sent to the servo controller corresponds to the position of the servo and the servo moves automatically from one position to another or do you have a continuous motion servo where the number sent to the servo controller corresponds to the speed and direction of the servo? In the first case, you have to split up the change of position into several smaller movements (each a separate command to the servo controller) and that makes the overall movement take more time. In the second case, you have to change the value sent to the servo controller. The servo controller ends up sending a 1ms to 2ms pulse to the servo. A pulse of 1.5ms represents either a center position (1st case) or stopped (2nd case). Wider or shorter pulses result in more (1st case) or faster (2nd case) movement.

    See this Wikipedia article on servos
  • markustermarkuster Posts: 184
    edited 2012-12-13 09:40
    Thanks Mike:

    Your help was good .
    I replaced the last number by a Stamp variable like B2 , SEROUT 15,84,[170,12,4,2,60,B2]

    and I put all the code between a For-Next

    here is:

    FOR B2=30 to 60 : PAUSE 20
    SEROUT 15,84,[170,12,4,2,60,B2]
    NEXT

    Now it is working good, and the servo is moving from position 30 to position 60.

    I thougth that could be an special number (not the baudrate speed) for speed change instead
    the FOR-NEXT but it seems it is not.

    Any way thanks again for the help.
Sign In or Register to comment.