Continuous servos

For all you guys who have bought or modified a continuous 360 servo, how does it work?

I want to be able to have a very controllable motor that I can tell to make specific number of turns and stop. Would that be a way the continuous servo could work?

I mean, for other servos, sending different square waves gives different angles, but if the servo goes all the way around and again... how do you tell it what you want?

(just want to know if it is feasible and a general sense of how it works before I buy one and try it)

I haven’t tried out the

I haven’t tried out the whole modified servo thing, but I don’t think you can use it to be able to turn a specific number of turns.

The trick with the modified servo thing is that normally a servo has a potentiometer attached to the output shaft and this makes it able to measure the current angle it is at by simply measuring the resistance of the potentiometer. When you modify it you remove the potentiometer and replace it by two equal valued resistors in a voltage divider setup where you connect the measuring circuitry to the joint between the two resistors. This makes the servo think that it is always centered. There is no way to get back any information on how many turns the servo has done. You should think of the modified servo as a geared motor with a simple control interface where you can set it in forward, reverse or stop. I’m not sure of this - so anyone with better intel please correct me if I’m wrong - but I think that a servo turns faster with greater angles, so if you set the servo to turn to an angle close to center, the servo will not turn as fast as if you set the servo to turn to an angle far from center.

You can add wheel encoders to your project to be able to measure how many turns each wheel has done. You can see a small project for the Tamiya twin motors here.

If you would rather just BUY

If you would rather just BUY a modded servo, this would be one place.

I see… Well, it still

I see… Well, it still sounds like the interface makes it easy to control.

@ people who use continuous servos: do you find them pretty consistent in rotation speed vs. settings? What I’m thinking is having one on each side of my robot for some solid control in movement: so if the two servos are not very consistent with the settings they are given, or each other, that would make my plan a waste of money (since gear motors would have worked just as well for cheaper).


edit or I can be a man and learn PID control :stuck_out_tongue:, but seriously can two servos be pretty close?

From my exp with the
From my exp with the Parallax boebot which uses 2 CR servos for it’s motor drive, they were pretty consitent. The documentation(free to download btw) tells you how to fine tune them if they are out of sync. One thing to note, these are great for flat surface use and some light terrain, but I’m not too sure about their long term use as a major motive force.


Two modded servo motors would be no similar in speed than any two other “identical” motors. Unless you have closed loop control (AKA feedback, AKA PID) there is absolutely no way you can have any two motors run at the same speed. There will be slight differences in coil length, magnet strength (which will change depending on the number of times they’ve been dropped and stuff) the bearings will have different mechanical resistances… No two motors go and the same speed without closed loop control.

(Except steppers, and even there, you need to assume that a commanded step has actually taken place…)

I use servos for drive and they are AWESOME!!!

My little erector-set robot (with the green wheels) uses servos for drive. They came with the “Vex” kit but they are nothing more than a std. continous rotation servo. I have full fwd and rev AND speed control! Not to mention you get fwd and rev with one pin!

The command I use simply servo 1,b1 where b1 is a value between 75 and 175. If 75 is used the servo turns forward at full speed. 175 is full reverse. As you change these values (moving them closer to 150) the motors slow down. In practice it seems there is a usable range:

75: Fast fwd

95 Wiked slow fwd

160 Crazy slow rev

175 Fast Rev

I have found that changing the value even by one is noticable. Right now the “forward” on my bot is servo 1,75 servo 2,78 -the 3 point difference is how I “trimmed” the robot to drive straight!

As for feedback, you can’t count rotations. But I have been playing with encoders and I might have some ideas for you. baby!!

continuous servo don’t work on First Robot
So I have to buy a new standard servo because I have a continuous servo? There is no way to make a continuous servo into a standard servo?

well i guess you are using

well i guess you are using it to rotate the … ultrasonic sensor right?

well why not just make it rotate at full speed and stop it some seconds later. that should do it. you know it may be slower than a normal servo but you (or we…got a continuous one too) could make something nice out of it.

How would I do that? What

How would I do that? What the programing code to go with that.

well … you just have to

well … you just have to stick with chris’ codes i guess, they do work for my servo:


75: Fast fwd

95 Wiked slow fwd

160 Crazy slow rev

175 Fast Rev


so you could write something like this:


servo 0, 75

wait 1

servo 0, 150


Thanks ! I’ll try this when

Thanks ! I’ll try this when I am home.

Ok this seems like a really bad idea…

First of all, the "wait" command need to go bye-bye. Use "pause" instead. You can get down to milliseconds with pause i.e. pause 1000 is just one second and you now you can break up that second into 1000 tiny, tiny parts -much more accurate. However, all I can imagine is one missed or screwed up code and the next thing you know you have wrapped the sonar leads around the sensor about 3 times before it breaks the board in half. You know, a servo is only 10 bucks and can be stopped at very precise stops. Using a "timed" stop, is going to get funny as your batts get low and the servo moves slower. If nothing else, use some solid stops and/or a couple little buttons to tell the pic that the servo has gotten to where you told it to go. -Just a thought. baby!!

Thanks Chris, this was
Thanks Chris, this was exactly the kind of info I was looking for. I think I will get some after all (as soon as have spending money again :-P)

Feedback for servos

There is a company called Nubotics that makes something called a Wheelwatcher.

Basically it is an encoder wheel attached to the output of a servo (or other motors too) that is aligned to a PCB attached to the servo. The PCB has the photo interupters to read the quadrature postion, so that your microcontroller can keep track of where the shaft has rotated. I think Acroname and a couple other robot places carries them. Adds about $26 to the price of the servo though.

In some servo mods for continuous rotation, the pot can be left intact, but centered, so that a center point can be adjusted later. ( For changing a stop value, or whatever else. )



Rotary (Quadrature) Encoders
I bought a handful of rotary encoders from Farnell. They’re not exaclty what I thought they were, but they are great for direction and speed sensing.

Can you please give me the
Can you please give me the whole programming code? I still have trouble getting it to work?

what do I do wrong here?

Symbol dangerlevel = 70’ how far away should thing be, before we react?

symbol turn = 300’ this sets how much should be turned

symbol servo_turn = 20’ This sets for how long time we should wait for the servo to turn (depending on it´s speed) before we measure distance

main: ’ the main loop

readadc 1, b1 ’ read how much distance ahead

if b1 < dangerlevel then

gosub nodanger ’ if nothing ahead, drive forward


gosub whichway ’ if obstacle ahead then decide which way is better

end if

goto main ’ this ends the loop, the rest are only sub-routines


nodanger:’ this should be your combination to make the robot drive forward, these you most likely need to adjust to fit the way you have wired your robots motors

high 5 : high 7 : low 4 : low 6




gosub totalhalt ’ first stop!

‘Look one way:

gosub lturn ’ look to one side

pause servo_turn ’ wait for the servo to be finished turning

gosub totalhalt

servo 1, b1

’Look the other way:

gosub rturn ’ look to another side

pause servo_turn ’ wait for the servo to be finished turning

gosub totalhalt

servo 1, b2

’ Decide which is the better way:

if b1<b2 then

gosub body_lturn


gosub body_rturn

end if





high 7 : low 5 : low 6 : high 4 ’ this should be your combination that turns the robot one way

pause turn : gosub totalhalt



high 4 : low 7 : low 4 : high 6 ’ this should be your combination that turns the robot the other way

pause turn : gosub totalhalt


servo 0,95’ look to one side

wait 1



servo 0, 160 ’ look to the other side

wait 5



low 4 : low 5 : low 7 : low 6’ low on all 4 halts the robot!

Servo 1,75’ face forward

wait 1 ’ freeze all for one second


i’m just gonna get a 180

i’m just gonna get a 180 servo…that’s much simpler and anyways i guess i’ll use some 360 servos for my next bot (instead of geared motors).

and as to your code (vince) if you want to try out the “timed turning” you have to change the lines where the “servo” command is used (as i wrote before).


You might get help if you
You might get help if you say what the robot is doing and post pictures of the robot. The problem might not be with the code but how the wiring is done.