Parallax Servo Controller USB
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
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
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
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.
Click here to see my Nomad Build Log
Thanks,
Indaybda
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
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support