Skip to main content

Tutorial 01: Scan and Identify Motors

Prerequisites

  • motorbridge installed
  • CAN interface configured and up
  • Motors powered on

Why Scan First?

Scanning is essential because it:
  1. Confirms wiring - Verifies physical connections are correct
  2. Validates bitrate - Ensures CAN baud rate matches motor settings
  3. Discovers IDs - Finds motor_id and feedback_id pairs needed for control
  4. Detects conflicts - Identifies duplicate IDs that could cause communication issues

Quick Scan with CLI

The fastest way to discover motors:

Expected Output

Vendor-Specific Scanning

Damiao Motors

How it works:
  • Probes each motor_id from start to end
  • Calculates feedback_id = feedback_base + (motor_id & 0x0F)
  • Reads ESC_ID (rid=8) and MST_ID (rid=7) to confirm identity

RobStride Motors

How it works:
  • RobStride uses different feedback IDs
  • Tries multiple feedback_ids per motor_id
  • Uses ping command and parameter read as probes

MyActuator Motors

How it works:
  • MyActuator uses feedback_id = 0x240 + motor_id
  • Requests feedback and waits for response
  • Limited to IDs 1-32

HighTorque Motors

Scanning via Serial Bridge

For Damiao motors using USB-CAN adapter:

Programmatic Scanning

You can also scan from Python:

Understanding Scan Results

Damiao Format

MyActuator Format

RobStride Format

Troubleshooting

No Motors Found

  1. Check CAN interface
  2. Check wiring
    • CAN_H and CAN_L connected correctly
    • Termination resistors (120Ω) at bus ends
    • Motor powered on
  3. Check bitrate
  4. Try wider ID range

Timeout Errors

Increase scan timeout:

Multiple Motors Same ID

If scan shows multiple motors with same ID:

Recording Motor Configuration

After scanning, record the discovered configuration:

Next Steps