Shop OBEX P1 Docs P2 Docs Learn Events
Need some assistance in setting up servos on Protoboard — Parallax Forums

Need some assistance in setting up servos on Protoboard

MegaSpinMegaSpin Posts: 9
edited 2008-09-13 16:58 in Propeller 1
Hello,

I'm new to working with boards, but I'm doing my best. I'd like to set up a servo to my board. I understand where the four servo ports are. The board's manual says: "Install the shorting block on the first·header(next to the 3.3 volt regulater) to choose the servo supply."·So that means I should short the Vin and the adjacent pin?
Then, how do I control the servo? Is it on an I/O port? Or do I use a different command to control it? (I use spin.)

Also, will the servo recieve 5 volts? Currently, my board is hooked up to a 9 volt battery. Should I swap it for a 6 volt?

Thanks!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-05 01:28
    1) Servos are designed to work properly with voltages between 4.2V and 6V. They'll work up to 7.5V although higher voltages will tend to cause accelerated wear on the motor brushes. The Protoboard's 5V regulator will work nicely with input voltages of at least 6V and preferably 9V or less. I recommend using 6V (4 alkaline batteries or 5 NiMH rechargable batteries).

    2) You can run servos off the regulated 5V supply, but the regulator can provide only about 1A and servos can each draw that for a peak current when starting under mechanical load or when stalled out. You can probably manage with two servos running from the regulated 5V supply, particularly if they don't both start at the same time.

    3) There are 3 wires to a servo, ground, + power (4.2V-7.5V), and a control signal line which goes to the Propeller pin, preferably through a 1K resistor which dampens noise. Read the "Robotics with the BoeBot" tutorial for more details on servos.
  • MegaSpinMegaSpin Posts: 9
    edited 2008-09-05 02:18
    But what about shorting the pin next to the regulator? Is that necessary? And what I/O ports are the servo ports on? Also, could I just use motors?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-05 03:56
    The wiring on the Protoboard is set up to provide power to the 3-pin headers set aside for servos. There's a 3-pin area used to select whether Vin or Vdd is the supply for the servos with a 2-pin jumper block that connects the center pin to one of the two sides which are marked as +5V or Vin. If you don't place a jumper in one position or the other then there will not be power to the servos. If you're using a Vin = 6V as I suggested, then set the jumper on the Vin side.

    The servos are not connected to any I/O pins. The 3-pin headers have their control pins brought out to adjacent holes on the Protoboard. I put 1K resistors between those holes and the next ones over (standing the resistors vertically), then I connect a wire to each resistor and run that to whatever I/O pins I want.

    If you want to use DC motors, you'll need some kind of motor driver. This can be something as simple as a pair of DPDT relays (you'll need additional resistors, switching transistors, and diodes to drive the relays as shown in several Stamp manuals) if you just want on/off and direction control or some kind of H-bridge or more complex DC motor driver if you want speed control as well.
  • parts-man73parts-man73 Posts: 830
    edited 2008-09-06 01:05
    I took some pictures of my ProtoBoard with Servos attached (mounted to my BoeBot chassis) to help illustrate Mike's comments.

    Notice the red, yellow and blue wires in the picture titled "Servo1", they connect to P0, P1 and P2 respectively. they then connect to the 1K resistors, which are then attached to the bottom row of the servo headers. The colored wires and the resistor wire is soldered together underneath the board. I personally put components and wires on the top of the board, and solder connections between adjacent pins underneath.

    The center and top row of pins in the servo connectors are prewired to power and ground connections for you.

    In picture "servo2" you see I soldered in a 3 pin header over which you put a jumper. in the position shown, The power pins of the servos are connected to the 5 Volt regulator. If the jumper is moved to the other side, the servos receive straight unregulated battery voltage. A good source of these jumpers is an old computer. there should be a dozen or so of these jumpers on the motherboard.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian

    uController.com - home of SpinStudio - the modular Development system for the Propeller

    PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!

    SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board

    Post Edited (parts-man73) : 9/6/2008 1:20:30 AM GMT
    600 x 450 - 88K
    600 x 450 - 66K
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-09-06 01:19
    Brian - were you going to attach pictures with your post? Perhaps the photos are in a link I am not seeing embedded in your text.

    Sort of on topic, I see in Servo Magazine this month that there is an article by Chris on using the Propeller Protoboard and hooking a large amount of servos to it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.

    www.brilldea.com·- Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto fo SunSPOT, BitScope
    www.sxmicro.com - a blog·exploring the SX micro
    www.tdswieter.com
  • parts-man73parts-man73 Posts: 830
    edited 2008-09-06 01:30
    pictures added (opps)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian

    uController.com - home of SpinStudio - the modular Development system for the Propeller

    PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!

    SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board
  • MegaSpinMegaSpin Posts: 9
    edited 2008-09-13 16:58
    Sweet...thanks, guys.
Sign In or Register to comment.