Getting Arduino servo wiring right comes down to one fundamental rule: separate your logic power from your muscle power. A standard micro servo draws 10mA at rest but can spike to 800mA+ during a stall. If you wire that directly to the Arduino’s onboard 5V regulator, the voltage will sag, the microcontroller will brownout, and your project will reset mid-motion. The direct answer for a reliable setup is to use an external 5V-6V power supply (like a BEC or buck converter) for the servo’s VCC, connect the PWM signal wire to a digital pin (e.g., Pin 9), and tie all grounds together.

The Core Rule of Arduino Servo Wiring (Power vs. Signal)

Standard RC servos use a 3-wire interface. While color codes vary slightly by manufacturer (Futaba, JR, Hitec), the terminal identification remains universal in function. Here is the exact pinout you need to memorize:

Wire Color (Common) Function Connection Target Voltage / Spec
Brown or Black Ground (GND) External PSU GND & Arduino GND 0V (Common Reference)
Red Power (VCC) External PSU Positive 4.8V to 6.0V DC
Orange, White, or Yellow PWM Signal Arduino Digital Pin (PWM capable) 3.3V or 5V Logic HIGH
Bench Tip: Never power a servo larger than a 9g micro (like the SG90) directly from the Arduino 5V pin. The onboard linear regulator on an Uno or Nano is typically rated for 500mA absolute maximum, and it must also supply the ATmega328P chip. Use a dedicated UBEC (Universal Battery Eliminator Circuit) or an LM2596 buck converter module set to 5.0V for anything larger.

What driver/controller does it demand? Unlike DC motors that need an H-bridge, or steppers that need a chopper driver (like an A4988), a standard hobby servo contains its own internal H-bridge and feedback potentiometer. The controller demand is strictly a 50Hz PWM signal with a pulse width between 1,000µs (1ms) and 2,000µs (2ms). The official Arduino Servo Library handles this timing perfectly, abstracting the hardware timers so you can simply call myservo.write(angle).

Motor Type Comparison: When to Choose a Servo

A common mistake on the workbench is treating steppers and servos as interchangeable. They are not. Steppers excel at open-loop, continuous, multi-revolution precision. Servos excel at closed-loop, high-torque, limited-angle positioning. Here is how to decide which motor type fits your specific load profile.

Motor Type Torque Curve Control Needs Cost (Approx) Best Load Profile
RC Servo Peak torque at stall, drops at speed 50Hz PWM (1-2ms pulse) $4 - $25 Angular positioning (0-180°), robotic joints, RC steering, camera gimbals.
Stepper Motor High holding torque, drops sharply at high RPM Step/Dir pulses via chopper driver $12 - $40 3D printer axes, CNC routers, continuous precise rotation without encoders.
DC Gear Motor Max torque at stall, linear drop to zero at no-load speed H-Bridge for PWM speed & direction $8 - $30 Drive wheels, conveyors, continuous rotation where exact position isn't critical.
BLDC (Gimbal) Smooth, highly dependent on sine-wave commutation 3-phase ESC or FOC driver $20 - $60 Camera stabilization, high-speed drones, ultra-smooth low-speed tracking.

If your application requires moving a lever to a specific angle and holding it there against gravity, the servo is your only logical choice among hobby-tier components. The internal potentiometer constantly corrects for external forces, something an open-loop stepper cannot do if it misses a step.

Sizing Your Servo: A Worked Load Example

Servo torque is typically rated in kg·cm or oz·in at a specific voltage (usually 4.8V and 6.0V). The sizing rule of thumb is to calculate the maximum static torque required at the longest lever arm, then apply a 2.0x safety factor to account for dynamic acceleration and mechanical friction.

Worked Load Example: You are building a robotic arm. The forearm is 15 cm long, and it needs to lift a 200g (0.2 kg) payload at the very tip of the gripper.

  1. Calculate Force: Mass × Gravity = 0.2 kg × 9.81 m/s² = 1.96 Newtons.
  2. Calculate Static Torque: Force × Distance = 1.96 N × 0.15 m = 0.294 N·m.
  3. Convert to kg·cm: 0.294 N·m is roughly equivalent to 3.0 kg·cm.
  4. Apply Safety Factor: 3.0 kg·cm × 2.0 = 6.0 kg·cm required.

Looking at the market, a standard plastic-gear SG90 offers 1.8 kg·cm (too weak). A metal-gear MG996R offers 13 kg·cm (sufficient, but the gears strip under shock loads). For a reliable 2026 build, step up to a DS3218 20kg digital servo (approx. $12-$15). It provides massive overhead, metal gears, and a digital control board that tightens the deadband, reducing position hunting. For deeper specifications on servo sizing and internal mechanics, the Pololu RC Servo Guide remains an excellent technical reference.

Failure Signatures: Diagnosing Hums, Stalls, and Overheats

Servos fail in highly specific ways. Recognizing these signatures will save you from burning out components or chasing software ghosts.

  • The 'Hum' Without Movement: If the servo vibrates and hums but the shaft doesn't turn, you have either mechanical binding in your linkage or a PWM signal issue. Disconnect the mechanical load. If it moves freely, your linkage is jammed. If it still hums, check your wiring—the signal wire might be picking up EMI, or the pulse width is fluctuating wildly.
  • Overheating and the 'Melting Flux' Smell: Servos are designed for dynamic movement, not continuous static holding. If you command a servo to hold a heavy load near its stall torque for more than 30 seconds, the internal motor will draw maximum stall current (often 2.5A+) without the cooling benefit of rotation. The internal H-bridge MOSFETs will overheat, potentially melting the plastic casing or desoldering the internal PCB. Fix: Use a mechanical brake or a worm-gear linkage if you need to hold a static load indefinitely.
  • Brownout Resets (Arduino Restarting): When a servo starts moving from a dead stop, it draws an inrush current that can be 3x its running current. If your power supply cannot deliver this transient current, the voltage rail sags below 4.5V, triggering the Arduino's brownout detection circuit and resetting the board. Fix: Add a 1000µF electrolytic capacitor directly across the servo’s VCC and GND terminals at the point of connection to act as a local energy buffer.

Arduino Servo Wiring FAQ

Can I wire a 5V servo directly to an ESP32's 3.3V GPIO pin?

Yes, for the signal wire. Most modern RC servos recognize 3.3V logic as a valid HIGH threshold for the PWM pulse. However, if you are using an older or highly specific industrial servo that strictly requires a 4.5V+ logic threshold, it will ignore the ESP32's signal. In that case, use a simple NPN transistor (like a 2N2222) or a logic level shifter to boost the 3.3V signal to 5V. Never feed the servo's 5V VCC line back into an ESP32 GPIO pin, or you will instantly fry the microcontroller.

Why does my Arduino servo wiring jitter when I attach a sensor?

Jitter is almost always caused by interrupt conflicts or power rail noise. The standard Servo.h library relies on the ATmega328P's Timer1. If you add a sensor library that also uses Timer1 (like certain IR remote receivers) or if you use delay() heavily alongside ultrasonic sensors (HC-SR04) that trigger frequent pin-change interrupts, the 50Hz PWM pulse width will fluctuate by microseconds, translating to physical jitter. Fix this by switching to the ServoTimer2 library, or by ensuring your sensor reads are non-blocking.

What is the difference between standard and continuous rotation Arduino servo wiring?

The physical Arduino servo wiring (VCC, GND, PWM) is completely identical. The difference is entirely internal and software-driven. A continuous rotation servo has its internal potentiometer feedback removed or disconnected. Instead of the pulse width dictating an absolute angle (1ms = 0°, 1.5ms = 90°, 2ms = 180°), it dictates speed and direction. A 1ms pulse commands full-speed reverse, 1.5ms commands a hard stop, and 2ms commands full-speed forward. You must use myservo.writeMicroseconds() for fine-tuned speed control on these variants.