Hardware Setup
View SourceThis guide covers the physical setup and connection of your Waveshare RoArm robot arm.
Supported Models
RoArm Elixir supports the following Waveshare robot arm models:
| Model | DOF | Features |
|---|---|---|
| RoArm-M2 | 4 | Basic model with gripper and LED |
| RoArm-M2-Pro | 4 | Enhanced version with improved servos |
| RoArm-M3 | 6 | Advanced model with wrist rotation |
| RoArm-M3-Pro | 6 | Professional version with high-torque servos |
Physical Setup
1. Power Connection
- Power Supply: Use a 12V 5A DC power adapter (included)
- Power Port: Connect to the DC power jack on the driver board
- Power Switch: Locate the power switch on the base of the robot
- ON Position: Robot is powered and operational
- OFF Position: Robot is powered down
⚠️ Important: Always ensure the power switch is in the ON position before attempting communication.
2. USB Connection
The RoArm has two USB-C ports - it's crucial to use the correct one:
✅ Correct Port (Middle USB-C)
- Location: Middle of the driver board
- Purpose: ESP32 communication interface
- Use for: Serial communication with your computer
- Baud Rate: 115200
❌ Wrong Port (Edge USB-C)
- Location: Edge of the driver board
- Purpose: Radar communication (if equipped)
- Do not use: For robot arm control
3. Connection Steps
- Connect the 12V power adapter to the DC port
- Turn the power switch to ON
- Connect USB-C cable to the middle USB-C port
- Connect the other end to your computer
- The device should appear as a serial port:
- macOS:
/dev/cu.usbserial-*or/dev/tty.usbserial-* - Linux:
/dev/ttyUSB*or/dev/ttyACM* - Windows:
COM*
- macOS:
Port Detection
Finding Your Robot's Port
# List all available serial ports
ports = Roarm.Communication.list_ports()
IO.inspect(ports)
# On macOS, look for something like:
# %{"/dev/cu.usbserial-110" => %{...}}
# On Linux, look for something like:
# %{"/dev/ttyUSB0" => %{...}}Device Recognition
When properly connected, you should see:
- macOS: Device appears in System Information under USB
- Linux:
lsusbshows "CP210x UART Bridge" or similar - Windows: Device Manager shows "Silicon Labs CP210x USB to UART Bridge"
Testing Connection
Use the built-in test function to verify your setup:
# Test connection (replace with your port)
case Roarm.test_connection("/dev/cu.usbserial-110") do
{:ok, position} ->
Logger.info("✅ Connection successful!")
IO.inspect(position)
{:error, reason} ->
Logger.info("❌ Connection failed: #{inspect(reason)}")
endTroubleshooting
Common Issues
"Port not found" or "Connection refused"
Causes:
- Wrong USB-C port (using edge port instead of middle port)
- Power switch is OFF
- USB cable issue
- Driver problems
Solutions:
- Verify you're using the middle USB-C port
- Check power switch is ON
- Try a different USB-C cable
- Restart the robot (power OFF → wait 5 seconds → power ON)
"Permission denied" (Linux/macOS)
# Add your user to the dialout group (Linux)
sudo usermod -a -G dialout $USER
# Or temporarily change permissions
sudo chmod 666 /dev/ttyUSB0
Device not recognized
Windows:
- Install CP210x USB to UART Bridge VCP Drivers
- Download from Silicon Labs website
- Restart computer after installation
macOS:
- Drivers usually install automatically
- If issues persist, install CP210x VCP drivers manually
Linux:
- Most distributions include drivers by default
- For older systems:
sudo apt-get install linux-modules-extra-$(uname -r)
Verification Checklist
- [ ] Power adapter connected to DC port
- [ ] Power switch in ON position
- [ ] USB-C cable connected to middle port (not edge port)
- [ ] Device appears in system's port list
- [ ] No permission issues with serial port access
- [ ] Baud rate set to 115200
Multiple Robot Setup
For controlling multiple robots simultaneously:
# Start separate communication channels
{:ok, _} = Roarm.Communication.start_link(name: :comm1)
{:ok, _} = Roarm.Communication.start_link(name: :comm2)
# Connect each robot to its own communication channel
Roarm.Communication.connect("/dev/ttyUSB0", server_name: :comm1)
Roarm.Communication.connect("/dev/ttyUSB1", server_name: :comm2)
# Start robot controllers
{:ok, _} = Roarm.Robot.start_link([
name: :robot1,
robot_type: :roarm_m2,
port: "/dev/ttyUSB0"
])
{:ok, _} = Roarm.Robot.start_link([
name: :robot2,
robot_type: :roarm_m3,
port: "/dev/ttyUSB1"
])Safety Considerations
⚠️ Safety First
- Always ensure adequate workspace around the robot
- Keep fingers and objects clear of the robot's range of motion
- Use the emergency stop (power switch) if needed
- Start with slow movements when testing
- Ensure the robot is properly secured to the work surface
Next Steps
Once your hardware is properly connected:
- Follow the Getting Started guide for basic usage
- Explore the Command Reference for advanced features
- Check out the demo functions for interactive control