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

Continuous Rotation Servo

djp5288djp5288 Posts: 4
edited 2011-05-17 08:04 in BASIC Stamp
Hello,

I am building a light Gel changer (to change the color of a flash bulb) with two continuous rotation servos (for two lights) and the basic stamp 2. I need the servos to rotate 60 degrees exactly every time. forward and back if possible (only forward can work too). Can anyone help me with how long my pulsout should be and how many loops i should have?

this is my pertinent code right now

FOWARD:
FOR rotation = 0 TO 15 'designates how long the servo rotates
GOSUB CLOCKWISE
NEXT
PAUSE 600

CLOCKWISE:
PULSOUT 12, 731
PULSOUT 13, 731
PAUSE 20
RETURN

any and all help would be greatly appreciated.
Thanks!

Comments

  • ercoerco Posts: 20,256
    edited 2011-05-11 22:33
    You won't have much (any) luck with CR servos, they have no position reference, they are just a gearmotor with a speed control.

    Get some regular servos which have position feedback, they can go at least +/- 60 degrees, probably closer to +/-90.
  • djp5288djp5288 Posts: 4
    edited 2011-05-12 13:36
    Problem is, I have a disc with 6 different gel colors on it that needs to rotate in front of a light to change its color. I need the thing to rotate 360 degrees. So continuous rotation seems to be the only way to go?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-05-12 14:18
    There are other servos available for special uses. In particular, there are "winch" servos that have 360 degree or 720 degree rotations with control pulses from roughly 1ms to 2ms. This sounds like just what you need.
  • ercoerco Posts: 20,256
    edited 2011-05-12 15:20
    Or use CR servos or gearmotors in conjunction with an indexing switch that clicks every 60 degrees. Your software will have to count switch clicks and keep track of where each disk is.
  • djp5288djp5288 Posts: 4
    edited 2011-05-12 15:48
    I need to have this done by monday. Is there any way to just make the servo turn 60 degrees at a time? it doesnt matter if i know where the disc is or not. I just need it turn 60 degrees at a time. I can cycle through the colors. thats not a problem.
  • Mike GMike G Posts: 2,702
    edited 2011-05-12 17:16
    You'd have to get out your stop watch and time the servo for a rotation of 60 at whatever PWM signal. Then translate the stop watch to a PBasic loop. I suppose if the servos moves slow enough, you could get close to 60 degrees each time. Might be easier to drop by your local hobby shop and pick up a "winch" servo as suggested. I believe you find them on RC sail boats.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-12 17:51
    Stepper motor with a home position arrangement (either w/ det/sensor or user positioned at INIT); from there it'd be "flawless", a matter of pulses (click, click,... click.)
    Too bad you're in such a rush.
    Oh well.
  • djp5288djp5288 Posts: 4
    edited 2011-05-12 17:55
    do you think any hobby shop will carry a winch servo? ... anyway thanks for all the help/suggestions
  • cazman128cazman128 Posts: 25
    edited 2011-05-12 20:27
    You could try online for some,a whinch servo will be your best bet. Itll make things alot easier
  • Mike GreenMike Green Posts: 23,101
    edited 2011-05-12 20:44
    You could also use a standard servo with its 180 degree or greater output movement, put a pulley on the gel wheel shaft and use a string / rope wrapped around the pulley and fastened to the servo "horn". Use a small spring as a tensioner and there you go ... 180 degree turn on the servo gets you roughly 360 degreens on the gel wheel with the right sized pulley.

    You could also use a nylon gear on the servo shaft and a matching gear on the gel wheel shaft. With a 2:1 circumference ratio, you could also get 360 degrees of motion on the gel wheel with 180 degrees of motion of the servo.
  • W9GFOW9GFO Posts: 4,010
    edited 2011-05-12 21:11
    Another idea;

    You could attach a string to the end of a standard servo's horn, wrap the string around the gel shaft a few times then tie it to an elastic (rubber band) and anchor the rubber band.

    The rubber band pulls the wheel one direction, but only so far as the servo allows. The shaft diameter should be half the length of the servo horn so that 90 degrees of servo travel equates to 360 degrees of gel wheel travel. If there is a problem with the string slipping on the shaft you could use two separate strings, each one fixed to the shaft but one going to the servo and the other to the elastic.

    Rich H
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-14 19:19
    Monday approaches quickly.
    I made this demo with a stepper motor (half-stepping) and a SpinStamp.
    I could've used a BS2, but I'm trying to stay in SPIN Mode.
    I didn't do 6 positions, but that much is academic. As you can see, positions are definite, repeatable, and solid as a rock.
  • ercoerco Posts: 20,256
    edited 2011-05-14 20:51
    Beautious, Peej!
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-17 08:04
    From anyone else that'd be faint praise. Thanks, erco.

    Well, it's Tuesday morning. I completed this little exercise with 6position/60deg, anyway.
    Just a little challenge.

    I wrapped it into my Stepper Motoring with the Propeller subject. If anyone is interested, see #9 (number none, number nine,...) here.
Sign In or Register to comment.