# Difference between revisions of "Tutorials/Arduino Projects/Mobile Robotics/BoeBot/Continuous Rotation Servo Intro"

## What is a Servo?

Before understanding what a continuous rotation servo is, it is important to know what a servo is.

At the most basic level, a servo is just a controllable motor. There are various types of servos. The Standard Servo is a geared down motor that has a limited range of rotation. These servos use internal electronics to identify the current angle of the motor, and using an input signal, are told what position is desired. The electronics then do some calculations and will make the motor spin one way or the other, to get to the desired position.

Most servos use a form of PWM to receive the desired position from some controller. This is done by having a PWM signal with a period of 20ms. Now by simply adjusting the duty-cycle of the signal, it would be very easy for another device to measure the duty-cycle or pulse time, and use that to receive data. In this case the servo receives the PWM signal and measures the time that the signal is high. There are some variations for maximum and minimum pulse durations among the servos. However, all servos will position the servo output at the mid-point of its range of motion, when the pulse received is 1.5ms. Most servos have a maximum input of 2.0ms, and a minimum input of 1.0ms. So if you were to send a pulse for 1.0ms, the servo would go to one end of travel, and it would go to the other end if you sent a pulse for 2.0ms.

## So What is a Continuous Rotation Servo?

A continuous rotation sensor is a servo that does not have a limit on its range of motion. Instead of having the input signal where in its rang of motion to go to, the continuous rotation servo relates the input to the speed of the output. So if the input pulse is 1.5ms long, that would be the middle of the output, so the output would be stationary. Now if you were to send a 1.0ms pulse, the output of the servo would turn full speed in one direction. If you sent a 2.0ms pulse, if would go full speed in the other direction. If the signal is somewhere in between, it will turn in the direction that corresponds to which side of 1.5ms the input is, and at a speed based on the ratio of the input signal to the limit of the input. To help clarify, here is a table for a Continuous rotation servo with an input range of 1.0ms to 2.0ms.

Input Pulse (ms) Rotation Speed (%) Direction of rotation
1.0 100 Clockwise
1.1 80 Clockwise
1.2 60 Clockwise
1.3 40 Clockwise
1.4 20 Clockwise
1.5 0 N/A
1.6 20 Counter-Clockwise
1.7 40 Counter-Clockwise
1.8 60 Counter-Clockwise
1.9 80 Counter-Clockwise
2.0 100 Counter-Clockwise