The standard 3-wire hobby servo motor color code is Brown or Black (Ground), Red (VCC 4.8V–6.0V), and Orange, Yellow, or White (PWM Signal). However, because there is no single enforced international standard for low-voltage DC hobby components, swapping the Signal and VCC wires will instantly destroy your ESP32 or Arduino GPIO pin. Below is the exact reference data you need to wire, test, and protect your microcontroller when integrating RC and micro servos.

The Standard Servo Motor Color Code Reference Table

This table covers the physical wire colors you will encounter on 95% of hobby servos (including the ubiquitous TowerPro SG90 and MG996R). Read the 'Standard/Variant' column to identify which ecosystem your servo belongs to before applying power.

Wire Color Function Voltage / Signal Level Standard / Variant Practical Notes & Edge Cases
Black Ground (GND) 0V Reference Futaba / JR / Standard RC Must share a common ground with your MCU. Never leave floating.
Brown Ground (GND) 0V Reference Hitec / Generic Clones (SG90) Functionally identical to Black. Often used on cheaper PCB assemblies.
Red Power (VCC) 4.8V to 6.0V DC Universal (All 3-pin PWM) Stall current can hit 2.5A on an MG996R. Never power directly from an Arduino 5V pin.
White Signal (PWM) 3.3V or 5V Logic Futaba / JR / Standard RC High-impedance input. Expects a 50Hz PWM wave with 1ms–2ms high pulses.
Orange Signal (PWM) 3.3V or 5V Logic Generic Clones (SG90 / MG996R) Most common on direct-from-factory Chinese micro servos.
Yellow Signal (PWM) 3.3V or 5V Logic Hitec / Some JR variants Often confused with VCC by beginners because yellow is sometimes used for 12V in mains wiring. It is NOT power here.

Rows People Get Wrong (And How They Fry Microcontrollers)

CRITICAL HARDWARE WARNING: The most common fatal mistake is assuming the middle wire is always Signal. On 99% of standard PWM servos, the middle wire is Red (VCC). If you plug the connector in backwards (swapping GND and Signal), you will feed 5V–6V directly into your microcontroller's GPIO pin, instantly frying the silicon.

Beyond plugging it in backwards, here are the specific rows and assumptions that cause hardware failures on the bench:

  • The 'Red Wire' Ampacity Trap: Beginners see Red (VCC) and plug it into the Arduino's 5V output pin. A standard SG90 draws ~650mA at stall. An MG996R draws up to 2.5A. The Arduino's onboard linear regulator will overheat and shut down (or melt), causing a brownout that resets your code mid-cycle. Fix: Always use a dedicated BEC (Battery Eliminator Circuit) or a buck converter rated for at least 3A to supply the Red wire.
  • The 3.3V Logic Misconception: When using an ESP32 or Raspberry Pi Pico (which output 3.3V logic on the White/Orange/Yellow wire), many builders assume they need a logic level shifter to bump the signal to 5V. You usually don't. The signal wire feeds a high-impedance optocoupler or CMOS gate inside the servo. A 3.3V PWM signal is almost universally recognized as a valid 'HIGH' by modern servo controller ICs.
  • Yellow Wire Confusion: In NEC/IEC mains wiring, yellow can indicate a switched leg or high voltage. In low-voltage DC servos, Yellow is strictly a low-current PWM signal. Do not apply 12V to a yellow servo wire expecting it to be a higher voltage power rail.

Ecosystem Variants: Futaba, JR, Hitec, and Smart Servos

While NEC and IEC standards govern mains and industrial wiring, the hobby servo world is governed by legacy RC (Radio Control) manufacturer protocols. Here is how the 'regional' standards break down by brand ecosystem:

Ecosystem / Brand GND Color VCC Color Signal Color Connector Keying
Futaba / JR (Standard) Black Red White Futaba has a 'tab' on the connector; JR is flat. Both fit standard 0.1' headers.
Hitec Black Red Yellow Standard 0.1' pitch, no keying tab.
TowerPro / Generic Brown Red Orange Standard 0.1' pitch. Colors vary slightly by batch (sometimes Yellow instead of Orange).
Dynamixel (TTL/Serial) Black Red Yellow/Blue NOT PWM. Uses UART serial. Plugging this into a standard PWM pin will not work and may damage the transceiver.

For authoritative deep-dives into RC servo protocols and electrical characteristics, the Pololu RC Servo Guide remains the definitive bench reference for embedded engineers.

Safe Interpretation: Testing Faded or Unmarked Wires

If you are salvaging servos from old RC cars, or if the wire insulation has faded to the point where Brown and Black are indistinguishable, never apply power to guess the pinout. Use this multimeter procedure to safely map the wires:

Bench Trick: Set your multimeter to Continuity mode (the diode/beep setting). Touch one probe to the metal mounting tabs or the output shaft spline of the servo. Probe the wires with the other lead. The wire that beeps (reads < 1 ohm) is your Ground.
  1. Identify Ground: Use the continuity test against the motor casing as described above. Mark this wire with black tape.
  2. Identify VCC: Look closely at the base of the servo where the wires enter the housing. On most transparent or semi-transparent micro servos (like the SG90), you can see the PCB. The wire that solders directly to the large copper pour or the positive leg of the electrolytic capacitor is VCC (Red).
  3. Identify Signal: The remaining wire connects to a current-limiting resistor (usually 1kΩ to 4.7kΩ) before hitting the controller IC. This is your PWM signal wire.
  4. The 'Potentiometer Trace' Check: If you open the servo casing, the internal potentiometer (which provides position feedback) has three pins. The outer pins connect to GND and VCC. The middle wiper pin connects to the Signal wire path. Tracing this will confirm your mapping.

Decision Tree: Pinpointing Your Exact Servo Wiring

Use this decision path to terminate your troubleshooting and lock in the correct wiring configuration for your specific hardware.

Condition / Observation Next Step / Action
Servo has exactly 3 wires and a standard 0.1' (2.54mm) pitch connector. Proceed to standard RC color mapping (GND/VCC/Signal). Assume middle is VCC.
Servo has 4 or more wires, or uses a JST-XH / 3-pin serial connector. STOP. This is a serial bus servo (Dynamixel/Feetech) or a stepper motor. Do not apply standard PWM. Check the manufacturer datasheet for UART/TTL pinouts.
Wires are Brown, Red, Orange. Map to GND, VCC (4.8-6V), Signal. Connect Signal to MCU PWM pin via a 1kΩ series resistor.
Wires are Black, Red, White. Map to GND, VCC (4.8-6V), Signal. Standard Futaba/JR layout.
Wires are faded, unmarked, or custom-soldered. Execute the multimeter continuity test (Section 4) to identify GND before applying any power.
Using an ESP32, Pi Pico, or 3.3V MCU with a standard 5V servo. Wire Signal directly to the 3.3V GPIO. Add a 10kΩ pull-down resistor between Signal and GND to prevent boot-up twitching.

The Default Recommendation: If you have a standard 3-wire PWM servo and want a bulletproof, universally safe interface for any microcontroller, wire the Red and Black/Brown wires to a dedicated 5V/3A buck converter (sharing GND with the MCU), and route the Orange/Yellow/White signal wire through a 1kΩ series resistor to your PWM GPIO. This specific configuration protects your MCU from back-EMF spikes, prevents fatal shorts if the connector is reversed, and provides clean 50Hz control without requiring logic level shifters.

For complete code implementation and timing diagrams for generating the 1ms–2ms PWM pulses required by these pins, refer to the official Arduino Servo Library documentation or the Adafruit Motor Selection Guide.