How does a continuous rotation servo control speed ?

i have previously only been fiddling about with micro servos (SG90s) but have since got a pair of continuous rotation MG996R ("TowardPro" !!) servos.

i had been running my micro servos using the Servo.h library and just using the degrees command; servo.write(90) etc.

this seemed to translate okay to the continuous servo with servo.write(92) being a stop, servo.write(1) going clockwise (fast) and servo.write(179) going counter-clockwise fast.

all good, and as expected from my understanding of how servos work.

however, i realize that servos actually have no speed control, you tell it to go the 'x' degrees and it will move to it accordingly - you can slow it down in software using delays between pos='x' commands, but you cannot speed it up.

continuous servos, however, do speed up - writing "0 or 180" degrees would be rotation at its maximum speed, and slowing down as you approach "90" degree as 'stop'.

how does it do this ?

aside from the "PWM" of the pulse signals (as used in servo.writeMicroseconds(1500);) - is there also a PWM of the voltage level to control the speed of the rotation ?

i am also guessing different (continuous rotation) servos could have different methods depending on the chips used in them ?

A normal servo moves the servo arm until the potentiometer attached to the servo arm gives a reading that tells the servo that the arm is at the appropriate angle. When a new command is received if the arm is a long way from the correct position it will get the motor to move the arm as quickly as possible. As it gets nearer the correct position it will slow down so as not to overshoot.

In a continuous rotation servo the potentiometer is replaced by a pair of resistors effectively giving the impression that the potentiometer is always at its mid point. When you give it a command to go to (say) 150° the servo electronics thinks it is a long way from the correct position so it gets the motor to move quickly. Because the resistors are fixed the servo cannot actually get to the destination so it keeps going at a speed determined by the size of what it thinks is the position error. When you tell it to go to 90° (or so) it thinks it is at the correct position so it stops.

Using servo.writeMicroseconds() will give you finer control.


Basically its not a servo anymore as the control loop is broken.

Its not controlling speed as such, but PWM drive level - basically its just a motor controller with a Servo
style interface. No feedback.