A hobby servo does not take a voltage, a current, or a direction pin. It takes a pulse, repeated forever, and the width of that pulse is the angle you are asking for. Everything else — torque, speed, holding force — is the servo's own business.
The control wire carries a plain digital square wave. Every 20 ms the line goes high for somewhere between 1.0 ms and 2.0 ms, then drops low again for the rest of the frame. The servo ignores the low time almost entirely — it only measures how long the line stayed high.
1.5 ms is the centre. Shorter pulses swing the horn one way, longer pulses the other. Stop sending pulses and most servos go limp within a few frames; keep sending the same pulse and the servo actively fights anything trying to move it.
A servo is a small DC motor, a gear train, a potentiometer glued to the output shaft, and a controller comparing the two. The pulse sets a target; the potentiometer reports where the horn actually is; the driver runs the motor until the difference is zero. That is the whole trick — and it is why the horn pushes back when you twist it, and why a stalled servo gets hot.
The 1.0–2.0 ms range is convention, not law. Many servos usably travel from about 0.5 ms to 2.5 ms, and almost none are perfectly centred at 1.5 ms out of the box. Treat the table as a starting point, then calibrate the endpoints of the servo actually on your bench.
| Pulse width | Typical angle | Standard servo | Continuous rotation |
|---|---|---|---|
| 0.50 ms | −45° | Beyond spec — may buzz or stall | Full speed, one way |
| 1.00 ms | 0° | One end of travel | Full speed, one way |
| 1.25 ms | 45° | Quarter travel | Half speed |
| 1.50 ms | 90° | Neutral / centre | Stopped |
| 1.75 ms | 135° | Three-quarter travel | Half speed, other way |
| 2.00 ms | 180° | Other end of travel | Full speed, other way |
| 2.50 ms | 225° | Beyond spec — may hit the stop | Full speed, other way |
Nothing in the signal says "180°". The pulse is a fraction of a range, and it is the servo — its gearbox and its potentiometer — that decides how much travel that range covers. A multi-turn servo takes exactly the same 50 Hz frames and spreads them over several full revolutions.
The goBILDA 2000 Series 5-Turn Dual Mode Servo is the clearest example: 500–2500 µs maps onto five turns — 1800° of travel, still on three wires and still on the 20 ms frame. Your wiring does not change and your sketch barely does. What changes is the arithmetic.
Resolution. The pulse still moves in microseconds, so spreading 2000 µs over 1800° leaves about 1.1 µs per degree against roughly 11 µs per degree on a 180° servo. Multi-turn servos are for travel, not for precision: use them where the mechanism turns revolutions into something else — a lead screw, a winch, a cable drive, a linear slide — and keep a 180° servo for a joint that has to hit an angle repeatably.
write(90) does not mean 90° on a multi-turn servo. The library maps 0–180 onto whatever range you gave attach(), so on a 5-turn servo write(90) lands at the middle of the travel — 2.5 turns, 900°. Address it in microseconds, or convert from turns yourself.
// goBILDA 2000 Series 5-Turn servo: 500...2500 us = 5 turns = 1800 deg.
const int MIN_US = 500;
const int MAX_US = 2500;
const float TURNS = 5.0;
void setup() {
arm.attach(9, MIN_US, MAX_US); // give it the full range
arm.writeMicroseconds(1500); // middle of travel = 2.5 turns
}
// Command the shaft in turns instead of degrees.
int usForTurns(float turns) {
if (turns < 0) turns = 0;
if (turns > TURNS) turns = TURNS; // never drive past the stop
return MIN_US + (int)(turns / TURNS * (MAX_US - MIN_US));
}
arm.writeMicroseconds(usForTurns(0.0)); // 500 us — one end
arm.writeMicroseconds(usForTurns(1.0)); // 900 us — one full turn
arm.writeMicroseconds(usForTurns(5.0)); // 2500 us — five turns
Out of the box the 5-turn servo runs in position mode with its 5 kΩ potentiometer closing the loop, exactly as in the block diagram above. The 3102 Series Dual Mode Servo Programmer toggles it into continuous rotation, where the pulse commands proportional speed instead of position — 900–2100 µs, with 1500 µs meaning stop. One part number covers a five-turn lead screw and a drive wheel.
| goBILDA 2000 Series 5-Turn Dual Mode Servo (25-2, Torque) | |
|---|---|
| Total rotation | 5 turns (1800°) |
| Pulse width — position mode | 500 – 2500 µs |
| Pulse width — continuous mode | 900 – 2100 µs |
| PWM frequency | 50 Hz (20 ms) |
| Stall torque | 17.2 kg·cm @ 4.8 V · 21.6 @ 6.0 V · 25.2 @ 7.4 V |
| No-load speed | 0.25 s/60° @ 4.8 V · 0.20 @ 6.0 V · 0.17 @ 7.4 V |
| Voltage range | 4.8 – 7.4 V |
| Gear ratio | 300:1 |
| Feedback | 5 kΩ potentiometer |
| Spline | 25 tooth |
Signal, V+, and ground. The signal wire is the pale one — orange, yellow or white — and always sits on the edge of the connector; V+ is red in the middle; ground is brown or black. Signal draws almost no current, so any Arduino pin can drive it directly.
V+ is the trap. A micro servo idles at tens of milliamps but pulls an amp or more the instant it moves something, and the Arduino's on-board regulator cannot supply that. Powering a working servo from the board's 5 V pin browns out the microcontroller mid-move: the board resets, the sketch restarts, the servo twitches, and it all looks like a software bug. Give the servo its own supply and tie the grounds together.
The bundled Servo library builds the 20 ms frames in the background off a hardware timer, so your loop never has to. On an UNO it drives up to twelve servos, and disables analogWrite() on pins 9 and 10 while attached.
// Hobby servo on D9, powered from an external 5 V supply
// whose ground is tied to the Arduino's GND.
#include <Servo.h>
Servo arm;
const int SERVO_PIN = 9;
void setup() {
arm.attach(SERVO_PIN, 1000, 2000); // pin, min us, max us
arm.write(90); // start centred
delay(500);
}
void loop() {
// Sweep out: one degree every 15 ms, slow enough to keep up.
for (int angle = 0; angle <= 180; angle++) {
arm.write(angle);
delay(15);
}
delay(300);
// ...and back.
for (int angle = 180; angle >= 0; angle--) {
arm.write(angle);
delay(15);
}
delay(300);
}
write(90) is a convenience: internally it maps the angle onto the microsecond range you handed to attach(). When you care about the actual pulse — calibrating endpoints, or driving a continuous-rotation servo where degrees are meaningless — talk in microseconds instead.
// The same servo, addressed by pulse width rather than by angle.
arm.writeMicroseconds(1000); // one end of travel
arm.writeMicroseconds(1500); // neutral — a CR servo stops here
arm.writeMicroseconds(2000); // other end of travel
// Find the real limits: step outward 25 us at a time and stop as
// soon as you hear the servo buzz against its mechanical stop.
int pulseFor(int angle) {
return map(angle, 0, 180, MIN_US, MAX_US); // measured values
}
Finally, the version with no library at all. It is not how you should drive a servo in a real sketch — delay() blocks everything else — but it makes the timing diagram concrete, and it is the fallback when a chip has no timer to spare.
// Build the 50 Hz frame by hand: high for the pulse, low for
// the remainder of the 20 000 us period.
const int SERVO_PIN = 9;
const unsigned long FRAME_US = 20000;
void setup() {
pinMode(SERVO_PIN, OUTPUT);
}
void sendFrame(int pulseUs) {
digitalWrite(SERVO_PIN, HIGH);
delayMicroseconds(pulseUs); // 1000...2000 us — the command
digitalWrite(SERVO_PIN, LOW);
delayMicroseconds(FRAME_US - pulseUs);
}
void loop() {
// Hold each position for about a second = 50 identical frames.
for (int i = 0; i < 50; i++) sendFrame(1000);
for (int i = 0; i < 50; i++) sendFrame(1500);
for (int i = 0; i < 50; i++) sendFrame(2000);
}
| Symptom | Usual cause | Fix |
|---|---|---|
| Board resets whenever the servo moves | Servo powered from the Arduino 5 V pin | Separate supply, grounds tied together |
| Nothing happens at all | No common ground, or signal on the wrong wire | Join the grounds; signal is the outer pale wire |
| Constant buzzing at rest | Commanded past the mechanical stop, or a noisy signal | Pull the endpoints in; shorten the signal lead |
| Only moves part of the range | Library defaults narrower than the servo's real span | attach(pin, min, max) with measured values |
| Spins forever instead of holding an angle | It is a continuous-rotation servo | 1.5 ms means stop, not centre |
| Turns far more than the angle you asked for | It is a multi-turn servo — the range covers several revolutions | Command it in microseconds, or convert from turns |
| Gets hot and loses torque | Stalled against a load it cannot move | More torque, or gear the load down |
A hobby servo needs a 50 Hz PWM signal: a 20 ms frame in which the line stays high for 1.0 to 2.0 ms. The pulse width is the position command - 1.0 ms at one end of travel, 1.5 ms at centre, 2.0 ms at the other end. Logic level can be 3.3 V or 5 V.
Not under load. A micro servo pulls an amp or more the moment it moves and the Arduino on-board regulator cannot supply that, so the board browns out mid-move. Use a dedicated 5-6 V supply and tie its ground to the Arduino GND, otherwise the pulse has no reference.
In a standard servo the potentiometer on the output shaft closes a position loop, so the pulse means an angle. In a continuous rotation servo that link is removed and the same pulse means a speed: 1.5 ms is stop, shorter or longer pulses drive the shaft either way.
A multi-turn servo such as the goBILDA 2000 Series 5-Turn spreads the 500-2500 us range over five turns, that is 1800 degrees. Commanding it in degrees with write() is meaningless: use writeMicroseconds() and convert from turns, remembering you only get about 1.1 us per degree against 11 us per degree on a 180 degree servo.
Usually because you are commanding a position past the mechanical stop, or the signal is noisy. Pull in the minimum and maximum values passed to attach(), shorten the signal lead, and check that the servo supply shares a ground with the Arduino.
The Servo library handles up to twelve servos on an UNO (up to 48 on a Mega) and disables analogWrite() on pins 9 and 10 while attached. The real limit is power: budget at least 1 A per servo under load and use an external supply.
The signal is the easy half. The hard half is picking a servo whose torque, speed and mounting suit the mechanism — and then attaching it to something that will not tear the output shaft off. We stock 57 products in this category, built around the goBILDA metric system, so horns, hubs, brackets and shafts line up with the rest of the build.
Switchable between position and continuous rotation, in 300° and 5-turn (1800°) versions
BrowseMetal horns and clamping hubs that bolt to the standard hole grid, not just to a plastic spline
BrowseBearing-supported mounts that take side load off the output shaft — the usual killer of servos
BrowseServo programmers for mode and endpoints, plus extension leads and shafting
BrowseTorque figures, current draw and dimensions are on every product page. Not sure which servo fits your mechanism? Ask us — we answer with part numbers, not brochures.