Servo motors allow to position somthing, for example a pointer.

The basic Arduino code to move that pointer could be something similar to:

#include <Servo.h>

void setup() 
  myservo.write(90);  // set servo angle

See the Arduino API for information about “writing” a position. That position is regulated with help of a feedback loop.

Let’s look a bit deeper into the feedback mechanics of a servo motor.

Position control

Typically, servomotors look as:

R/C Servo

From this picture, we see two important parts. Some gears on top, and the main DC motor bottom left. Bottom right is some integrated circuit, and a potentionmeter. I opened a damaged servo to look inside, and the parts are clear here too:

servo motor

Removing the DC motor, gives some mechanical parts as well as a potentionmeter to get feedback.

Another nice illustration of the different parts is in this video:

Postion feedback

By adding feedback of the position of the motor, the position can be better controlled. This is basic feedback theory, but requires reading an extra signal. This is often not done with a servo motor.

Continuous rotation

Often, servo motors are limited to a position range only, e.g. 0 to 180 degress. This is done with the gears and the motor feedback if I understand correctly. It is possible to remove the limitation. This is shown in this video:

It is also possible to buy continous rotation servo motors directly, e.g. from Adafruit. The advantage of using such kind of motors is the gearbox.


Leave comments at reddit