Continuous rotation Servo

Hi,

I have a continuous rotation bidirectional servo and I am actually able to make it run, then stop at its neutral point (96)and start again when a condition is fulfill. My problem is that I would like it to rotate in the other way (counter clockwise) and do exactly the same. I am new with the Arduino code.

Thanks

Philomene: Hi,

I have a continuous rotation bidirectional servo and I am actually able to make it run, then stop at its neutral point (96)and start again when a condition is fulfill. My problem is that I would like it to rotate in the other way (counter clockwise) and do exactly the same. I am new with the Arduino code.

Thanks

Should be straight forward as you are working OK in one direction. Can you post your code? Stop as you stated for your servo is a 96 degree value, 180 should be full speed in one direction and 0 should be full speed in the other direction.

Lefty

Lefty :

Check out the POLOLU website for their servo controllers . I'm using one of their 8 channel model with a couple of these servos on a small bot platform and it works great !

Continuous rotation servos will operate in both directions ; with " proportional speed control " about the center OFF point . I beleive that they are using the lower 100mSec pulse width limit as FULL SPEED clockwise , 150mSec ( center pulse width ) as OFF , and 200mSec upper pulse width limit as FULL SPEED counter-clockwise .

Their GUI is kinda cool as one can play around with setting custom " end points " , ramp up/dn traversing times between 2 set points and such like . This board also allows " drag and drop " instructions to be stored on-board in about 8K of NVRAM . Program it for testing , plug it in the bot ; and execute . Reprogram from your laptop via USB .

Pretty cool little board .

Hope this helps a bit at least .

Regards : Rick

Most continous rotation servos move at max speed when the max or min control values are used, and stop when the center of those two is used. No code or info on your servo doesn't leave much for suggestions.

Hi, Here’s the test code I use to find the values when the servo stops. Then you can use those values in later code…

/* YourDuino TapeBot Test 11/12/11
Steps through motor speeds, displays on monitor
– Find the values that stop the servo
– Pick the speed range and directions you want to use.

terry@yourduino.com */

/-----( Import needed libraries )-----/
#include <Servo.h>

/-----( Declare Constants )-----/
#define MOTOR_LEFT 9 /-(servo for Left wheel)-/
#define MOTOR_RIGHT 10 /-(servo for Left wheel)-/

#define LEFT_ZERO_TRIM 0;
#define RIGHT_ZERO_TRIM 2;

/-----( Declare objects )-----/
Servo LeftMotor;
Servo RightMotor;

/-----( Declare Variables )-----/
int LeftSpeed;
int RightSpeed;
int pos;

void setup() /----( SETUP: RUNS ONCE )----/
{
/-(start serial port, Init servos)-/
Serial.begin(9600);
delay(1000);
Serial.println(“YourDuino TapeBot Test Program”);
LeftMotor.attach(MOTOR_LEFT);
RightMotor.attach(MOTOR_RIGHT);
delay(1000);
} /–(end setup )—/

void loop() /----( LOOP: RUNS CONSTANTLY )----/
{
Serial.println(“Bot Test: Motor Speed Range”);
LeftMotor.write(90); // STOP Motor
delay(1000);
for(pos = 60; pos<=120; pos+=1) // goes from 60 degrees to 120 degrees
{
LeftMotor.write(pos); // tell motor to go to speed in variable ‘pos’
Serial.print(“Data=”);
Serial.println(pos,DEC);
delay(1000); // waits for the motor speed to be seen/heard
}

delay(2000);
Serial.println();

}/* --(end main loop )-- */

/* ( THE END ) */