Testing & Verification
Systematic testing procedures to verify all hardware connections before first operation
Step-by-step guide to systematically test and verify all hardware connections.
Why Testing is Critical
Proper testing prevents component damage, identifies wiring errors early, and ensures reliable operation. Follow these tests in sequence to build confidence in your system incrementally.
Safety First
Prevents damage to expensive components
Early Detection
Finds wiring errors before they cause problems
Confidence
Verify each subsystem works correctly
Required Testing Tools
Essential Tools
- ✓Digital Multimeter - voltage and continuity testing
- ✓USB Cable - for Pico connection to computer
- ✓Serial Console Software - Thonny or screen/minicom
- ✓Power Supply - 5V DC rated for your servo count
Optional but Helpful
- ◆Test Servo - known-good servo for isolated testing
- ◆Spare Wires - replacements for damaged connections
- ◆Notebook - record test results and observations
- ◆Camera/Phone - document working configuration
Phase 1: Pre-Power Inspection
Perform these tests with all power disconnected (no USB, no 5V supply).
Test 1.1: Visual Inspection
- ✓ All wires securely connected to proper pins
- ✓ No exposed wire strands touching adjacent pins
- ✓ Capacitor polarity correct (− to GND, + to V+)
- ✓ LED polarity correct (long leg to resistor, short leg to GND)
- ✓ Servo connectors fully seated on PCA9685 headers
- ✓ No loose connections or bent pins
Test 1.2: Continuity Test (Multimeter)
I2C Connections:
- • Pico GP0 (Pin 1) ↔ PCA9685 SDA (should beep)
- • Pico GP1 (Pin 2) ↔ PCA9685 SCL (should beep)
Power Connections:
- • Pico Pin 36 (3V3) ↔ PCA9685 VCC (should beep)
- • Pico Pin 38 (GND) ↔ PCA9685 GND (should beep)
- • Pico GND ↔ Power Supply GND terminal (should beep)
Interface Connections:
- • Each button: One terminal to assigned GPIO, other to GND
- • LED: Resistor present between GP6 and LED anode
Test 1.3: Short Circuit Check
Set multimeter to continuity mode. These should NOT beep:
- • Power supply V+ ↔ GND (indicates short circuit)
- • Pico 3V3 ↔ GND (indicates short)
- • Any GPIO pin ↔ Adjacent GPIO pin
- • SCL ↔ SDA directly
⚠️ If any of these beep, you have a short circuit. Find and fix before powering on.
Phase 2: Logic Power Testing (USB Only)
Connect only USB cable to Pico. Do NOT connect 5V servo power supply yet.
Test 2.1: Pico Power On
- 1. Connect Pico to computer via USB
- 2. Pico onboard LED should illuminate (green or orange)
- 3. Measure voltage at Pico Pin 36 (3V3): should read 3.2-3.4V
- 4. If no power, try different USB cable or port
Test 2.2: PCA9685 Logic Power
- 1. Check PCA9685 power LED is lit (usually green)
- 2. Measure voltage at PCA9685 VCC pin: should read 3.2-3.4V
- 3. If LED is off, check VCC and GND connections from Pico
Test 2.3: I2C Communication
- 1. Upload Fabrica code to Pico (use Thonny or mpremote)
- 2. Open serial console at 115200 baud
- 3. Look for startup message:
I2C devices found: ['0x40'] - 4. Success: PCA9685 detected and communicating
- 5. Failure: Empty list or error message (check I2C wiring)
Test 2.4: Interface Components
LED Test:
- • On startup, LED should blink 3 times
- • If no blink, check LED polarity and resistor connection
Button Test:
- • Press each button briefly (<3s)
- • Console should show "Button X short press" (X = 0-3)
- • Hold button 3+ seconds: LED blinks, then "Entering config mode"
Phase 3: Servo Power Testing
⚠️ Disconnect ALL servos from PCA9685 before connecting 5V power supply for first time.
Test 3.1: No-Load Voltage Test
- 1. PCA9685 servo channels empty (no servos connected)
- 2. Pico connected via USB
- 3. Plug in 5V power supply to wall outlet
- 4. Measure voltage at PCA9685 V+ and GND terminals
- 5. Expected: 4.9V - 5.1V (should be stable)
- 6. If voltage is significantly different, check power supply rating
Test 3.2: Single Servo Test
- 1. Power off 5V supply (unplug from wall)
- 2. Connect ONE servo to Channel 0
- 3. Power on 5V supply
- 4. Servo should move to 0° position (initialization)
- 5. Press Button 1 (short press)
- 6. Servo should execute: 0° → 180° → 0° smoothly
- 7. Measure voltage during movement: should not drop below 4.7V
Test 3.3: Progressive Servo Addition
- 1. Add servos one at a time to channels 0, 1, 2, etc.
- 2. After each servo added, test initialization (power cycle)
- 3. All servos should move to 0° on startup
- 4. Monitor voltage under load (measure while servos moving)
- 5. If voltage drops >0.5V, upgrade power supply amperage
- 6. Continue until all planned servos are connected
Test 3.4: Full System Load Test
- 1. All servos connected to their assigned channels
- 2. Execute motion plan that moves multiple servos simultaneously
- 3. Watch for: jittering, slow movement, or servo resets
- 4. Measure voltage drop during peak load (<0.3V drop is good)
- 5. Check all servos complete their movements smoothly
- 6. Verify no Pico brownouts (LED stays lit, no resets)
Phase 4: Final System Verification
Checklist: Sign-Off
🎉 System Ready for Assembly
If all checklist items pass, your electronics are correctly wired and tested. You can now proceed to:
- • Install servos into printed mechanical assemblies
- • Mount electronics in controller housing
- • Perform mechanical assembly
- • Calibrate servo positions for panels
- • Program custom folding sequences
Common Testing Issues & Solutions
Issue: PCA9685 not detected on I2C bus
- → Check SCL and SDA connections (try swapping them)
- → Verify PCA9685 power LED is on
- → Reduce I2C wire length (<30cm)
- → Check for solder bridges on PCA9685 address pins
Issue: Servos jitter or buzz continuously
- → Power supply insufficient current (upgrade to higher amperage)
- → Capacitor missing or installed backwards
- → Voltage dropping too low under load (<4.5V)
- → Servo wires too long (signal degradation)
Issue: Pico resets when servos move
- → Servo power causing voltage drop on Pico (common ground issue)
- → Use separate regulated power supply for servos
- → Add larger capacitor (2200µF) to servo power rail
- → Ensure Pico powered via USB, not sharing servo supply
Issue: Some servos don't move or move incorrectly
- → Verify servo connector orientation (signal/power/ground alignment)
- → Test servo individually on Channel 0 (isolate hardware vs code issue)
- → Check SERVO_MIN_PULSE and SERVO_MAX_PULSE calibration in config.py
- → Damaged servo (test with multimeter or swap with known-good servo)
Testing Best Practices
Do:
- ✓ Test incrementally (one component at a time)
- ✓ Document what works before moving to next test
- ✓ Take photos of working wiring configuration
- ✓ Keep a testing log with observations
- ✓ Verify continuity before applying power
- ✓ Use multimeter to double-check voltages
Avoid:
- ✗ Connecting everything at once without testing
- ✗ Skipping pre-power visual inspection
- ✗ Assuming wiring is correct without verification
- ✗ Hot-swapping components while powered
- ✗ Ignoring warning signs (smoke, heat, buzzing)
- ✗ Proceeding when tests fail (fix issues first)
Troubleshooting Common Issues
If tests reveal problems, use these troubleshooting guides to diagnose and fix common wiring issues.
❌ No I2C Devices Found
- • Check SCL and SDA are not swapped
- • Verify power is connected to PCA9685 (LED should be on)
- • Test continuity of I2C wires
- • Ensure common ground between Pico and PCA9685
❌ Servos Not Moving
- • Check servo power is connected (V+ and GND to PCA9685)
- • Verify servos are plugged into correct channels
- • Test individual servo with a servo tester
- • Ensure power supply provides enough current (5A minimum)
❌ Erratic Servo Movement
- • Power supply voltage drop (use thicker wires)
- • Loose connections (re-seat servo connectors)
- • Electrical noise (add 100µF capacitor across power)
- • Too many servos moving at once (adjust sequence)
❌ Pico Won't Boot
- • Disconnect all peripherals and test Pico alone
- • Check for shorts on VBUS or GND pins
- • Try different USB cable or power source
- • Re-flash MicroPython firmware if software corruption
Code Configuration
Testing and debugging settings in config.py:
# Testing & Debug Configuration DEBUG_MODE = True # Enable verbose logging SERIAL_BAUD = 115200 # Serial console baud rate # Test Mode Settings TEST_MODE_ENABLED = False # Single servo test mode TEST_SERVO_CHANNEL = 0 # Test this channel only TEST_SEQUENCE = [0, 90, 180, 90, 0] # Test positions # Safety Limits MAX_RETRIES = 3 # I2C communication retries WATCHDOG_TIMEOUT = 10 # Seconds before auto-reset ERROR_LED_ENABLED = True # Blink LED on errors
Enable DEBUG_MODE for detailed logging during testing. Set TEST_MODE_ENABLED to test individual servos safely.