Home / Arduino & Microcontrollers / Arduino Servo Control: Angles, Power and Smooth Motion

Arduino Servo Control: Angles, Power and Smooth Motion

Arduino & Microcontrollers ✍ Oliver Adam ⏱ 7 min read August 3, 2026

Hobby servos pack motor, gearbox and feedback into a box you command by pulse width. 1 ms ≈ 0°, 1. 5 ms ≈ 90°, 2 ms ≈ 180°, repeated every 20 ms. The Servo library generates this stream; your job is wiring the power properly.
> At a glance: 7 minute guide · part 9 of 10 in the complete Arduino guide track · includes a worked example and a quick-reference table.

## The protocol

Here is the working theory in one pass. The servo library attaches to any digital pin and outputs the 50 Hz pulse train. write() takes degrees; writeMicroseconds() gives finer control. Standard servos sweep ~180°, continuous-rotation versions map the pulse to speed and direction instead.

| P | u | l | s | e | | w | i | d | t | h | | |
| — | — | — | — | — | — | — | — | — | — | — | — | — |
| T | y | p | i | c | a | l | | a | n | g | l | e |
| N | o | t | e | | | | | | | | | |
| 1000 µs | 0° | Minimum check datasheet | | | | | | | | | | |
| 1500 µs | 90° | Centre, safe default | | | | | | | | | | |
| 2000 µs | 180° | Maximum check datasheet | | | | | | | | | | |
| 20 ms period | | 50 Hz refresh, library-managed | | | | | | | | | | |

## Power: the real problem

A stalled servo can draw an amp the Arduino 5 V rail collapses, brownouts follow, and USB ports protest. Power servos from a separate 5–6 V supply with common ground to the Arduino. A 470 µF electrolytic across the servo rail absorbs the surges.

## Smooth and safe motion

Sweeping instantly between angles slams the gearbox. Ramp the angle a degree at a time for mechanical kindness. Under no load a servo hums while holding position that is normal current draw, another reason not to feed it from the logic rail.

## How to apply this in your build

Work through the sequence below each step assumes the previous one passed. For numbers that need calculating, the linked tools at the end of this guide do the arithmetic instantly.
1. Power the servo from its own 5–6 V supply
2. Tie supply ground and Arduino ground together
3. Attach the servo pin and centre it before mechanical fixing
4. Ramp angles in code for gentle motion

### Worked example

A pan platform driven from the 5 V pin jittered and reset the board whenever it hit end-stops. Moving it to a 6 V, 2 A supply with common ground eliminated every reset. Run the numbers yourself with the related calculator and the result should agree to within rounding.

> Practical note from the bench. Procirel robotics rule: every servo rail gets a bulk capacitor at the connector, and every supply budget sums stall currents, not running currents.

## Pitfalls that cost real hardware

– Powering servos from the Arduino 5 V pin
– Forgetting the common ground between supplies
– Assuming 0–180° maps to exactly 1–2 ms on every brand

## Key takeaways

The protocol the foundation of this guide; revisit it if any measurement here surprises you.
Power: the real problem the foundation of this guide; revisit it if any measurement here surprises you.
Smooth and safe motion the foundation of this guide; revisit it if any measurement here surprises you.

## Who this guide is for

Beginners get a single focused topic instead of a whole textbook chapter. It assumes the track’s earlier pages in the complete Arduino guide path. Intermediate readers use it as a reference the table, the worked example and the mistake list answer the questions that come up mid-build. If you teach, the structure (theory, application, example, failure modes) maps cleanly onto a lab session.

## What you need before starting

Nothing exotic: the parts or tools named in the guide, a multimeter. A notebook for the numbers. Power the servo from its own 5–6 V supply before you begin the guide assumes it and keep the quick-reference table above within sight while you work through the steps.

### Quick reference card

| Aspect | Where to find it in this guide |
| — | — |
| Core theory | The protocol |
| Application steps | How to apply this in your build |
| Worked numbers | Worked example |
| Failure modes | Pitfalls that cost real hardware |

## How this fits the complete Arduino guide track

This guide is one stop in the structured learning path. Start from the [complete Arduino guide](/tutorial/arduino-complete-guide) pillar page for the full map, or continue with [powering Arduino projects](/tutorial/powering-arduino-projects) and [how PWM signals work](/tutorial/arduino-pwm-explained).

## Frequently asked questions

Can I run six servos from one Arduino?
Signal-wise yes. Power-wise use a proper 5–6 V bench or battery supply rated for the sum of stall currents.

What is a continuous rotation servo?
A modified design where pulse width sets speed and direction instead of a fixed angle.

Where do I go next?
Back to the [complete Arduino guide](/tutorial/arduino-complete-guide) pillar page it indexes every guide in this track and updates as new ones are published.

## Continue this track

– Building a foundation? The [arduino & microcontrollers complete guide](/tutorial/arduino-complete-guide) maps every step in order.
– Next: [Arduino Interrupts: Respond in Microseconds, Not Loops](/tutorial/arduino-interrupts-explained)
– Next: [Arduino Guide 2026: From Beginner to Pro with 7 Projects](/tutorial/arduino-guide)
– Next: [Driving LCD and OLED Displays with Arduino](/tutorial/arduino-lcd-oled-displays)
– Work the numbers: [LED resistor finder](/tools/led-resistor) · [battery runtime estimator](/tools/battery-life) · [555 timer frequency tool](/tools/timer-555-astable)

## Working method notes

When a result here disagrees with your expectation, write down both numbers before changing anything. The gap between predicted and measured is where the real engineering lives. It is usually a tolerance, a parasitic or an assumption that was never checked.

Keep a lab notebook entry for every build in this track. The measured values, the deviations from the guide and the reason for each. Six months from now, those notes are worth more than any tutorial. They describe your bench and your components rather than a general case.
## Formulas and checks from this guide

Verification checklist for this track. Check pin assignments against the sketch header before wiring, confirm supply polarity twice. Serial-print one variable at a time when debugging. Keep each sketch’s pin map in a comment block so the next build inherits working documentation.

Bookmark this page against your next build in the track. The checklist above is the same one used across 15 guides in this series.

## What the bench taught us

Uninitialised variables and pins left floating. Set every pinMode and initial state in setup.

Anything with motors, servos or many LEDs needs external supply with common ground. USB is for logic only.