Testing & Calibration
Power up, calibrate servos, and validate system operation
Testing Overview
This final phase brings Fabrica to life. You will power on the system, calibrate each servo to its 0° home position, attach the servo horns correctly, and test the motion sequences. If you have followed all previous steps carefully, this should go smoothly.
Safety & Preparation
⚠️ Before Powering On:
- • Double-check ALL wiring connections (servo cables, I2C, power)
- • Ensure power supply is set to 5V DC and can deliver at least 3A
- • Verify polarity: Red = +5V, Black/Brown = GND
- • Keep hands away from moving parts during servo tests
- • Have emergency power disconnect ready
Testing Steps
Initial Power-On
- a.Plug in the 5V power supply to the PCA9685
- b.Connect USB cable to Raspberry Pi Pico 2W
- c.Observe the LED on the Pico—it should turn on
- d.The status LED on the button panel should also illuminate
- e.Listen for servo initialization (slight buzz or hum is normal)
💡 Expected Behavior: If code is uploaded correctly, servos will move to home position (0°) on startup. If servos do not move, verify code upload and I2C connection.
Servo Calibration (Critical!)
⚠️ IMPORTANT: Servo horns must be attached AFTER this calibration step, not before!
- a.Ensure code has run `servo_controller.py` calibration on startup
- b.All servos should now be at 0° position (neutral/home)
- c.Verify each servo by gently attempting to rotate by hand (should resist)
- d.If a servo rotates easily, check its PCA9685 connection
Attach Servo Horns
- a.With servos at 0°, attach the servo horn to Module 1 shaft
- b.Align horn so the panel arm is vertical (perpendicular to center panel)
- c.Secure with M2 screw (included with servo)
- d.Repeat for Modules 2, 3, and 4
- e.Verify all panels are aligned in the same vertical position
💡 Pro Tip: 0° = vertical (ready to fold). 180° = horizontal (fully folded). If panels are misaligned, remove horn and reposition.
Individual Servo Test
- a.Use the control buttons to test each servo individually (if your code supports this)
- b.Or, connect to REPL and manually move servos using commands like: `servo_controller.set_angle(0, 90)`
- c.Verify each servo rotates from 0° to 180° smoothly
- d.Check that follower modules (F1-F4) move in sync with motorized modules
Test Button Interface
- a.Press Button 1 (Enter) to start a motion sequence
- b.Press Button 2 (Up) and Button 3 (Down) to navigate sequences
- c.Press Button 4 (Config) to enter configuration mode
- d.Observe LED feedback (should blink or change state)
Full Motion Sequence Test
- a.Place a small piece of cloth (e.g., handkerchief) on the center panel
- b.Select a folding sequence and start execution
- c.Observe all 8 panels moving in coordinated motion
- d.Verify the cloth is folded according to the sequence
- e.Test multiple sequences to ensure repeatability
Common Issues
Servo does not respond
- • Check cable connection to PCA9685 (correct channel?)
- • Verify power supply (5V, sufficient current)
- • Test with REPL command to isolate hardware vs. software issue
- • Inspect servo for physical damage (gears stripped?)
Button presses not detected
- • Verify button wiring to correct GPIO pins
- • Check for loose connections or cold solder joints
- • Test with multimeter (continuity check when pressed)
- • Review `button.py` code for correct pin assignments
Panels misaligned after calibration
- • Remove servo horns and reattach with servos at exact 0° position
- • Verify calibration code in `servo_controller.py` uses correct pulse widths
- • Check for mechanical binding (panels should rotate freely)
- • Inspect servo bracket alignment on modules
I2C communication error
- • Verify SDA and SCL connections between Pico and PCA9685
- • Check for correct I2C address (default 0x40 for PCA9685)
- • Test I2C scan in REPL: `from machine import I2C; i2c = I2C(0); i2c.scan()`
- • Ensure pull-up resistors are present (usually built into PCA9685)
System Validation Checklist
Complete this checklist to confirm Fabrica is fully operational:
🎉 Fabrica is Ready!
Congratulations! You have successfully built and tested the Cloth Folding Robot. Fabrica is now ready to fold clothes automatically.
Next Steps:
- • Experiment with custom folding sequences
- • Adjust timing and angles for different fabric types
- • Share your build on social media (tag #BuildAirAI)
- • Explore advanced features in the documentation