USB Connection Problems


USB connection issues can be categorized into two main types:

  1. Temporary USB Dropouts: These are brief interruptions in the USB connection, often occurring during motor acceleration or deceleration. Such events can generate electromagnetic interference (EMI), which may momentarily disrupt data transmission.

  2. Persistent USB Connection Failures: These are more serious and occur when the motor drive fails to establish any connection with Roborun+ via USB. Unlike temporary dropouts, these issues do not resolve on their own and may require hardware or configuration changes.


The following paragraphs will analyze each scenario in detail.


1. USB Dropouts


The USB connection is not considered stable so it should be used only for the initial configuration of the drive and not on the final application. The USB connection can drop if the drive turns off or if the USB cable is affected by EMI.


1.1 Motor Drive Turns off


The motor drive may shut down if the battery voltage drops below 7 V. This can occur when a weak battery is used and the drive draws high current, which is most likely during motor acceleration or deceleration.


Additionally, if a power supply unit is used that does not support regeneration, the output may trip when the motor regenerates energy. This can temporarily shut down the drive, resulting in a loss of the USB connection.


A reset of the motor drive can be detected by monitoring its power and status LEDs. During a reset, the drive will rapidly toggle its status LEDs.


The table below summarizes possible causes and solutions when a USB disconnection is due to a motor drive reset caused by the absence of input voltage:


Possible cause
Solution
Power Supply unit trips due to motor regenerative energy. 
  • Use a shunt regulator, such as the one sold by Roboteq, to absorb excess regenerative energy.
  • Use a battery of the same voltage in parallel to the power supply unit, to absorb excess regenerative energy. 
  • Avoid high acceleration/deceleration values, either by decreasing the acceleration/deceleration parameters or by gradually adjusting the motor command (e.g., using smoother movements on the slider). 
Power supply or Battery voltage drops due to high current demand.
  • Recharge or replace the battery
  • Use a power supply with higher current capacity.
  • Decrease acceleration/deceleration to reduce motor current during transients
Input voltage drops because of a short circuit. An accidental short circuit can result in a temporary drop in battery voltage. If the duration of the short circuit is not long enough, the system’s fuse may not trip. 
  • Identify and eliminate the source of the short circuit
  • Test the drive to ensure it operates properly and has not been damaged
5 v output overload. This is a less common scenario, but if the loads powered by the motor drive’s 5 V output exceed its current capacity, the internal DC/DC converter voltage may drop. As a result, the drive will shut down until the 5 V output load is removed. 
  • Remove the load from the 5 V output to allow the drive to recover.
  • Use a separate 5 V power source if the connected devices require higher current than the motor drive can supply.


1.2 EMI 


Electromagnetic interference can be induced on the USB cable. The impact of noise tends to be more significant during motor acceleration or deceleration, when motor current is typically higher.


If USB communication instability is related to high motor current, you can try the following:


  • Use a shorter USB cable: Shorter cables have less surface area to pick up EMI and lower resistance, which improves signal integrity and reduces the chance of data corruption.
  • Use a shielded USB cable: Shielding protects the data lines from external electromagnetic fields, especially those generated by nearby high-current devices like motor drives.
  • Use a ferrite coil (ferrite bead): Ferrite coils suppress high-frequency noise by absorbing EMI on the cable, acting as a passive filter to prevent interference from reaching the USB transceiver.
  • Keep the USB cable away from power cables: Power cables, especially those carrying high currents, are major sources of EMI. Physical separation minimizes inductive and capacitive coupling between the USB and power lines.


1.3 Script-Related Crashes


Another possible cause of motor drive resets is a faulty script that crashes the drive’s firmware. This can happen if the script incorrectly accesses memory—such as by declaring a table improperly—or misuses supported functions (e.g., attempting to access a configuration parameter using the setcommand function).


If the script execution reaches these problematic lines, the firmware may crash, causing the motor drive to reset. To prevent continuous resets when a faulty script is set to auto-run at startup, the drive includes a protection mechanism: after several consecutive crashes, it will automatically enter DFU (Device Firmware Upgrade) mode.


For more details on how this behavior can lead to persistent USB connection failures, see the next section.

 


2. Persistent USB Connection Failures:


The most common causes of complete USB connection failure include:

  • The drive is in DFU mode, waiting for a firmware upgrade
  • The drive's firmware is corrupted or incompatible
  • The USB cable is faulty
  • The USB port on the controller is damaged


To troubleshoot persistent USB failures, follow the flowchart provided below.


Note: A working RS-232 to USB adapter is required to perform the troubleshooting steps.

 



Each stage of the chart is analyzed below:


DFU mode


The motor drive can enter DFU (Device Firmware Upgrade) mode either when the "Update firmware with USB" button is clicked, or when the drive resets more than five times within ten seconds—typically due to faulty firmware or a crashing script. Once in DFU mode, the drive will remain there until you either perform a firmware update or open the DFU Loader and click the "Quit" button. 


To check if the controller is in DFU mode follow the next steps:


1. Open the DFU loader by typing "DFU" on the windows search bar 


2. If the dropdown menu with the STM devices in DFU mode is not blank, then the motor drive is in DFU mode



3. Click the "Quit" button and reset the controller


If the drive was previously in DFU mode, now it should connect to Roborun+ successfully. 


Another way to identify if the controller is in DFU mode is to check the LED blinking pattern. The DFU mode pattern is one brief blink every one second, as shown below: 



RS232 connection


The motor drive can connect to Roborun+ through RS-232 by using a USB to RS-232 adapter. Before proceeding with that step, you must ensure that your RS-232 adapter is operational and capable of communicating with other RS-232 devices. You can find more information about testing the RS-232 adapter in the Troubleshooting RS-232 communication problems article.


If the drive can connect with RS-232 port but not with USB - and is not stuck in USB mode as previously described - ,then it can be assumed that the firmware is working properly and  the USB port may be damaged.


Reviving the controller through RS-232


If neither USB nor RS-232 seem to work, then the motor drive's firmware may have crashed. The most common way for this to happen is if a wrong firmware has been installed to the drive. There is a method to re-flash the firmware by using RS-232 connection, even if the motor drive is unresponsive. To do so, follow the article How to restore an unresponsive controller.


If the firmware update still cannot be performed, it is possible that the RS-232 port is also damaged. In this case, the only solution is to submit an RMA request to send the drive in for diagnosis. The unit will either be restored, if feasible, or replaced—provided it is still under warranty and no user-related fault is identified.