Loses connection to USB

In addition to @bernd.dk’s suggestion, the Troubleshooting guide may help:

Basically:

  • USB was never intended for use in machines switching high currents
  • Consumer-grade controllers tend to have overly delicate circuitry that’s easily perturbed by EMI

The shortest, most robust high-quality cable with ferrite cores tends to solve many problems. Anything over about a meter seems to require an active repeater cable and anything over two meters works better (or at all) with power injection at the controller end.

Some previous discussions shed light on the problem: