Shop OBEX P1 Docs P2 Docs Learn Events
Controlling more than 4 servos on a BOE board — Parallax Forums

Controlling more than 4 servos on a BOE board

TTKoshiTTKoshi Posts: 9
edited 2009-01-12 00:43 in BASIC Stamp
Hello everyone-

I have a question, hopefully one with an easy answer. Is it possible to control more than four servos using a BOE-bot board? I have two boards, so i figure I can wire the two together (using the Serial In/Out commands), but I'd rather keep it on one chip. I've also seen the motion controller on the parallax site, but I believe thats more for scripting actions, correct? Any help would be appreciated, as I try to figure out if the project I'm curious on starting is even feasable. Many thanks everyone!

-Tom

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-08 21:18
    It's possible, but is more difficult the more servos you try to control. Servos require a control pulse about every 20ms and this can be as long as 2.0ms, perhaps 2.5ms and the Stamp can't really do more than one at a time without a huge hassle. At best you could have 8 control pulses and that would leave no time remaining in the 20ms interval to do anything else. With 4 servos, you're already using up half of the 20ms interval just with the pulses themselves. The other half would be consumed with reading sensors and making decisions and computations for any changes in movement. I would suggest that you use a separate processor to handle all the servos, either a Parallax Servo Controller which can handle up to 16 servos or several ServoPALs (each of which can handle 2 servos). Both devices take over the every 20ms pulsing and the Stamp only has to notify them when the pulse width changes.
  • TTKoshiTTKoshi Posts: 9
    edited 2009-01-08 21:40
    Hmm the ServoPal looks interesting. Now my question for the Servo Controller is, can i control the servos in a same manner in which I would using the BOE's onboard setup, or do I have to use the little motion scripting program that comes with the servo controller? I'm worried that the servo controller only scripts "animations" for the servos, and doesnt allow my BS2 program to control them. Am I wrong in that? And thanks for the reply, I never even thought about the pulse requirements.
  • KB3JJGKB3JJG Posts: 95
    edited 2009-01-08 21:57
    TTKoshi,

    The serial servo controller does the job of pulsing the servos for the stamp, so instead of having a send a pulsout all the time from your stamp program, you send a serial command to your serial servo controller ONLY when you want to servo position to change. Additionally, you can control many servos with a single pin on your stamp.

    There is no need to use anything other than a stamp and the serial servo controller to offload the servo work from the stamp. See the documentation on the ssc product page on how it works. Post if you have any further questions.
  • TTKoshiTTKoshi Posts: 9
    edited 2009-01-08 22:02
    so say i had four independent servos acting as wheels, i can program them in PBasic, then use something like serialout to send commands to the servo controller and have it do the work? meaning, i have the exact same control of my servos using the servo controller as i would using just the board? Sorry for the questions, but a total newb to this, and trying to wrap my head around this project. Many thanks!
  • SRLMSRLM Posts: 5,045
    edited 2009-01-09 05:55
    @TTKoshi

    Yes, you have the exact same control, but don't have to worry about refreshing the servos.
  • TTKoshiTTKoshi Posts: 9
    edited 2009-01-11 16:46
    Ok last question, I promise [noparse]:)[/noparse]

    Apart from the obvious interface, is there a difference between the USB and Serial Parallax Servo Controller? I mean, will I be able to program both the same way in PBasic, or will one be harder than the other? I plan on purchasing one this week, so any info will be greatly appreciated. Thanks!
  • KB3JJGKB3JJG Posts: 95
    edited 2009-01-11 17:35
    There is a significant difference between the two. The serial version is designed to work with your basic stamp and offload the work of controlling servos, the USB version of the servo controller is designed to be controlled by a PC either with parallax's supplied software or by custom user designed software.

    ·
  • TTKoshiTTKoshi Posts: 9
    edited 2009-01-11 17:55
    Ahh awesome, so the serial one would be better for robotics, while the USB one is more for animatronics that are scripted. Many many thanks!
  • SRLMSRLM Posts: 5,045
    edited 2009-01-11 19:41
    There is not a significant difference. The USB version just has an additional method of control available.
    Parallax PSC Product Page said...

    The PSC-USB functions exactly the same as the original PSC (serial). The only difference is the addition of the new USB interface.

    The USB one works with either control method. I've used it with both a uC and USB control. Personally, I don't see what the purpose of the regular PSC is, but there you have it.

    Post Edited (SRLM) : 1/11/2009 7:46:43 PM GMT
  • P!-RoP!-Ro Posts: 1,189
    edited 2009-01-11 20:02
    You suggested having four different servos to control wheels. If this is the case you could always tie up the signal for the servos on the same side. You won't need them going different speeds or they will oppose each other, so this setup wouldn't be a problem. This would free up your pins and timing on the basic stamp, so you could easily go without the servo controller. It just depends on your preference, though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG
  • KB3JJGKB3JJG Posts: 95
    edited 2009-01-12 00:25
    I stand corrected, it appears that the USB version also affords the same control as the serial version wit respect to interfacing to a MICON.
  • TTKoshiTTKoshi Posts: 9
    edited 2009-01-12 00:43
    I'm still working out how the wheels will be set up, this is sorta just a toy project for me to work on to learn PBasic and the whole robotics thing (i'm 27, so getting a really late start in the game). Thanks for all the help everyone, I really appreciate it.
Sign In or Register to comment.