Shop OBEX P1 Docs P2 Docs Learn Events
Sumo and extra servos — Parallax Forums

Sumo and extra servos

JondiceJondice Posts: 8
edited 2005-03-27 05:12 in Robotics
I'm trying to use the sumo bot kit for a custom project, and I need to use an additional servo. I tried connecting a spare servo I had from a Boe-Bot kit to the X3 port (B, 2, 3) instead of one of the typical servo motor ports (X6 and X7, which are respectively labeled as B, R, 13 and B, R, 12). When I want the servo to rotate, I assumed that one of PIN 2 or 3 should always be high and the other should be sent a pulse train. However, this didn't work, and neither did keeping one of the pins low.

I realize I'm doing something very stupid here, but any pointers would be appreciated.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-03-27 00:57
    Jondice,

    ·· When controlling a servo, you set a given pin (The one you have the servo's signal line connected to) low, then send the PULSOUT to that pin.· Since the X3 port does not provide power, you will need to get power for the servo elsewhere.




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Tech Support
    csavage@parallax.com

    Post Edited (Chris Savage (Parallax)) : 3/27/2005 4:30:12 AM GMT
  • LarryLarry Posts: 212
    edited 2005-03-27 01:07
    Study the schematic that came with your Somo Bot.

    ·http://www.parallax.com/dl/docs/prod/robo/sumobotman.pdf

    you'll see that the black wire of your servo connects to ground, the red (middle ) wire connects to Servo power, and the white or yellow wire connects to a stamp pin. don't try to power a servo through a stamp pin- not enough juice and you could hurt your stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-27 01:10
    What Larry said. A Servo wants +5 to +6 through the Red wire, GND or VSS through the Black wire, and the white (or yellow) wire connects to a stamp pin.

    That pin is set as an OUTPUT, normally LOW. Then to position the Servo you send a PULSOUT of from 1 mSec to 2 mSec duration -- 1 mSec is all the way left, 2 mSec is all the way right, 1.5 mSec is center -- and repeat that signal every 20 to 50 mSec.

    And having a separate power supply drive the Red wire (with its ground connected to the BS2 Vss or GND) is a good idea, as the servo takes more current than the BS2.
  • JondiceJondice Posts: 8
    edited 2005-03-27 02:56
    Thanks for the quick replies smile.gif I just want to make sure I've got the right idea; the auxiliary ports like X3 seem to be useless for a servo since the power source is a stamp pin. I may attempt this wiring set up if it appears to be the right thing:

    servoconf1.JPG

    Thanks again!
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-27 03:40
    I don't really know what board you are talking about that has the "Aux" ports. Otherwise, you are correct.

    Note you might want to connect your additional servo power to "Vin(2)", especially if Vin(2) is actually supplied by a different supply than the one supplying the BS2.

    If Vin is 6-volts, and doesn't go through a regulator (like Vdd does), then you can get more 'oomph' from the additional voltage, and it affects your BS2 less, if your servos draw directly from Vin. So I wouldn't connect my additional Servo to Vdd, I'd connect it to Vin (IF and ONLY IF your Vin is 6-volts -- which since your other Servo's are tied to it, seems true).

    AHA!· I just looked at the schematic for the Parallax SumoBot -- you want to supply your third Servo power from Vin(1) -- which you have a jumper socket for, NOT from Vdd.· Otherwise, you have it exactly correct.


    Post Edited (allanlane5) : 3/27/2005 3:43:56 AM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-03-27 04:00
    No, you really can't use one of the Aux ports for servo control. While you may be tempted to set the center pin high to feed 5v to the servo, the current draw of the servo will overtax the BASIC Stamp and possibly damage it. If you need more servos on that board then you best add them manually by plugging a header into the breadboard, and using the 5v supply (from the regulator) to supply the servo. Be careful though, too many servos and you could overload the regulator under the right conditions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-03-27 04:34
    Power for the existing servos comes from Vin.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Tech Support
    csavage@parallax.com
  • JondiceJondice Posts: 8
    edited 2005-03-27 05:12
    Thanks for the help all.

    I ended up using Vin and doing everything else as specified in the diagram, and it works!
Sign In or Register to comment.