Servo Setup and Configuration
⏱️ Estimated time: 30-45 minutes
🔧 Required tools: Computer, servo driver, USB cable
📦 Required components: 5× STS3215 servos, servo driver board
🔧 Required tools: Computer, servo driver, USB cable
📦 Required components: 5× STS3215 servos, servo driver board
Overview
Each LeLamp uses 5 STS3215 servos that must be individually configured with unique IDs. This setup process ensures each servo responds correctly to commands and operates within safe parameters.Step 1: Download LeLamp Runtime
Clone the Repository
On your personal computer, open your terminal and clone the LeLamp Runtime Repository:
Verify the download by checking that the
lelamp_runtime directory contains Python files and configuration folders.Install UV Package Manager
Install the UV package manager for Python dependency management:
You may need to restart your terminal or source your shell configuration after installation.
Step 2: Prepare Your Servos
Unbox and Inspect Servos
Remove all 5 servos from packaging and inspect each one:
- Check for physical damage
- Verify all servo horns are included
- Test manual rotation (should move smoothly with slight resistance)
- Ensure cables are intact and connectors are clean

Label Your Servos
Create labels for each servo according to their intended position in LeLamp:

| Servo Name | Servo ID | Function |
|---|---|---|
| base_yaw | 1 | Base rotation (left/right) |
| base_pitch | 2 | Base tilt (forward/back) |
| elbow_pitch | 3 | Elbow joint movement |
| wrist_roll | 4 | Wrist rotation |
| wrist_pitch | 5 | Head tilt (up/down) |

There’s no specific servo that must be assigned to each ID. The important thing is having 5 servos with unique, labeled IDs that you can track throughout assembly.
Step 3: Configure Servo Driver Connection
Step 4: Run Motor Setup Script
Follow Interactive Setup
The setup script will guide you through configuring each servo:
- Connect each servo individually when prompted
- Verify servo response to test commands
- Set servo ID according to your labeling system
- Test range of motion to ensure proper operation
- Save configuration for each servo

Verify All Servos
After individual setup, connect all servos in a daisy chain to verify they respond correctly:
- Each servo should respond only to its assigned ID
- Movement should be smooth and controlled
- No servo conflicts or communication errors
All 5 servos respond correctly to individual commands without interference.
Servo Configuration Details
Understanding Servo IDs
Each servo must have a unique ID (1-5) that corresponds to its position in LeLamp:Base Yaw (ID: 1)
Base Yaw (ID: 1)
Function: Rotates the entire lamp left and right
Range: ±90° from center position
Critical: This servo bears the weight of the entire upper assembly
Base Pitch (ID: 2)
Base Pitch (ID: 2)
Function: Tilts the lamp forward and backward
Range: Approximately ±45° from vertical
Critical: Controls overall lamp posture and attention direction
Elbow Pitch (ID: 3)
Elbow Pitch (ID: 3)
Function: Bends the lamp’s “elbow” joint
Range: 0-180° (fully extended to fully bent)
Critical: Primary articulation for expressive gestures
Wrist Roll (ID: 4)
Wrist Roll (ID: 4)
Function: Rotates the head assembly around its axis
Range: ±180° continuous rotation
Critical: Adds expressiveness to head movements
Wrist Pitch (ID: 5)
Wrist Pitch (ID: 5)
Function: Tilts the head up and down
Range: ±45° from horizontal
Critical: Fine control for attention and expression
Communication Protocol
The servos communicate using a daisy-chain protocol:Each servo passes commands along the chain, responding only to messages with its specific ID. This allows control of all servos through a single communication cable.
Testing and Validation
Individual Servo Tests
After setup, test each servo individually:- Range of Motion
- Response Speed
- Position Accuracy
System Integration Test
Test all servos working together:- No communication conflicts between servos
- Smooth coordinated movements
- Proper power distribution
- Stable operation under load
Success Criteria
After completing servo setup, verify the following:Configuration Verification
Configuration Verification
- All 5 servos labeled with intended positions
- Each servo responds only to its assigned ID (1-5)
- No servo ID conflicts or communication errors
- Motor setup script completed without errors
- Configuration saved and can be reloaded
Performance Verification
Performance Verification
- All servos move smoothly through full range
- No binding, grinding, or unusual noises
- Position feedback matches commanded positions
- Response time is consistent across all servos
- Power consumption within expected ranges
System Integration
System Integration
- All servos can operate simultaneously
- Daisy-chain communication works reliably
- No interference between servo operations
- System remains stable during complex movements
Troubleshooting Common Issues
Servo Not Detected
Servo Not Detected
Symptoms: Setup script cannot find or communicate with servoSolutions:
- Check USB connection and try different cable
- Verify servo driver power supply
- Try different USB port on computer
- Check servo cable connections
- Restart servo driver and reconnect
Permission Errors
Permission Errors
Symptoms: “Permission denied” or “Access denied” errorsSolutions:
- Linux: Add user to dialout group:
sudo usermod -a -G dialout $USER - macOS: May need to run with
sudofor serial access - Windows: Check device manager for driver issues
- Restart terminal after permission changes
Servo ID Conflicts
Servo ID Conflicts
Symptoms: Multiple servos respond to same commandSolutions:
- Reset all servos to factory defaults
- Configure servos one at a time, disconnecting others
- Verify each servo ID before connecting the next
- Use servo manufacturer’s configuration tool if available
Inconsistent Movement
Inconsistent Movement
Symptoms: Servo moves erratically or doesn’t reach target positionsSolutions:
- Check power supply voltage and current capacity
- Verify servo cable integrity
- Test servo individually outside of daisy chain
- Update servo firmware if available
- Replace servo if hardware fault is suspected
Next Steps
Servo setup complete! Your servos are now configured and ready for mechanical assembly.