Home/Robotics & Controls/Hobby Servo Pulse-Width to Angle Mapping

Formula & Calculator

Hobby Servo Pulse-Width to Angle Mapping

Converts a standard hobby servo's PWM control pulse width into the corresponding commanded shaft angle, based on the common 1000-2000 microsecond range.

RoboticsActuatorsCalculator

Hobby Servo Mapping CalculatorPulse‑Width → Angle

θ = ( pulse − 1000 ) / ( 2000 − 1000 ) × 180
θ = angle (°)  ·  pulse = pulse width (µs)  ·  Standard servo: 1000 µs → 0°, 1500 µs → 90°, 2000 µs → 180°
⟹ Solveθ, pulse
°
µs
Pulse range: 1000 µs – 2000 µs  ·  Angle range: 0° – 180°
Please fix the errors above.
Solve for:
Presets:
Angle
θ: pulse:
✓ Copied!
Servo Angle
0° – 60° 60° – 120° 120° – 180°
θ = (pulse − 1000) / 1000 × 180  ·  Typical for standard analog servos. Range may vary by manufacturer.

Interpretation

θ = (pulse_width − 1000)/(2000−1000)×180. Maps pulse width (µs) to angle (°) for typical servos. Used in servo control.

theta = (pulse_width - 1000) / (2000 - 1000) * 180
Hobby Servo Pulse-Width to Angle Mapping

Variables

SymbolQuantityUnit
thetaCommanded servo angledegrees
pulse_widthPWM control pulse widthmicroseconds

What it means

Standard hobby servos use a 50 Hz PWM signal, with pulse widths from 1000 µs to 2000 µs corresponding to 0° to 180°. This linear mapping is used to generate the appropriate pulse width for a desired angle. Understanding this is essential for controlling servos with microcontrollers.

Worked example

Servo Pulse‑Width to Angle – Two Detailed Examples

Real‑World
Scenario: A hobby servo expects a pulse width between 1000 μs (0°) and 2000 μs (180°). A pulse width of 1500 μs corresponds to angle θ = (1500 - 1000) / (2000 - 1000) × 180 = 500/1000 × 180 = 90°. The robot builder uses this to position the servo to the neutral position. This mapping is essential for controlling servo‑based joints in hobby robotics.
ParameterValue
pulse_width (μs)1500
1θ = (1500 - 1000) / 1000 × 180 = 0.5 × 180 = 90°
Result 90° ✓ Neutral position
Scenario: A pulse width of 1250 μs maps to θ = (1250 - 1000) / 1000 × 180 = 0.25 × 180 = 45°. The engineer uses this to control a camera pan‑tilt mechanism, setting the camera to look 45° to the right. The linear mapping makes it easy to compute the required pulse width for any desired angle.
ParameterValue
pulse_width1250
1θ = (1250 - 1000) / 1000 × 180 = 45°
Result 45° ✓ Angle control
Insight: Hobby servos use pulse‑width modulation (PWM) to control position. The mapping is linear: pulse width = 1000 + (angle/180) × 1000. This makes them easy to interface with microcontrollers for precise angular control.

Common mistakes

  • Servo pulse‑width to angle mapping: θ = (pulse_width − 1000) / (2000 − 1000) × 180 – for common 1000‑2000 µs range.
  • Assumes: Linear mapping, 180° range (some servos have smaller ranges).
  • Units: pulse_width in microseconds – typical range 1000‑2000 µs.
  • Center position: 1500 µs corresponds to 90°.
  • Limits: Some servos have different ranges – check the datasheet.

Applications

Hobby servo pulse‑width to angle mapping, θ = (pulse_width − 1000)/(2000 − 1000)×180, converts a pulse width (in microseconds) to the corresponding angular position for standard RC servos. This is used to command servos in robotics, animatronics, and model aircraft. Engineers and hobbyists use it to map desired angles to PWM signals, allowing precise positioning of joints and control surfaces. By understanding this mapping, they can interface microcontrollers with servos and implement closed‑loop control. This formula is a fundamental tool for servo‑based actuation.

  • Position control of servo motors in robotics and animatronics
  • Control surface deflection in RC aircraft and drones
  • Gripper and end‑effector actuation in pick‑and‑place systems
  • Calibration and programming of servos for precise positioning
  • Integration with microcontrollers (Arduino, Raspberry Pi, etc.)

Frequently Asked Questions

Q01What is the pulse‑width to angle mapping for a hobby servo?
A01

The servo angle is linearly mapped from the pulse width (in microseconds). A common mapping is θ = (pulse_width – 1000) / (2000 – 1000) × 180 for a 0‑180° range, assuming pulse widths from 1000 to 2000 µs.

Q02What is the common mistake when using this formula?
A02

Assuming a universal 1000‑2000 µs pulse range for all servos. Many servos actually use a different range (e.g., 500‑2500 µs) specified in their datasheet. Always check the servo's specifications.

Q03What is the typical pulse width range for a standard hobby servo?
A03

Typically, 1 ms corresponds to 0° and 2 ms to 180° for many servos. Some servos use 0.5 ms to 2.5 ms for 0‑180°.

Q04How do you compute the pulse width for a desired angle?
A04

pulse_width = (angle / 180) × (max_pulse – min_pulse) + min_pulse.

Q05What is the resolution of a servo in terms of pulse width?
A05

Most servos have a resolution of about 1 µs, which corresponds to about 0.09° for a 1000‑2000 µs range and 180° span.

Q06How do you send a pulse to a servo?
A06

Using a PWM signal with a period of 20 ms (50 Hz), and a variable pulse width. The pulse width determines the angle.

Q07What is the effect of pulse width jitter on servo accuracy?
A07

Jitter in the pulse width causes the servo to oscillate or not hold position accurately. Using a stable PWM signal is important.

Q08What are the limitations of hobby servos?
A08

Limited torque, speed, and precision compared to industrial servos. They are suitable for low‑cost, light‑duty applications.

Q09How do you calibrate a servo for a custom pulse range?
A09

Send the minimum and maximum pulse widths and measure the resulting angles; then use those values in the mapping formula.

Q10What are the applications of hobby servos?
A10

Robotics (small arms, grippers), RC vehicles, and mechatronics projects.