Shop OBEX P1 Docs P2 Docs Learn Events
Continuous Rotation Servo Question — Parallax Forums

Continuous Rotation Servo Question

Roger RayRoger Ray Posts: 22
edited 2005-05-23 19:38 in Robotics
I just bought a couple of continuous rotation servos (Parallax #900-00008) and hooked up the red wire to 6V, the black wire to ground and the white wire to p15 of my basic stamp 2.· I programmed the basic stamp 2 to output a 1.5 ms pulse followed by a 20ms delay as in the code given in the servo info sheet

Servo·· pin 15
Start:
·· PULSOUT Servo, 750
·· PAUSE· 20
GOTO Start

Now the info sheet says I should adjust the potentiometer until the servo stops rotating.· Too much adjustment one way should yield a counter-clockwise motion, too much the other way yields a clockwise motion.· I should then be able to use PULSOUT from 500 to 1000 to get the servo to rotate in either direction.

However, the servo always rotates clockwise no matter how I adjust the potentiometer.

Could someone please tell me how·the continous rotation servos are supposed to behave?

Roger Ray

Comments

  • Russ FergusonRuss Ferguson Posts: 206
    edited 2005-05-22 20:15
    The adjustment potentiometer in the servos we have are extremely sensative. It can be a little tricky to find the spot on the potentiometer where the wheel will stop turning. One degree off in either direction and the wheel will start to turn.

    We move the potentiometer very slowly to find point where the wheel will slow down and then bump the screw driver little by little until it stops turning. We find that we have to go back and bump the potentiometer back to a stop after having used the servos for a while. A multi-turn potentiometer, or two resistors on each end of the potentiometer would improve this design some.

    You may have another problem however. Our servos will rotate both clockwise and counter-clockwise depending on which side of the stop position we are on.
  • Roger RayRoger Ray Posts: 22
    edited 2005-05-22 20:23
    I have seen the servo start to slow down but when i continue to turn it the servo speeds up again. The servo always runs clockwise. It never changes direction.

    Does anyone know what is the extent of the potentiomer? One turn, two? Does it wrap around?
  • edited 2005-05-22 20:24
    If it's always turning the same direction at the same speed while you adjust it, the phillips head may not be grabbing the potentiometer.· I've run into this problem occasionally, and a flat-head screwdriver has always fixed it.
  • edited 2005-05-22 20:32
    It looks like our previous two posts crossed, and mine didn't apply to your situation.

    The pot has a 1/2·turn range of motion.

    Try connecting the white signal line to P12, then copy and paste this code directly into the editor:


    [color=green]' {$STAMP BS2}
    ' {$PBASIC 2.5}
    [/color]
    [color=blue]DO
    [/color]
    [color=blue]  PULSOUT[/color] 12, 750
    [color=blue]  PAUSE[/color] 20
    
    [color=blue]LOOP[/color]
    
    

    ·
    Also, try the other servo, and see if there is any difference.
    ·

    Post Edited (Andy Lindsay (Parallax)) : 5/22/2005 8:40:41 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-05-22 22:26
    Hello,

    ·· It's also possible if you're using a different version of the BASIC Stamp, for example a BS2sx, that the timing parameters you're using will result in the servo always turning.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Roger RayRoger Ray Posts: 22
    edited 2005-05-22 23:37
    Hmm... I definitely have a BS2. Using the...

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    DO

    PULSOUT 12, 750
    PAUSE 20

    LOOP

    ...code with pin 12 as the control, I still get clockwise turning only. I am turning the pot and can get the rotation to slow down a bit. If I continue to adjust the pot, the rotation speeds up again. Using other timing values does not change the servo behavior.

    There seems to be only two speeds: full and half, with no gradation in between as the pot is adjusted. This behavior occurs with both of the servos I have.

    Any ideas?
  • edited 2005-05-23 00:40
    What kind of power supply setup do you have?
  • Roger RayRoger Ray Posts: 22
    edited 2005-05-23 01:01
    I have a 6V DC power supply, 4 AA batteries in series.
  • edited 2005-05-23 01:13
    Well, that rules out potential problems that can be caused by a dual supply setup.· I'm running out of ideas.· If this doesn't get resolved on the forum, a call to Parallax Tech Support would be the next step.· For their contact information, go to www.parallax.com -> Support.
  • Roger RayRoger Ray Posts: 22
    edited 2005-05-23 01:17
    ok, thanks.
  • Tom WalkerTom Walker Posts: 509
    edited 2005-05-23 14:47
    Perhaps these magic words will help....Common Grounds...

    In short, are the grounds for your Stamp and the ground for your servo power supply connected? If not, you can see some "interesting" behavior...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • Roger RayRoger Ray Posts: 22
    edited 2005-05-23 15:19
    The servo ground and power supply ground are connected.
  • Roger RayRoger Ray Posts: 22
    edited 2005-05-23 19:38
    Doh! Now I understand. With the servo ground wire connected to the 6V servo power and the 9V BS2 power, everything works as advertised. Common ground. Thanks everyone, especially Tom!
Sign In or Register to comment.