Electronics Integration

Final wiring, cable management, and system testing

Final Integration Overview

This is where all electrical components come together. Take your time and double-check everything before powering on.

Time Required

45-60 minutes

Difficulty

Intermediate (patience required)

Tools Needed

Multimeter, zip ties, wire cutters

Step 1: Final Wiring Connections

A. Servo Connections to PCA9685

  1. 1. Connect each labeled servo to its designated PCA9685 channel (0-15)
  2. 2. Verify wire orientation: Orange/Yellow (signal), Red (power), Brown/Black (ground)
  3. 3. Ensure connectors are fully seated (should hear/feel click)
  4. 4. Check servo labels match your config.py servo_channels mapping

B. Power Connections

  • PCA9685 Logic Power: VCC → Pico 3.3V, GND → Pico GND
  • PCA9685 Servo Power: V+ → Power supply +, GND → Power supply −
  • Pico Power: USB cable from computer (for now)

C. Button & LED Connections

  • Start Button: GP16 (Pin 21) and GND
  • Stop Button: GP17 (Pin 22) and GND
  • Status LED: GP18 (Pin 24) → 220Ω resistor → LED+ → GND

Step 2: Cable Management

📌 Pro Tip: Good cable management prevents shorts, makes troubleshooting easier, and looks professional.

Cable Organization Techniques

Grouping
  • • Bundle servo cables by row/column
  • • Separate power and signal cables
  • • Keep button/LED wires together
  • • Route along frame edges
Securing
  • • Use zip ties every 100mm
  • • Don't overtighten (allow slight movement)
  • • Cut excess zip tie length flush
  • • Label cable bundles with tape

Strain Relief

  • At servo end: Leave 50mm slack for panel movement
  • At PCA9685: Secure cables to frame before connector
  • Power cables: Use terminal block or strain relief bushing

Step 3: Pre-Power Checks

⚠️ CRITICAL: Complete ALL checks before connecting power!

Powering on with mistakes can damage components permanently.

Visual Inspection Checklist

  • ☐ All servo connectors fully seated on PCA9685
  • ☐ Servo wire orientation correct (signal/power/ground)
  • ☐ No exposed wire strands or bare conductors touching
  • ☐ Power supply polarity correct (red=+, black=−)
  • ☐ All screws tightened on terminal blocks
  • ☐ Button and LED connections secure
  • ☐ No cables pinched or under strain

Multimeter Tests (Power OFF)

  1. 1. Continuity Check: Verify no shorts between power supply + and −
  2. 2. Servo Ground: Check continuity between servo GND and power supply −
  3. 3. Logic Ground: Check continuity between Pico GND and PCA9685 GND
  4. 4. Button Wiring: Press button, should show continuity to GND

Step 4: First Power-On Procedure

💡 Follow this sequence carefully: Powering components in the right order prevents damage.

Power-Up Sequence

  1. 1. Connect Pico to computer USB (WITHOUT servo power)
    • Pico should power on (green LED if present)
    • Computer should recognize USB device
    • Upload test code (blink LED or print "Hello")
  2. 2. Verify Pico is running code
    • Status LED should blink or respond to button press
    • Serial output should show in terminal
  3. 3. Connect servo power supply (5-6V)
    • Use multimeter to verify voltage at V+ terminal (should be 5-6V)
    • Listen for any unusual sounds (buzzing, clicking)
    • Check for smoke or hot components (if so, DISCONNECT IMMEDIATELY)
  4. 4. Test single servo
    • Run servo test code for Channel 0 only
    • Servo should move smoothly to commanded angles
    • No grinding or excessive current draw
  5. 5. Test all servos sequentially
    • Command each servo individually to center position (90°)
    • Verify each responds correctly
    • Check for interference between panels
  6. 6. Run full system test
    • Execute a simple folding sequence
    • Monitor current draw (should stay under power supply limit)
    • Test Start/Stop buttons
    • Verify status LED indicates system state

Troubleshooting Common Issues

❌ Servos don't move

  • • Check servo power supply is connected and providing 5-6V
  • • Verify I2C connections (SDA/SCL) between Pico and PCA9685
  • • Run I2C scanner code to confirm PCA9685 is detected
  • • Check servo_channels mapping in config.py

⚠️ Servos jitter or twitch

  • • Add/increase capacitor value on servo power (100-470µF)
  • • Check for voltage drop under load (use thicker power wires)
  • • Reduce number of servos moving simultaneously
  • • Improve power supply (higher amperage rating)

🔵 Buttons don't respond

  • • Verify Pin.PULL_UP is enabled in code
  • • Check button is wired to correct GPIO pin
  • • Test button continuity with multimeter
  • • Add debouncing in software (50-100ms delay)

🟢 LED doesn't light up

  • • Check LED polarity (flip 180°)
  • • Verify current-limiting resistor is present (220-330Ω)
  • • Test LED with multimeter diode mode
  • • Confirm GP18 is configured as OUTPUT in code

🎉 Integration Complete!

If all tests passed, your cloth folding robot is fully assembled and ready for calibration and operation!

Next Steps:

  • 1. Proceed to Calibration to fine-tune servo angles
  • 2. Load Folding Sequences for your grid size
  • 3. Test with actual fabric
  • 4. Enjoy your automated cloth folding!