How Servos Work: From Pulse to Motion

The little motor that knows exactly where it is

1

Three Wires, Total Control

Every hobby servo has just three wires: red (power, usually 5V), black or brown (ground), and yellow or white (signal). The signal wire carries the pulses that tell the servo what angle to hold. Drag the slider to send a different angle command.

Commanded angle: 90°

The yellow signal wire delivers angle commands. Power and ground complete the circuit.

2

PWM: How a Pulse Becomes an Angle

The trick is Pulse Width Modulation. A pulse 1.0 ms wide means 0°. 1.5 ms means 90°. 2.0 ms means 180°. The pulse repeats every 20 ms (50 times per second). Move the slider to see the pulse width change.

90° → 1.50 ms pulse

Each pulse is a tiny voltage spike. The servo only cares about how wide the spike is, not how often it arrives.

pulse_ms = 1.0 + (angle / 180) × 1.0
A microcontroller like an Arduino has hardware to generate exact pulse widths down to a microsecond. That tiny precision becomes precise angle control.
3

Inside a Servo: Closed-Loop Magic

Open up a servo and you'll find four parts: a small DC motor, a stack of gears to slow it down and increase torque, a potentiometer to measure the actual shaft angle, and a tiny control circuit. The circuit compares the commanded angle to the measured angle and runs the motor until they match. Try disturbing the shaft.

The control circuit runs the motor until the measured angle matches the command.

error = commanded_angle - measured_angle. If error ≠ 0, run motor.
This is a closed-loop control system. The feedback from the potentiometer is what makes a servo "stiff" — push on the horn and it pushes back. A regular DC motor with no feedback would just give up.
4

Servos vs Steppers vs Brushless

Servos are great, but they aren't the only way to make a motor turn precisely. Here's the family tree of motors used in robotics, drones, and 3D printers.

Hobby Servo
Set an angle. It holds.

Cheap, small, and accurate to a degree or two. Limited to about 180° of rotation and modest speed. The control circuit is built in, so you only need a PWM signal.

RC planes, robot arms, animatronics, camera gimbals.
Stepper Motor
Counts its way to position.

No feedback sensor. Instead, it moves in fixed "steps" (often 200 per revolution). Send 50 step pulses and it turns 90°. Precise, but it can lose steps under heavy load.

3D printers, CNC machines, scanners, telescope mounts.
Brushless DC (BLDC)
Spins fast. Spins forever.

No brushes wearing out, very high efficiency, very high speed. Needs an electronic speed controller to fire the right coils at the right time. With an encoder, can match servo precision.

Drones, electric vehicles, computer fans, hard drives.
Continuous-Rotation Servo
A servo that spins instead of pointing.

The pot is replaced or fixed in place. The PWM now controls speed and direction instead of angle. Useful when you want servo-like simplicity but full rotation, like a wheel.

Small wheeled robots, conveyor belts, simple turrets.
Fun Fact

A typical hobby servo can hold its position against several kilograms of force — far more than its motor alone could produce. The trick is the gear train, which trades speed for torque. A 250:1 reduction means the motor spins 250 times for every 1 revolution of the output shaft, multiplying the torque by 250.

Servo Engineer!

You've met the workhorse of every robot, RC plane, and animatronic. A servo turns a tiny pulse signal into precise angle control by combining a motor, gears, a potentiometer, and a feedback loop. Three wires in. Exact angle out.

0
Pulses Sent
0
Angles Commanded
0
Time Exploring

Three Wires, Total Control

A servo has just three wires: power (red), ground (black), and signal (yellow or white). The signal wire carries pulses that tell the servo what angle to hold.

PWM Encodes the Angle

Pulse Width Modulation. A pulse 1.0 ms wide means 0 degrees. 1.5 ms means 90 degrees. 2.0 ms means 180 degrees. The pulse repeats every 20 ms (50 times per second).

Closed-Loop Feedback

Inside the servo, a potentiometer measures the actual shaft angle. A control circuit compares it to the commanded angle and runs the motor until they match. This is why a servo "holds" its position.

Servos vs Steppers vs Brushless

Servos: cheap, precise, hold position, but limited speed and rotation. Steppers: precise rotation by counting steps, no feedback. Brushless DC: high speed and torque, used in drones and EVs.

Ready to Create?

Put your new knowledge into practice!

More Discoveries

Suggest a Correction