When pairing an Arduino and servo for a robotics or automation project, the microcontroller's 5V logic and ~40mA GPIO current limit mean you cannot drive high-torque servos directly from the board's pins. A standard hobby servo might draw 2.5A to 4.5A under stall conditions, which will instantly brownout your Arduino or melt its voltage regulator. To build a reliable system, you must select a servo based on working torque rather than peak stall specs, use a dedicated PWM driver like the PCA9685, and provide an independent, decoupled power supply. This guide breaks down the exact sizing math, wiring topology, and failure diagnostics required to get your actuators moving smoothly.
Servo vs. Stepper vs. DC: Which Motor Fits Your Load Profile?
A common mistake in embedded design is treating stepper and servo motors as interchangeable. They are fundamentally different in how they generate and hold torque. A stepper motor relies on continuous electromagnetic coils to hold a position; if you remove power, it freewheels, and if you hold a heavy load statically, it draws maximum current and generates massive heat. A servo motor, conversely, uses a closed-loop feedback system (usually an internal potentiometer or magnetic encoder) and a mechanical gear train. When a servo reaches its target angle, the internal DC motor stops drawing current, and the mechanical gears lock the output shaft in place.
Here is how the three primary actuator types compare for Arduino-driven projects:
| Motor Type | Torque Curve & Holding | Control Needs | Typical Cost |
|---|---|---|---|
| Hobby Servo (e.g., DS3218) | Peak torque at zero speed; mechanical gear lock holds position without continuous current draw. | 50Hz PWM signal (1-2ms pulse); I2C driver required for >2 units. | $15 - $35 |
| Stepper (e.g., NEMA 17) | High holding torque, but drops rapidly at speed; requires continuous current to hold position. | Step/Dir pulses; chopper driver (TMC2209) or H-bridge. | $12 - $25 |
| Brushed DC + Encoder | Low torque at zero speed; requires high RPM and gear reduction for usable force. | PWM speed + H-bridge direction; PID control loop for position. | $25 - $50 |
The Verdict: Choose a servo when you need high static holding torque in a compact, lightweight package without thermal management (heatsinks/fans). Choose a stepper when you need open-loop precision for linear motion (like 3D printers or CNC routers) where the load is predictable and continuous rotation is required. For a deeper dive into matching drivers to these motors, consult the Adafruit Motor Selection Guide.
Sizing Rule of Thumb and Worked Load Example
Never size a servo based on its advertised "stall torque." Stall torque is the absolute maximum force the motor can exert right before it stops moving and the internal DC motor stalls, drawing maximum current and risking gear stripping or motor burnout. The golden rule for servo sizing is to calculate the worst-case static load torque, then apply a 2.0x safety factor to determine your required working torque.
Worked Load Example: Robotic Arm Forearm
Imagine you are building a robotic arm. The forearm is 20 cm (0.2 m) long and weighs 200g. It needs to lift a 500g (0.5 kg) payload at the very tip of the gripper.
- Calculate Payload Torque: Force = mass × gravity. 0.5 kg × 9.81 m/s² = 4.9 N. Torque = Force × Distance = 4.9 N × 0.2 m = 0.98 N·m (approx. 10 kg·cm).
- Calculate Arm Weight Torque: The arm's center of gravity is roughly in the middle (10 cm or 0.1 m). 0.2 kg × 9.81 m/s² = 1.96 N. Torque = 1.96 N × 0.1 m = 0.196 N·m (approx. 2 kg·cm).
- Total Static Torque: 10 kg·cm + 2 kg·cm = 12 kg·cm.
- Apply Safety Factor: 12 kg·cm × 2.0 = 24 kg·cm required working torque.
Let's look at real-world servo specifications to see which model survives this load:
| Model | Gear Material | Stall Torque | Stall Current | Safe Working Torque (50%) |
|---|---|---|---|---|
| SG90 (Micro) | Plastic / Nylon | 1.8 kg·cm | 700 mA | 0.9 kg·cm |
| MG996R (Standard) | Brass / Metal | 13.0 kg·cm | 2.5 A | 6.5 kg·cm |
| DS3218 (20kg) | Stainless Steel | 20.0 kg·cm | 3.0 A | 10.0 kg·cm |
| DS3218 (35kg) | Stainless Steel | 35.0 kg·cm | 4.5 A | 17.5 kg·cm |
Based on our 24 kg·cm requirement, the popular MG996R and the 20kg DS3218 will both fail, overheat, or strip their gears under continuous load. You must step up to the 35kg DS3218 (or use a mechanical counterbalance/spring assist to reduce the static load on the motor).
Wiring, Terminals, and Controller Demands
While the Arduino Servo library makes generating the 50Hz PWM signal trivial, the physical wiring requires strict attention to power isolation. High-torque servos like the DS3218 draw upwards of 4.5A when starting or reversing direction. If you wire this directly to the Arduino's 5V pin, the voltage will sag, causing the microcontroller to reset or the USB port on your PC to trip its overcurrent protection.
Terminal Identification
Standard hobby servos use a 3-pin JR/Futaba connector. The pinout is universally consistent across brands:
- Pin 1 (Brown or Black): Ground (GND). This must be tied to both the power supply ground and the Arduino's ground.
- Pin 2 (Red): Power (VCC). Requires 5.0V to 6.0V DC. Do not exceed 6.0V unless the specific datasheet rates it for 7.4V (HV servos).
- Pin 3 (Orange, Yellow, or White): PWM Signal. Accepts 3.3V or 5V logic levels.
The PCA9685 Driver Requirement
If you are driving more than two high-torque servos, bypass the Arduino GPIO pins entirely and use a PCA9685 16-Channel PWM Driver. This I2C breakout board handles the precise pulse timing in hardware, freeing up your Arduino's timers and ensuring jitter-free movement even if your main code gets bogged down in heavy computations.
When wiring multiple servos to a shared 5V/6V terminal block, the inductive kickback from the internal DC motors reversing direction will create massive voltage spikes. Always solder a 470µF to 1000µF electrolytic capacitor directly across the VCC and GND rails of your servo power bus. This acts as a local energy reservoir, absorbing spikes and preventing logic-level brownouts on the PCA9685.
Failure Signatures: Diagnosing Hums, Overheats, and Stalls
Servos are closed-loop systems, meaning they constantly fight to maintain their commanded position. When things go wrong, the physical symptoms tell you exactly which part of the system is failing.
1. Humming or Jittering at Rest
Symptom: The servo is commanded to hold still, but it vibrates, twitches, or emits a low-frequency hum.
Cause: This is almost always a signal integrity or grounding issue. If the ground wire between the Arduino and the servo power supply is too thin or missing, the PWM signal reference voltage floats, causing the servo's internal comparator to misread the pulse width. It can also be caused by a damaged internal potentiometer (the wiper has a dead spot).
Fix: Verify continuity between the Arduino GND pin and the servo VCC ground terminal using a multimeter (should read < 1 ohm). Ensure your PWM signal wire is not routed parallel to high-current motor wires.
2. Overheating (Hot to the Touch / Ozone Smell)
Symptom: The servo casing becomes too hot to touch after a few minutes, or you smell melting plastic.
Cause: The servo is fighting a mechanical hard stop, or the external load exceeds its holding torque. The internal DC motor is stalled, drawing maximum current (e.g., 4.5A) continuously without moving. Because the motor isn't spinning, there is no back-EMF to limit the current, and all electrical energy converts to heat.
Fix: Never command a servo past its physical mechanical limits (usually 180°). If the arm rests against a hard physical stop, use the detach() function in your Arduino code once the movement is complete. This cuts the PWM signal, allowing the servo's internal H-bridge to relax and stop drawing holding current.
// Prevent overheating by detaching after movement
#include <Servo.h>
Servo myServo;
void setup() {
myServo.attach(9);
}
void loop() {
myServo.write(120); // Move to position
delay(1000); // Wait for movement to finish
myServo.detach(); // Cut PWM signal to stop holding current
delay(5000); // Rest period
}
3. Stalling or Clicking Under Load
Symptom: The motor spins, but the output shaft doesn't move, accompanied by a loud clicking or grinding noise.
Cause: Stripped gears. Even on "metal gear" servos, the final output spline is often made of softer aluminum or brass to save weight, while the mating pinion is hardened steel. If the load spikes suddenly (like a robotic arm dropping and catching itself), the teeth shear off.
Fix: Replace the gear set (available as $5 repair kits for most standard 20kg-35kg servos). To prevent recurrence, implement software acceleration (ramping the PWM pulse width gradually rather than snapping instantly to the target angle) to reduce inertial shock loads on the gear train.






