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

Parallax Servo Controller USB

indaybdaindaybda Posts: 12
edited 2007-08-11 18:16 in Robotics
Hello all,

I am using USB parallax servo controller with a continuous rotation parallax motor. I was wondering if I can move the motor by hand (as a passive motor) and the motor position will change accordingly.

Right now I can move the motor by hand (takes a little more effort) but the motor position does not change.

Please CC your reply to 'rjamisolajr at gmail dot com'.

Thank you very much,
Indaybda

Comments

  • John R.John R. Posts: 1,376
    edited 2007-08-05 13:39
    The short answer is "no".

    There are a few "gotchas" with what you're trying to do.

    First, the "position" feedback from the PSC is not a feedback from the servo about it's position, but it is feedback from the PSC about what pulse it last sent to the servo. I'll explain this more below.

    This type of R/C (Radio Control) hobby servo does not really provide any type of feedback to the controlling system about what position it is actually in. (see below on how the servo really works)

    To cap all this off, when you have a servo modified for continuous rotation, the mechanism that normally is used for position control becomes "disabled" and is used for speed control.

    Details:

    We'll start with how these servos are controlled. They have three wires, + and - power, and a signal line. The signal line is what we send our control signal out. They work with a pulse sent out every 20 ms (50 times per second). The width of the pulse determines what position the servo is sent to (for servos not modified for continuous rotation). The width (on time) of the pulse is varied between 1 and 2 ms (microseconds) 1 microsecond is at one end of movement, 2 at the other, and any value in between will position the servo proportionally in between. There is no "feedback" from the servo to the device sending the pulses (R/C receiver or micro-controller). The servo itself has an internal position sensor (basically a rheostat or "pot"), but this signal is not available to the outside world.

    In the case of a servo modified for continuous rotation, the inside of the servo is modified so that the internal electronics think the servo is always "centered", or at the position it should be at if the pulse is 1.5 ms. Now when a different length pulse is sent, the servo will try and get the servo to this "position", but as the internal sensor has been "fixed" the servo will rotate forever trying to get to the new position. The farther away the pulse being sent to the servo is, the faster the motor will turn.

    For more information, see the "What's a Microcontroller" (WAM) text from Parallax.

    Now on to the PSC, and it's position reporting commands.

    As mentioned above, the servo needs a pulse every 20 ms, or 50 times per second. If you have a number of servos (e.g. my nomad has 18 for the legs, and will have more for the sensor servos), you need a system that can remember, and send out these pulses for each servo. That ends up being a lot of pulses (18 * 50 = 900 pulses per second). It doesn't take too many of these, and a STAMP can't generate the pulses fast enough, much less do anything else. So you use something like a PSC. The PSC does all the "grunt work". You send it a command to put a servo in a specific position once, and it remembers that position, and keeps sending the pulse out every 20 ms. This lets your STAMP (or other processor) go about it's business and do other things (like checking sensors, navigation, etc.) Now let's say your system is controlling a servo on a PING [noparse]:)[/noparse]) sensor. You're panning the servo, but not really keeping track of where it is, because you don't have variable space, or are reacting to other events. The PING [noparse]:)[/noparse]) gives a return. You want to know what direction. You send the "position" command to the PSC, and the PSC reports back. What the PSC is sending you, is the position that corresponds to what pulse width it is sending out. This isn't a report of where the servo ACTUALLY is, but where it is SUPPOSED to be, according to the pulse being sent. The above example with the PING [noparse]:)[/noparse]) is a poor one. Where the position command comes more into play is when you use the "ramp" feature of the PSC. You start a servo at one end of it's "sweep". You send the PSC a command to send the servo to the other end of it's sweep, with the maximum ramp time. Sometime during that sweep, you get a return from the sensor. Now the "position" command will return where the PSC is in the transition from one end of the sweep to the other.

    Again, with a servo modified for continuous rotation, in stead of "position" this all becomes speed and direction.

    Setting all that aside, for an unmodified servo, there is a way to get position feedback. Search for a thread originated by Jon Williams on servo position feedback.

    Another alternative would be to use one of the Robotis servos, but I don't think these will work with a STAMP, and they won't work with a PSC. You'd need to use the Robotis controller, or a Propeller (or some other controller faster than a STAMP)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.
    Click here to see my Nomad Build Log
  • indaybdaindaybda Posts: 12
    edited 2007-08-05 22:35
    OK. Thanks for the much detailed response.

    So I would need an unmodified (not continuous rotation) motor to achieve what I want.

    On the other hand, do you think there is an alternative USB controller that I much faster other than the one I have?

    regards,
    Indaybda
  • John R.John R. Posts: 1,376
    edited 2007-08-06 04:27
    As explained above, even with an unmodified servo, you won't be able to set the position by hand, and read where you positioned it with the PSC. This is a function of the servo design itself, not a limitation of the PSC. Any other type of "R/C Servo" controller will have the same problem.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.
    Click here to see my Nomad Build Log
  • indaybdaindaybda Posts: 12
    edited 2007-08-11 15:47
    I was wondering if I use Futaba servos (with feedback capability) together with my Parallax USB board, will I be able to read from the motor feedback? Or will I still read the last command I sent to the Parallax board? I was hoping I can still use my present Parallax board to read feedback by using other servo motors with feedback capability.

    Thanks,
    Indaybda
  • indaybdaindaybda Posts: 12
    edited 2007-08-11 15:53
    A follow-up to my above point, there is a picture of Futaba servo (S-148) here with a potentiometer and the cable connection is red, black, and white that is exactly the same as my Parallax continuous rotation servo.

    http://www.seattlerobotics.org/guide/servos.html

    I am guessing I can achieve what I want by buying this motor and using my Parallax USB board.

    -Indaybda
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-08-11 16:14
    indaybda -

    What gives you the impression that the servo is capable of supplying feedback? I presume you mean feedback externally, and not the internal feedback within the servo.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-11 16:27
    The only servos that I am aware of that can provide position feedback are the Dynamixel digital servos from CrustCrawler (www.crustcrawler.com). These require a special USB to serial I/O controller or a high speed microcontroller like the Propeller or SX, but they do provide position feedback along with a lot of other data. They are also much more expensive than standard analog or digital R/C servos.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-08-11 18:16
    The PSC does not accept any feedback either from any servo that provides it. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.