Power Distribution

Power supply requirements and distribution to servos via PCA9685

Learn how to properly wire power for your servo motors and controller.

Power System Overview

The power system provides regulated 5V DC power to servo motors via the PCA9685. Proper power distribution is critical for reliable operation and preventing damage to components.

Key Requirements

  • • 5V DC regulated power supply
  • • 3A minimum (4 servos), up to 10A (16 servos)
  • • Separate from Pico power (USB)
  • • Common ground with all components

Our Configuration

  • • 5V/5A switching power supply
  • • 1000-2200µF filter capacitor
  • • V+ and VCC separate power inputs on PCA9685
  • • Screw terminals for easy connection

⚠️Power Safety Guidelines

  • Always disconnect power before making wiring changes
  • Verify voltage: Must be 5V DC (servos rated for 4.8-6V)
  • Check polarity: Red = positive (+), Black = ground (−)
  • Current capacity: Minimum 3A for 4 servos, 5A+ recommended for 7+ servos
  • Never exceed 6V on servo power rail (damages servos)

Power Supply Specifications

Required Specifications

  • Voltage: 5V DC (±5%)

    Regulated switching power supply (6V acceptable but not recommended)

  • Current: 3-10A depending on servo count

    See table below for specific requirements

  • Type: Switching power supply (AC/DC adapter)

    NOT a USB charger or battery (insufficient current)

  • Connector: DC barrel jack (5.5mm×2.1mm) or screw terminals

    Center positive (+) for barrel jacks

Current Requirements by Servo Count

ServosMin (A)Recommended (A)
1-42A3-5A
5-83A5A
9-125A8A
13-167A10A

Based on MG996R servos @ ~500mA peak load per servo. Add 20% safety margin.

Power Distribution Architecture


                               5V Power Supply
                              (3A - 10A rated)
                                      │
                                      │
                    ┌─────────────────┴─────────────────┐
                    │                                   │
              ┌─────▼──────┐                    ┌───────▼────────┐
              │            │                    │                │
              │  PCA9685   │                    │  Raspberry Pi  │
              │  V+ Input  │                    │  Pico (VBUS)   │
              │            │                    │  [Optional]    │
              │  + Capacitor                    │                │
              │  1000µF    │                    └────────────────┘
              └─────┬──────┘
                    │
          ┌─────────┴──────────────────────────┬─────────┬─────────┐
          │                                    │         │         │
     ┌────▼────┐  ┌────────┐  ┌────────┐  ┌───▼───┐  ┌──▼──┐  ┌──▼──┐
     │ Servo 0 │  │ Servo 1│  │ Servo 2│  │Servo 3│  │ ... │  │Srv15│
     │ (Motor1)│  │ (Mtr 2)│  │ (Mtr 3)│  │(Mtr 4)│  │     │  │(M16)│
     └─────────┘  └────────┘  └────────┘  └───────┘  └─────┘  └─────┘

     All GND connections tied together (common ground)

📷 Power Wiring Diagram Placeholder

Detailed circuit diagram showing power connections will be added here

PCA9685 Power Connections

The PCA9685 has TWO separate power inputs. Both must be connected correctly:

1. Logic Power (VCC) - 3.3V from Pico

Connection:

  • • PCA9685 VCC → Pico 3V3(OUT) (Pin 36)
  • • PCA9685 GND → Pico GND (Pin 3/38)

Purpose:

  • • Powers PCA9685 microcontroller chip
  • • Enables I2C communication
  • • Does NOT power servos
  • • Low current (~30mA)

2. Servo Power (V+) - 5V from External Supply

Connection:

  • • PCA9685 V+ → 5V Power Supply +
  • • PCA9685 GND → 5V Power Supply

Purpose:

  • • High-current power for servos
  • • Distributed to all 16 servo channels
  • • Isolated from logic power
  • • 3-10A depending on servo count

⚠️ Critical: Both VCC (logic) and V+ (servo) grounds must connect together. This creates a common ground reference between Pico, PCA9685, and servos.

Power Filtering Capacitor

Why It's Needed

Servos draw sudden bursts of current when starting or stopping. Without a capacitor, these spikes cause voltage drops that can:

  • • Reset the Raspberry Pi Pico (brownout)
  • • Cause erratic servo behavior
  • • Damage the PCA9685 chip
  • • Create electrical noise on I2C bus

Specifications

  • Capacitance: 1000µF - 2200µF
  • Voltage Rating: 10V or higher (16V recommended)
  • Type: Electrolytic capacitor
  • Placement: Across V+ and GND terminals on PCA9685
  • Polarity: Negative leg (−) to GND, positive leg (+) to V+

⚠️ Polarity Warning

Electrolytic capacitors are POLARIZED. The negative leg (shorter, marked with stripe) MUST go to GND. Reverse polarity will cause the capacitor to fail or explode.

📷 Capacitor Installation Photo Placeholder

Photo showing capacitor placement on PCA9685 will be added here

Step-by-Step Power Wiring

  1. Step 1: Prepare Power Supply
    • • Verify output is 5V DC using multimeter
    • • Identify positive (+) and ground (−) terminals
    • • Ensure power supply is DISCONNECTED from AC wall outlet
  2. Step 2: Install Filter Capacitor
    • • Connect capacitor negative (−) leg to PCA9685 GND terminal
    • • Connect capacitor positive (+) leg to PCA9685 V+ terminal
    • • Secure with electrical tape or mount on terminal block
  3. Step 3: Connect Servo Power (V+)
    • • Power supply (+) → PCA9685 V+ terminal (red wire recommended)
    • • Power supply (−) → PCA9685 GND terminal (black wire recommended)
    • • Use screw terminal blocks for easy disconnection
    • • Use 18-20 AWG wire for current handling
  4. Step 4: Connect Logic Power (VCC)
    • • Pico Pin 36 (3V3) → PCA9685 VCC
    • • Pico Pin 38 (GND) → PCA9685 GND (same terminal as servo power GND)
  5. Step 5: Verify Common Ground
    • • All GND connections must tie together at PCA9685
    • • Use multimeter continuity test: Pico GND ↔ Power Supply GND

Power System Testing

Test 1: No-Load Voltage

  1. 1. Servos disconnected, Pico connected via USB
  2. 2. Plug in 5V power supply to AC outlet
  3. 3. Measure voltage at PCA9685 V+ and GND terminals
  4. 4. Expected reading: 4.9V - 5.1V

Test 2: PCA9685 Power LED

  • ✓ PCA9685 should have illuminated power LED (usually green)
  • ✓ If LED is off, check VCC connection from Pico 3.3V

Test 3: Under-Load Voltage

  1. 1. Connect 1-2 servos to PCA9685 channels
  2. 2. Run servo test code (moves servos continuously)
  3. 3. Measure voltage at V+ while servos are moving
  4. 4. Expected: Should not drop below 4.7V
  5. 5. If voltage drops >0.5V, upgrade power supply amperage

Best Practices & Tips

✅ Recommended

  • • Use thick wires (18-20 AWG) for power distribution
  • • Add a fuse (3-10A) between power supply and PCA9685
  • • Use terminal blocks for easy wire management
  • • Label all power wires clearly
  • • Mount capacitor securely to prevent short circuits
  • • Keep power wires away from I2C signal wires

❌ Common Mistakes

  • • Powering servos from Pico 3.3V or VBUS (insufficient current)
  • • Using USB power supply (<1A) for servos
  • • Forgetting the capacitor (causes brownouts)
  • • Using 12V power supply (destroys servos)
  • • Not connecting common ground
  • • Reversing capacitor polarity

Code Configuration

Power-related settings in config.py:

# Servo Power Configuration
SERVO_MIN_VOLTAGE = 4.8   # Minimum servo operating voltage
SERVO_MAX_VOLTAGE = 6.0   # Maximum safe voltage for servos
RECOMMENDED_VOLTAGE = 5.0 # Optimal operating voltage

# Power Management
MAX_SIMULTANEOUS_SERVOS = 4  # Limit concurrent servo movement
SERVO_STALL_CURRENT = 500    # mA per servo at stall
IDLE_CURRENT = 200           # mA per servo when idle

Note: MAX_SIMULTANEOUS_SERVOS prevents brownouts by limiting concurrent servo activation.