A servo motor is a closed-loop rotary actuator that uses internal feedback—typically a potentiometer or magnetic encoder—to precisely control angular position, velocity, and acceleration. Unlike open-loop stepper motors that rely on magnetic detents and assume the rotor has followed the stator's magnetic field, a servo continuously measures its actual shaft position and adjusts the internal DC motor to correct any error. If you are asking what are servo motors in the context of embedded systems, they are the go-to solution for high-torque, dynamic point-to-point movement in robotic arms, camera gimbals, and steering mechanisms.

What Are Servo Motors? (And How They Compare)

To understand where servos fit on the workbench, you must compare them against the alternatives. Makers frequently confuse servos and steppers, treating them as interchangeable. They are not. A NEMA 17 stepper excels at holding static loads and executing thousands of micro-steps for 3D printer gantries, but it lacks the burst torque and speed of a servo. Conversely, a servo can snap to a 90-degree position in milliseconds under a heavy dynamic load, but it will overheat if asked to hold that same load statically for hours.

The table below breaks down the core motor types you will encounter in DIY robotics and automation, highlighting their torque curves and control requirements.

Motor Type Torque Curve Profile Control / Feedback Needs Typical Cost (USD) Best Load Profile
Hobby RC Servo High burst torque at low speeds; drops sharply near max RPM. 50Hz PWM signal (1-2ms pulse); internal closed-loop pot. $3 - $25 Robotic arms, RC steering, pan/tilt camera mounts.
NEMA 17 Stepper Constant holding torque; drops off at higher speeds due to back-EMF. Open-loop step/dir pulses; requires H-bridge driver (A4988/TMC2209). $12 - $25 3D printers, CNC routers, conveyor belts.
Brushed DC Gearmotor Maximum torque at stall (0 RPM); linear drop to zero at no-load speed. Open-loop PWM for speed; requires external encoder for position. $10 - $40 Drive wheels, winches, continuous rotation conveyors.
Industrial AC Servo Flat, continuous torque curve across a wide RPM range. High-speed serial bus (EtherCAT/CAN); external absolute encoder. $250 - $1,000+ Pick-and-place machines, industrial CNC axes.

For microcontroller-based projects, the Hobby RC Servo (and its modern 'smart serial' variants) is the standard. As detailed in this All About Circuits primer on servo motors, the internal control board reads the PWM pulse width, compares it to the voltage divider output of the internal potentiometer, and drives the H-bridge accordingly.

Sizing Your Servo: The Torque and Inertia Math

The most common mistake makers make is sizing a servo based on its advertised 'stall torque.' Stall torque is the absolute maximum force the motor can exert right before it stops moving. Operating a servo continuously at 80% of its stall torque will strip the gears, melt the internal MOSFETs, and cause severe position hunting.

The 30% Sizing Rule of Thumb: For dynamic, continuous-motion loads (like a robotic arm swinging a payload), size your servo so that your peak calculated load is no more than 30% of the servo's rated stall torque. For static holding applications, use a mechanical brake or a worm-gear reduction; do not rely on servo stall torque to hold a load against gravity.

Worked Load Example: Robotic Arm Link

Let's calculate the required servo for a single robotic arm link. You need to lift a 400g (0.4 kg) payload at the end of a 12 cm (0.12 m) forearm link.

  1. Calculate Force: Mass × Gravity = 0.4 kg × 9.81 m/s² = 3.92 Newtons.
  2. Calculate Required Torque: Force × Distance = 3.92 N × 0.12 m = 0.47 N·m.
  3. Convert to kg·cm (Standard Servo Metric): 0.47 N·m ≈ 4.8 kg·cm.
  4. Apply the 30% Rule: 4.8 kg·cm / 0.30 = 16 kg·cm minimum stall torque required.

If you chose a standard TowerPro MG996R (rated at 13 kg·cm), it would fail and overheat under this dynamic load. You must step up to a 20 kg·cm or 25 kg·cm servo, such as the DS3218 or Feetech SCS35.

Servo Model Stall Torque (at 6V) Stall Current Gear Material Feedback Type Approx. Price
SG90 (Micro) 1.8 kg·cm 0.7A Plastic (Nylon) Analog Pot $2.50
MG996R (Standard) 13.0 kg·cm 2.5A Brass/Steel Analog Pot $6.00
DS3218 (High Torque) 20.0 kg·cm 3.0A Hardened Steel Analog Pot $14.00
Dynamixel AX-12A 15.3 kg·cm 0.9A (nom) Engineering Plastic Digital Serial (TTL) $45.00

Notice the stall current column. A single DS3218 can pull 3.0 Amps when stalling. This brings us to the critical hardware realities of wiring these components to low-power microcontrollers.

Wiring, Terminals, and Driver Demands

Standard hobby servos use a 3-wire interface. The terminal identification is almost universal across JR and Futaba connectors:

  • VCC (Red): Power input. Nominally 4.8V to 6.0V for standard servos, up to 7.4V (2S LiPo) for high-voltage (HV) variants.
  • GND (Brown or Black): Ground reference. Must be shared with the microcontroller.
  • Signal (Orange, Yellow, or White): PWM control line. Expects a 50Hz signal (20ms period) with a pulse width between 1.0ms (0 degrees) and 2.0ms (180 degrees).
ESP32 / Arduino Brownout Warning: Never power a servo larger than an SG90 directly from the 5V or 3.3V pin of an Arduino Uno or ESP32 DevKit. When an MG996R starts moving under load, it can pull 2.5A. This will instantly collapse the voltage regulator on the MCU board, triggering a brownout reset. On ESP32 boards, repeated brownouts can corrupt the SPI flash memory, effectively bricking the board. Always use a dedicated UBEC (Universal Battery Elimination Circuit) or an LM2596 buck converter set to 5.0V to power the servo rail, and ensure the UBEC ground is tied directly to the ESP32 GND.

Controller and Driver Demands

While you can bit-bang a PWM signal or use the ESP32's LEDC hardware PWM peripheral for one or two servos, timing jitter becomes a problem when the MCU is handling WiFi stacks or I2C sensors. A 50µs jitter in a 1.5ms pulse translates to roughly 4.5 degrees of positional error.

For multi-servo rigs (like a 6-DOF hexapod or robotic arm), offload the timing to a PCA9685 16-Channel PWM Driver. As outlined in the Adafruit PCA9685 guide, this I2C chip generates perfectly stable 12-bit PWM signals independently of the host MCU's interrupts.

If you require positional read-back (knowing exactly where the servo is if it gets physically forced out of place), standard PWM servos cannot do this. You must upgrade to serial smart servos like the Robotis Dynamixel AX-12A or Feetech SCS series. These use a half-duplex TTL serial bus (UART) on a single signal wire, allowing the ESP32 to query real-time position, internal temperature, and load percentage.

Failure Signatures: Diagnosing Hum, Overheat, and Stall

Servos fail in highly specific ways that tell you exactly what is wrong with your mechanical design or electrical setup. Recognizing these signatures saves hours of bench debugging.

1. The 'Hum' or Jitter (Hunting)

Symptom: The servo vibrates rapidly back and forth by 1 or 2 degrees, accompanied by a high-pitched humming noise, even when the MCU is sending a static PWM signal.
Cause: This is 'hunting.' It occurs when the servo's internal deadband (the acceptable error margin before the H-bridge engages) is smaller than the noise on the PWM signal or the mechanical backlash in the gear train. It can also be caused by voltage ripple on the VCC line.
Fix: Add a 100µF to 470µF electrolytic decoupling capacitor directly across the VCC and GND pins at the servo connector. If using a PCA9685, ensure the I2C pull-up resistors are properly sized (4.7kΩ) to prevent signal ringing.

2. Overheat and Thermal Shutdown

Symptom: The servo casing becomes too hot to touch (>60°C), the motor stops responding, or you smell melting plastic.
Cause: Continuous static loading. If a servo is holding a 10 kg·cm load against gravity, the internal DC motor is effectively stalled. It is drawing maximum stall current continuously, but doing zero mechanical work. All that electrical energy is converting to heat in the motor windings and the internal H-bridge MOSFETs.
Fix: Servos are not brakes. If your application requires holding a heavy load statically (like a Z-axis on a plotter or a locked robotic joint), you must redesign the mechanism to include a mechanical worm gear (which cannot be back-driven) or an electromagnetic brake. Alternatively, switch to a stepper motor, which handles static holding torque much more efficiently.

3. Stall and Stripped Gears

Symptom: The motor hums, the output shaft does not move, and you hear a loud 'cracking' or grinding noise. The shaft can subsequently be turned by hand with minimal resistance.
Cause: Shock loading. The payload experienced a sudden impact (e.g., a robotic arm hitting a table), generating an inertial torque spike that exceeded the shear strength of the gear teeth. This is incredibly common with plastic (nylon) gears found in SG90 servos.
Fix: Always use metal-gear variants (indicated by an 'M' in the part number, like MG996R) for any load exceeding 2 kg·cm. For high-inertia loads, implement software acceleration/deceleration ramps in your ESP32 code rather than commanding instant 0-to-90 degree jumps, which mechanically shock the gear train.