USB Control

USB Connection

When RoboClaw is connected to a powered USB host, it automatically enables USB communications. USB can be connected in any mode. In non-packet serial modes, USB packet serial commands can read status information and modify configuration settings, but motor movement commands are disabled (except when no RC signal is present in RC mode). When operating in packet serial mode with another device (such as an Arduino) connected to the S1 and S2 pins, both the device commands and USB packet serial commands will be executed.

USB Power

RoboClaw cannot be powered through the USB connection and requires an external power source to operate. If no external power is connected, it may unintentionally draw power from the USB port, which can cause unstable or erratic behavior. To prevent this, always connect the main power source before connecting via USB.

USB Comport and Baudrate

When connected via USB, the RoboClaw is detected as a CDC (Communications Device Class) virtual COM port.

  • On Windows, a USB driver is required. Motion Studio installs it automatically if it is not present.
  • On Linux and macOS, no manual installation is needed: the operating system will automatically detect the RoboClaw and load the appropriate driver.

Unlike traditional serial ports, the USB CDC virtual COM port does not require a baud rate setting. Communication occurs at the maximum speed supported by both the host and the device, typically around 1 Mbps.

USB Noise Immunity

USB connections have limited noise immunity and are more susceptible to electrical disturbances than other interfaces. For improved stability in noisy environments, a USB cable with ferrite cores at both ends is recommended. This reduces interference and provides more reliable communication. A preconfigured USB cable with dual ferrite cores is available from the BasicMicro website.

USB Isolation

In setups involving motor controllers, communication cables and power wiring often share ground connections. This can create ground loops, which are closed wiring paths that allow unintended current flow. Ground loops may induce voltage surges, shift reference levels, or drive current through USB or signal lines, potentially damaging both the motor controller and the connected host device.

For added protection, use a USB isolator. A USB isolator breaks the ground path between the controller and the USB host while maintaining data transmission. This prevents the USB cable from becoming an unintended current path, particularly if the negative battery terminal is disconnected while the USB cable is still attached. A USB Isolator that has been tested to work with RoboClaw is available from the BasicMicro website.

Placeholder for the printed-manual photo of a USB isolator
USB isolator (source: PDF page 15)