Continuous Rotation Servo Help

Of course, a newbie here :wink:

I have a couple of "Parallax (Futaba) Continuous Rotation Servo"(s) that I'm trying to use with my new Duemilanova.

I have one wired to pin 9, one to pin 10, the power and grounds broken out to a soderless breadboard (for now).

What I can't seem to get right is the PWM to make the servos do anything sensible.

Datasheet here : [well, I can't post a link here I guess. The datasheet is available if you go to the Parallax site and search "Continuous"]

I see that the Servo library has the undocumented function writeMicroseconds but I assume I'm using it wrong.

Just as a test, since the datasheet says 1.5 milliseconds is center, I tried this :

void loop() 
{ 

  for ( counter = 1; counter <= 100; counter +=1) {

    leftWheel.writeMicroseconds(1500);
    rightWheel.writeMicroseconds(1500);

    delay(20);    
    
  }
  
}

That's basically a poor man's port of the BASIC STAMP code in the datasheet.

What happens is more than odd. One servo rotates clockwise very slowly and the other rotates counter-clockwise very slowly (it looks like about the same speed, in opposite directions).

Am I not doing this right at all? I'm completely new to using continuous rotation servos so I admit I'm a bit lost!

Thanks!

Perhaps I can post the link to the datasheet now :

http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/900-00008-CRServo-v2.0.pdf

That's because 1500 microseconds is just an approximation of the zero speed value. You will have to use a 'trim' correction value for each servo as each will have it's own sweet spot value between 100% forward speed( around 2 millsec), 100% backward speed (around 1 millsec), and 0% center speed (around 1.5 millisec).

Lefty

Oh, well that's great news.. I'll start experimenting

Any idea why I'm getting one servo spinning clockwise and the other counter-clockwise though? For kicks I grabbed the code for the Bundoggle robot (Bunedoggle - Take it to 11) and tried it after taking out the vision stuff and just using the movement, I get the same thing with that code - one servo goes one way, the other reverses...

Just normal variation in each servo's calibration. Play with the 1500 microsecond variable value (up or down a small amount) and you should find the value that makes each servo stay still.

Lefty

Thanks man, I really appreciate it.. I was worried I was doing something horribly wrong. Looks like 1516 works for both of these..

As far as the clockwise/counter-clockwise thing goes -- doh, they're mounted in a wheel configuration so they're moving the same direction, I just have them mounted inverted.. Oops ::slight_smile:

Those continuous rotation servos have trim pots - send the "center/stop" signal, then turn the trim pot till the servo stops. It's located right where the wire enters the servo.