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

Continuous Rotation Servos

MikerocontrollerMikerocontroller Posts: 310
edited 2008-05-31 04:59 in General Discussion
··· I'm driving two continuous rotation servos (GWS S35/STD) using the PULSOUT command.·· It seems that if
I add a 20ms. PAUSE within my loops I only get a slower rotation.· I get the highest rotation speed when I do away with the delay altogether.· I've tried different PULSOUT values above and below 750(1500us.) and I get my highest speeds at 1000 and 2000us.·Both servos idle at·1500us. ·Everything I've read so far seems to say pulse the servo every 20 ms. at a pulse-width of 1000 to 2000us.· I'm powering the servos with a seperate six volt supply (battery) ·and using a Basic Stamp2 Homework Board with the nine volt battery.· I tied both power supply grounds together.· This example code will rotate the servos about twice as fast without the PAUSE 20 added.

··'servo three-wire connections: brown/ground· red/+6v.· orange/signal
· 'servo at pin 15· 1ms. pulse / servo at pin 14 2ms. pulse··/ no pause

···· DO······················
···· PULSOUT 15,500
···· PULSOUT 14,1000
···· LOOP

· Why is this?
I was considering using motors instead of servos because they seem·so slow (30 r.p.m. with fresh
batteries).
··
············· THANKS M.J.D



·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-24 14:37
    1) Servos are slow because they're heavily geared down to get reasonable torque from small motors at power drains from modest battery packs. They were intended for radio control models, particularly planes and boats where weight and size are important. By all means switch to DC motors for higher speed, more torque, etc. You will need some kind of external controller like Parallax's HB-25 or any of Polulu's motor controllers and you will need a power supply appropriate to the motor(s) involved.

    2) Most servos won't work well without the PAUSE. They really do better (and are specified) for control pulses roughly 50 times a second. Perhaps the GWS servo uses a slightly different control circuit than most servos and a side effect of that is the behavior you've seen. In any event, the standard is a control pulse with a width from 1ms to 2ms centered at 1.5ms and repeated 50 times a second.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-05-24 15:31
    The servo pulse period should not exceed 20ms.· If your pulse is 1ms and your Delay is 20ms, then that is 21ms (47 pulses/sec [noparse][[/noparse]Hz]); if your pulse is 2ms and your Delay is 20ms, then that is 22ms (45 pulses/sec [noparse][[/noparse]Hz]).· It's OK for your servo pulses to go at a faster rate, but not fewer than 50/sec.
         DO                       
         PULSOUT 15,500     ' 1ms
         PULSOUT 14,1000    ' 2ms
                            ' 3ms in PULSOUT time
         PAUSE 15           ' 3ms + 15ms = 18ms
         LOOP
    
    
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-05-27 14:15
    Most servos would not tolerate over-driving the servo like that. For many not using a PAUSE would cause the servo to become erratic, jittering in place.· To be honest I am surprised it is working for you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • MikerocontrollerMikerocontroller Posts: 310
    edited 2008-05-31 04:59
    ·· Thank-you for your replies.·· I'm going to order a set of continuous rotation servos from
    Parallax.· I forgot to mention that I drove the servos from the 9v. unregulated terminals of
    the Homework Board before I wired in a seperate 6v. supply.· That was probably a bad idea.· I'm using the servos on a TankBot (Budget Robotics) and it really c-r-a-w-l-s· with· the 1" drive sprockets at 30 rpm (unloaded without treads).··If the new servos turn at 50-60 rpm i'll be happy enough.· I'm using a fixed PING sensor only·but the tank navigates impressively well.·· I'll post the completed project soon.· Thank-you again.
Sign In or Register to comment.