What is a Servo?

A servo, short for servomechanism or servomotor, is a simple mechanism that adds movement to any electronics project. This useful motor, originally found in remote-controlled cars and airplanes, is very popular due to the ease of precisely controlling its movement.

servo motors

 

DC Motor vs. Hobby Servo

An ordinary DC motor has two hookup wires and simply turns continuously when power is applied. To spin in the opposite direction, the power will need to be reversed. There is no built-in way to measure how far the motor has turned. If that is a metric that is needed, it will have to be an additional portion of the project.

A servo motor, on the other hand, is instructed precisely where it is supposed to turn using carefully-timed pulses which can be measured in your code. The servo has three wires: power and ground, plus a third wire to carry the command pulses.

 

 dc motor next to a servo motor

DC motor (left), hobby servo (right)

How Do Servos Work?

In the most generic sense, a servo is a device that uses feedback to achieve the desired result. Feedback control is used in many different disciplines, including speed, position, and temperature. Most servo motors have a rotational range of 0 - 180 degrees and provide a location/angle feedback loop to a microcontroller, so your Arduino, for example, knows what angle it's at. You can use a microcontroller to then tell the servo to move to a specific angle, and it will move and stay there until you tell it to rotate again.

Using a potentiometer attached to the rotating shaft, servos sense position. The width of the incoming pulse is measured and applies current to the motor to turn the shaft until the potentiometer indicates that the position corresponds to the incoming pulse width. This is a form of feedback control. At this time, the motor has received the desired position from the pulse width and the actual shaft position is fed back to the circuit via the potentiometer.

Going Further

Is a servo the right motor for your project? Check out our list of motors and their upsides and gotchas.

Continue on in your servo education with our Hobby Servo Tutorial. This tutorial takes you from an intro into servos to controlling a servo with Arudino as well as trouble shooting. 

Subscribe to SparkFun Education Blog

Recent Posts

Submit Your Idea