Servo motor: a motor with position feedback built in
A hobby servo takes its angle from the PWM pulse width; an industrial servo moves precisely with an encoder and three nested control loops.
Hobby RC servo
A DC motor + gears + potentiometer (position sensor) + control circuit in one package. Send a 50 Hz (20 ms period) pulse on the signal wire and the pulse width sets the target angle.
| Pulse width | Angle (typical) |
|---|---|
| 1.0 ms | 0° |
| 1.5 ms | 90° (centre) |
| 2.0 ms | 180° |
On an STM32 timer, set PSC for 1 MHz, ARR = 19999 and CCR = 1000 to 2000. The range differs slightly by product, so check the end points to avoid mechanical collisions.
Continuous-rotation servo
A servo modified by removing the position feedback, so it stops at 1.5 ms and turns in either direction for shorter or longer pulses.
RoadmapSee where this note sits in Motor Control→Industrial servo
An AC servo (PMSM) + high-resolution encoder + servo drive. Inside the drive, three loops run (current → speed → position), and the upper controller gives the target position as a pulse train or over EtherCAT. In the end it is a product containing the FOC and cascade control from this site's roadmap.
How to choose
| Need | Choice |
|---|---|
| Simple angle, low cost | RC servo |
| Accurate position, no lost steps | Encoder + servo |
| Low-cost precise feed, low speed | Stepper motor |