Servo Motors
A hobby servo is a small DC motor, a gearbox, a position sensor, and a controller in one box. You send a pulse every 20 ms, and the width of the pulse sets the angle. The servo does the feedback control for you.
Pulse width to angle
Most hobby servos read a pulse every 20 ms. A 1.5 ms pulse means center, and about 1.0 to 2.0 ms covers the normal range. A common mapping is
What to notice
The actual angle lags the command, because the servo has a top speed, typically about 60° in 0.1 to 0.2 seconds. Add load, which here pulls the horn down like a weight, and the horn settles a little short of the command, since the internal controller is mostly proportional and needs an error to make torque. Push the load above the servo's rated 10 kg·cm and it cannot hold, so the horn sags while the motor strains and heats up.
Hobby servos only report their angle to their own controller. Smart servos, such as the serial bus servos used on many robot arms, also report angle, load, and temperature back to the computer.