The standard <Servo.h> library for Arduino generates a 50Hz PWM signal with a 1000–2000µs pulse width. This specific protocol is designed exclusively for RC hobby servos (like the SG90 or MG996R) that contain an internal DC motor, gearbox, and potentiometer for closed-loop position feedback. It cannot natively drive stepper motors, continuous-rotation AC servos, or BLDC gimbal motors. If your mechanical load requires high holding torque at zero speed, continuous high-speed rotation, or industrial precision, you must abandon the standard servo library and select a different motor topology and driver.

Choosing the right actuator comes down to matching your load's torque curve and speed requirements to the motor's physical capabilities, then pairing it with the correct Arduino library and hardware driver.

Motor Type Comparison: When to Use <Servo.h> vs. Alternatives

A common mistake among hobbyists is treating steppers and servos as interchangeable because both can be commanded to move to a specific angle. They are fundamentally different. An RC servo uses a potentiometer to track absolute position and corrects for external forces, but it loses accuracy if the internal plastic gears strip. A stepper motor moves in discrete open-loop steps; it holds position via magnetic detent torque but will silently lose steps if the load exceeds its holding capacity.

Actuator Selection Matrix for Arduino Projects
Motor Type Torque Curve & Speed Control Needs (Library/Driver) Cost (Per Unit) Best Load Profile
RC Hobby Servo High stall torque, drops rapidly at speed. Best for <120 RPM. <Servo.h> via 50Hz PWM. No external driver needed for 1-2 units. $2 – $25 Angular positioning (0-180°), robot arms, RC steering, camera gimbals.
NEMA 17 Stepper High holding torque at zero speed, torque drops linearly with speed. AccelStepper or FastAccelStepper. Requires A4988/TMC2209 step/dir driver. $15 – $40 CNC routers, 3D printer axes, linear actuators, continuous rotation with high holding torque.
Closed-Loop BLDC / AC Servo Flat torque curve up to rated speed. High dynamic response. Modbus RTU, EtherCAT, or CAN bus. Requires dedicated industrial servo drive. $150 – $800+ High-speed pick-and-place, heavy industrial automation, precise continuous rotation.

If your application involves moving a joint to a specific angle and holding it against gravity (like a robotic shoulder), the RC hobby servo driven by <Servo.h> is the correct choice. If you need to spin a conveyor belt at 300 RPM while maintaining exact positional sync, you need a stepper or BLDC motor.

Sizing Rule of Thumb and Worked Load Example

Servo manufacturers rate torque in kg-cm or oz-in at stall (zero speed). To size a servo, you must calculate the static torque required to hold your load against gravity, then apply a dynamic safety factor.

The 2x Safety Rule: Never size a servo for exact static load. Always multiply your calculated static torque by a minimum of 2.0 to account for dynamic acceleration forces, gear backlash, and voltage sag under load.

Worked Example: 3D Printed Robot Arm Forearm

Let's size the elbow joint for a robot arm. The forearm is 15 cm long and weighs 100g (center of mass at 7.5 cm). It needs to lift a 200g payload at the very end of the arm (15 cm from the pivot).

  1. Payload Torque: 0.200 kg × 9.81 m/s² × 0.15 m = 0.294 Nm (approx. 3.0 kg-cm)
  2. Arm Weight Torque: 0.100 kg × 9.81 m/s² × 0.075 m = 0.073 Nm (approx. 0.75 kg-cm)
  3. Total Static Torque: 3.0 + 0.75 = 3.75 kg-cm
  4. Apply Safety Factor (2x): 3.75 × 2 = 7.5 kg-cm required stall torque.

Based on this math, a standard micro servo like the SG90 (rated at 1.8 kg-cm) will instantly stall and strip its plastic gears. You must step up to a standard-size metal-gear servo like the MG996R (10–13 kg-cm) or the DS3218 (20 kg-cm) to handle this load reliably.

Wiring, Terminals, and Power Delivery Limits

RC servos use a standard 3-pin JST-style connector. While pinouts are physically identical across brands, wire colors vary. Always verify the signal pin before applying power, as feeding 5V into the PWM signal line of an Arduino GPIO will not damage the MCU, but feeding 12V into a 5V GPIO will fry the ATmega328P instantly.

Standard Servo Wiring Color Codes
Function Hitec / DSS Power (Common) Futaba / TowerPro (Common) Arduino Connection
Ground (GND) Black Brown Arduino GND (Must be shared with power supply)
Power (VCC) Red Red Dedicated 5V/6V BEC or Buck Converter (NOT Arduino 5V pin)
Signal (PWM) Yellow Orange / White Any digital PWM-capable pin (e.g., Pin 9)

The Arduino 5V Pin Trap

A frequent beginner failure is wiring a servo directly to the Arduino Uno's 5V pin. The Uno's onboard linear voltage regulator can only dissipate about 800mA of current before triggering thermal shutdown, and the USB polyfuse limits total draw to ~500mA. A single MG996R servo can draw 2.5A at stall. Plugging it directly into the Arduino will cause the MCU to brownout, reset, and behave erratically.

The Fix: Use a dedicated BEC (Battery Eliminator Circuit) or an LM2596 buck converter set to 5.0V–6.0V to power the servo's red wire. Crucially, you must connect the ground of this external power supply directly to an Arduino GND pin to establish a common reference voltage for the PWM signal.

Scaling Up: If you need to drive more than two servos, abandon direct GPIO wiring. Use a PCA9685 16-channel I2C PWM breakout board (approx. $4). It handles the 50Hz timing in hardware, freeing up Arduino timer interrupts, and includes screw terminals for high-current servo power injection.

Failure Signatures: Hum, Overheat, and Stall

When a servo system fails, it rarely does so silently. Recognizing the physical and electrical signatures of failure will save you from burning out H-bridges and stripping gearboxes.

1. Jitter and Humming (Electrical Noise)

Symptom: The servo vibrates rapidly around the target position, emitting a high-pitched hum, even when the Arduino is commanding a static write(90).
Cause: Power supply ripple, ground loops, or long unshielded PWM wires acting as antennas picking up EMI from nearby switching regulators.
Fix: Solder a 470µF electrolytic capacitor directly across the VCC and GND wires at the servo connector. This provides local energy storage for the microsecond-level current spikes the motor draws during commutation, smoothing the voltage rail.

2. Overheating and the 'Hot Plastic' Smell

Symptom: The servo casing becomes too hot to touch, and you smell melting plastic or ozone.
Cause: Continuous stall condition. If the mechanical load prevents the servo from reaching its commanded position, the internal potentiometer tells the H-bridge to apply maximum continuous current to the DC motor. Hobby servos lack thermal cutoffs.
Fix: Implement software limits. Never command an angle beyond the physical hard stops of your mechanism. Use myservo.attach(pin, 544, 2400) to calibrate your specific servo's physical limits in software, preventing the motor from driving into a mechanical wall. For critical applications, add an INA219 I2C current sensor to the VCC line and write a watchdog routine that cuts power via a MOSFET if stall current (>1.5A) is detected for more than 500ms.

3. Stripped Output Splines

Symptom: The motor hums and spins, but the output horn does not move, or it slips under load.
Cause: Shock loading. Dropping a payload or a sudden mechanical impact transfers kinetic energy directly into the final drive gear. In an SG90, this instantly shears the plastic output teeth.
Fix: Upgrade to metal-gear servos (e.g., MG996R). However, metal gears transfer the shock load deeper into the gearbox or to the motor shaft. For high-shock environments, use a servo horn with a built-in silicone damper or a spring-loaded slip clutch to absorb impact energy before it reaches the gear train.

For deeper technical specifications on RC servo pulse timings and physical dimensions, refer to the Pololu RC Servo Guide and the official Arduino Servo Library Documentation. If your project eventually outgrows the torque limits of hobby servos, consult Oriental Motor's comparison on stepper vs. servo topologies to plan your migration to closed-loop industrial drives.