Shop OBEX P1 Docs P2 Docs Learn Events
Parallax Servo Controller (USB) — Parallax Forums

Parallax Servo Controller (USB)

indaybdaindaybda Posts: 12
edited 2008-01-02 21:47 in Robotics
I have successfully sent commands to the servo motors through USB, and they seemed to respond correctly.

But my problem is I can only send velocity commands. That is, a given servo motor has a certain range of numbers. One number will correspond to a stop. And the rest of the values within the range will command the servo motor to move in one direction. The bigger the value away from "stop" number, the faster is the motion of the motor. At the opposite sides of the "stop" number are the opposite directions of motor motion.

What I want to do is send a position command. That is, one number sent corresponding to a unique motor displacement.

Even if I just connect the USB to my laptop and turn on the switch on the Parallax board, my motors would start turning non-stop until I send the "stop" number ( around 518 for a Parallax continuous rotation motor, and 617 for a Futaba S3003 motor).

Please help me determine what is wrong with my system.

Thanks,
indaybda

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-14 05:27
    There's nothing wrong with your system. Continuous motion servos behave exactly as you have seen. They do not respond to any kind of position command. The mechanism that enables normal servos to stop at a particular position has been disabled or removed to make the continuous motion servos.
    An unmodified servo will move to a particular position and stop with the position corresponding to the provided pulse width (from approximately 1ms to 2ms, sometimes over as much as 0.5ms to 2.5ms).
  • indaybdaindaybda Posts: 12
    edited 2007-11-14 07:17
    The other motor, Futaba S3003, in an unmodified servo motor, but it behaves in the same way as the Parallax continuous servo motor.

    Is there a way I can achieve a position command using my current setup?

    Thanks,
    Indaybda
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-14 15:15
    If your Futaba S3003 servo behaves as you indicated (it moves continuously at different speeds and direction depending on the width of the control pulse except at one specific pulse width where it stops), you have a continuous motion (modified) servo and not a standard (unmodified) servo. As I mentioned, an unmodified servo will move to a specific position (specified by the control pulse width) and stop.

    If you ordered an unmodified servo, perhaps you were sent the wrong type by mistake.
  • indaybdaindaybda Posts: 12
    edited 2007-11-14 15:59
    The Futaba S3003 servo stops when it hits its limit (a physical stopper). I believe that if this was modified for continuous motion, the physical stopper should not be there.

    The Parallax (Futaba) Standard Servo in the Parallax website should be position controlled, right?

    -Indaybda
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-14 16:02
    Correct. Correct.
  • FranklinFranklin Posts: 4,747
    edited 2007-11-15 05:30
    If for the futaba you sent 630 what do you get? It should move just a bit if at all.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • indaybdaindaybda Posts: 12
    edited 2007-11-15 05:48
    It will still move in a slow continuous motion. I know it does not make sense. Any ideas?
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-15 06:31
    The only way it can move in a slow continuous motion is for it to be a modified continuous motion servo.
  • indaybdaindaybda Posts: 12
    edited 2007-11-15 06:44
    I just ordered the Parallax (Futaba) Standard Servo. I will update you here of the result.

    -Indaybda
  • basicstampbasicstamp Posts: 3
    edited 2007-11-16 21:58
    Hello,
    I just buy the USB servo controller, hooked up, but no servo movement.
    When I check the PSC version the only message will be: "Version...", so no number.
    The red led burns on the board, and the green flashes when sending data with the PSCusb software V0.9h beta.
    Also pressing the reset button on the board there is just a little movement of the servo's, but that's all.
    There is also power on the servo pin's + and -. I use the standard Parallax servo's.
    What's wrong???? (...help..)

    Gr. Wil

    ps. my BoeBot works good on the same usb cable/port.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-11-19 20:30
    Hello,

    Have you installed the USB Drivers? Are you selecting the correct COM Port (the one assigned to the PSC)? Since you have a BOE-Bot, could you try the PSC on the BOE-Bot? This will narrow down where the issue is.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • basicstampbasicstamp Posts: 3
    edited 2007-11-20 22:25
    Hello Chris,

    I found the problem: it won't work with an USB 1.0 port. When I use an USB 2.0 port it works good!

    Thanks
  • indaybdaindaybda Posts: 12
    edited 2007-12-05 03:33
    Hello,

    I standard servo I ordered worked the way I wanted. So I am ordering eight (8) more motors for my application.

    Thanks for the help,
    Indaybda
  • indaybdaindaybda Posts: 12
    edited 2008-01-02 02:54
    Hi Chris,

    I am almost ready with my demo using 9 Parallax Standard Servos and USB 16-channel Servo Controller. My mechanism requires sending simultaneous signal to all 9 motors. However, due to the pseudo-serial communication of the USB port, the signals to all the 9 channels are queued. The resulting motor motion would look like a wave, that is, one motor moved after the other and so on, instead of a single motion of all the motors moving at the same time.

    Is there a way of working around this problem? I am willing to sacrifice a little motion delay, if necessary, to achieve a single motion for all motors.

    One observed scenario:
    1. Turn off the power switch to the motors
    2. Send the command signals
    3. Turn on the power switch
    This will allow all motors to move at the same time according to the command signal.

    I am thinking of turning off the power switch by software and turning it back on (but I don't know how to do this). Or is there a more elegant way of achieving a simultaneous motion for all motors?

    Thanks,
    Indaybda
  • AdonisAdonis Posts: 4
    edited 2008-01-02 21:47
    I'm not going to say I'm a professional or anything, but you might want to try this: try switching the baud rate of your servo controller to 38k4 baud. i think the command for this is

    SEROUT Pin#, baudconstant + $8000, [noparse][[/noparse] "!SCSBR", 1, CR ]

    to make sure it worked you should capture the three-byte reply with

    SERIN Pin#, newbaudconstant, [noparse][[/noparse]STR buff\3]

    where buff is a three-byte array and it should return "B R 1" for the new 38k4 baud rate

    baud constant is a constant specific to the specific stamp or uC your using
    you should send the command in the default 2400 baud and recieve in the 38k4 baud
    the constants can be found as follows:

    BS2, BS2e, and BS2pe = (INT)(1,000,000
Sign In or Register to comment.