How to use continuous servo to turn definited degrees

Hi,

I would like to use a continuous servo to turn a screw more then 360 degrees. I have no practice with that. I only know that I can turn the servo with the following values. 90 stop, 0 full speed left, 180 full speed right. Something between that values set lower speed.

My question is how i can turn this servo for example about 720 degrees to the right and hold?

Thanks for your help.

"My question is how i can turn this servo for example about 720 degrees to the right and hold?"

You will have to incorporate some type of position feedback into the servo setup that can determine 720 degrees of rotation. You might consider using a multi turn servo like a "sail winch" servo.

To add to Reply #1, a continuous rotation servo is not, of itself, capable of position control - only speed and direction. In fact it is not a servo at all, just a DC motor with a motor driver in a convenient package.

...R

I've thought of something like that.

Have you a example?

I have tried something in that direction and set a integer with the angel 0.

Then I have a button on a holeboard and start rotation on push. With each loop the value increase by 1 and after finish around 360 degrees I have a value of 86.

But that doesn't seem to work that way.

MrZortrax:
I have tried something in that direction and set a integer with the angel 0.

Then I have a button on a holeboard and start rotation on push. With each loop the value increase by 1 and after finish around 360 degrees I have a value of 86.

But that doesn't seem to work that way.

In what direction?

You need to post the program that represents your best attempt and tell us in detail what it actually does and what you want it to do that is different. It will make it much easier to focus on the parts you need help with rather than wasting time on things that you can do.

...R

That is my code for the moment…

in the first part as comment i start the servo with button and let them rotate 360°. After that i stop push the button and get the value of “rounds” for the angel…

the second part is a testpart of this. After pushing the button. The servo start to turn and stop after a waiting time of 125 a 10ms. For some rounds it looks good. But not everytime. I think that method is not precition enough to get trustly resuls…

#include <Servo.h>

Servo servo0;
int angel=0;
const int buttonPin =2;
int buttonstatus = 0;
int testphase = 0;
int grad=0;
float faktor=4.235294117647059;
const int servostep=85;
int servospeed=95;

void setup() {
Serial.begin(9600);//Serieller Monitor einbinden
servo0.attach(5);
servo0.write(90);
pinMode(buttonPin, INPUT);
}

void loop() {
buttonstatus = digitalRead(buttonPin);
//Serial.println(buttonstatus);

//if (buttonstatus == 1) {
//Serial.println(“run”);
//servo0.write(80);
//angel++;
//delay(10);
//}
//else
//{
// servo0.write(90);
// Serial.println(“ready”);
// Serial.println(angel);
//}

if (buttonstatus == 1)
{
delay(1000);
testphase = 1;
}

if (testphase == 1)
{
servo0.write(80);
angel++;
delay(10);
if(angel==125)
{
testphase = 0;
servo0.write(90);
Serial.println(“ausgeführt”);
Serial.println(angel);
angel = 0;
}
}

}

There is no way to set a continuous servo to a precise position repeatably. None. If you think that you have the timing right the supply voltage changing or the load changing or maybe just the ambient temperature changing will upset the timing.

Like zoomkat said, you need some sort of positional feedback to be able to set the position. The continuous servo has had the feedback element removed.

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom.. :slight_smile:

ok thanks i will take care.

So there is no other way to do this?
what about a large gear ratio with tooth rims and a normal servo? I could probably make several turns with that.

Would a stepper motor be an alternative?

MrZortrax:
Would a stepper motor be an alternative?

If a sail winch servo won't do it (and I doubt that it will), a stepper would be a good alternative.

"what about a large gear ratio with tooth rims and a normal servo? I could probably make several turns with that."

I think a typical sail winch servo is specified to make 6 tuns. It may make more outside of the typical RC +-45 degree control band. It may not have the mechanical resolution you need.

Basically "continuous rotation servo" is poorly named as its not a servo at all, just a motor+driver.

What distinguishes a servo system is feedback, ie "closed loop control".

The name comes from the fact they are made from a standard servo by disconnecting the feedback and
chopping off the end-stops.