More DIY robotic arms fail from wiring than from code. The good news: the wiring is always the same shape once you see it. This is the reference diagram and the rules that make an arm run reliably instead of twitching.

The three circuits in every arm

Think of an arm’s electronics as three connected parts:

  1. The controller — an Arduino, ESP32 or Raspberry Pi that runs your code.
  2. The servo driver — a PCA9685 that turns I2C commands into clean PWM for up to 16 servos.
  3. The power — a separate 5–6V supply that feeds the servos directly.

Get the boundaries between these right and everything works.

The wiring diagram in words

 [5-6V PSU] --V+--> [PCA9685 V+ terminal]
      |  \--GND-------------+--------------------+
      |                     |                    |
 [Controller] --5V/3V3--> [PCA9685 VCC]          |
      |  --SDA----------> [PCA9685 SDA]           |
      |  --SCL----------> [PCA9685 SCL]           |
      |  --GND------------------+----------------(common ground)
                                                  |
 [PCA9685 ch0..15] --signal/+/- --> [servos] ----+

Read it as two power domains joined by one ground:

  • Logic side: controller ↔ PCA9685 over VCC, GND, SDA, SCL (just four wires).
  • Power side: the 5–6V supply → PCA9685 V+/GND screw terminal → servos.
  • The bridge: every GND ties together into one common ground.

Pin connections by board

SignalArduino UnoArduino MegaESP32Raspberry Pi
SDAA420GPIO21GPIO2
SCLA521GPIO22GPIO3
VCC5V5V3V33V3
GNDGNDGNDGNDGND

Servo power never appears in that table on purpose — it comes from the supply, not the board. An Arduino Mega is a popular controller here for its extra pins; a bundle of jumper wires covers the logic side.

The rules that prevent 90% of problems

  1. Separate servo power. A 5–6V supply (or a buck converter) into the PCA9685 V+ terminal. See powering a robotic arm.
  2. Common ground, always. Supply ground ↔ PCA9685 ground ↔ controller ground. This is the single most-skipped step and the most common cause of jitter.
  3. Size the supply for stall current. Add up every servo’s stall current; your supply must beat that total, not the idle figure.
  4. Thicker wire on the power rail. ~20 AWG for V+/GND feeding several servos; thin jumpers are fine for signal.
  5. Decoupling helps. A large electrolytic capacitor (e.g. 1000 µF) across the servo V+/GND smooths the current spikes of several servos moving at once.

From breadboard to permanent

Prototype on a breadboard first so you can fix mistakes, then solder the final connections — a moving arm will shake loose jumper wires. Once it’s wired, the Arduino code guide and PCA9685 guide cover making it move. If something’s already wired and misbehaving, jump straight to the troubleshooting guide.

Frequently asked questions

How do you wire servos to a robotic arm?

Each servo has three wires: signal, power (+) and ground (–). The signal goes to a PWM source (ideally a PCA9685 channel), and the power and ground go to a separate 5–6V supply — not the microcontroller. All grounds must be joined together.

Why can't I power servos from the Arduino?

Servos draw far more current than an Arduino's 5V regulator can supply, especially under load or stall. Powering them from the board causes voltage dips that reset the Arduino. Always use a separate 5–6V supply into the servo power rail.

Do all grounds need to be connected?

Yes. The microcontroller, the servo driver and the servo power supply must share a common ground. The PWM signal is measured relative to ground, so without a shared ground the servos receive a meaningless signal and twitch or stall.

What gauge wire for servo power?

Use thicker wire for the servo power rail than for signal lines — around 20 AWG for the V+ and ground feeding several servos, and thin jumper wire is fine for the I2C/signal connections.