USB communication keeps disconnecting because of power dip/spike
"is your PC properly grounded"?


I would say that your problem is that your equipment is "too much grounded". Likely you have several ground loops that create ground spikes as you turn on-off other equipment, through so-called "ground bounces". Try to power your PC and CNC from the same power strip (even is you need a long power cable to your CNC, and don't ground anything other that the native ground wire at the AC outlet. USB has very limited tolerance to common-mode offsets, 2-3V maybe, so the right grounding and correct de-coupling of the USB cable shield is critical for noise tolerance. It is very likely that the router has wrong/suboptimal shield schematics at the USB connector.

So, all-individual power cables without any extra grounds might solve your problem.

The other method would be to put the controlling PC in near proximity to the router itself, and communicate with PC remotely via a Wi-Fi port. This will provide good isolation from your noisy environment.

I don't know of a good optically-isolated USB link that would operate at USB 2.0 HS. There are a fairly-well engineered optical cables made professionally by Corning Communication. Fiber-optics provide good signal fidelity over long distances, but the power/ground is not truly isolated in their design. So ground loops might be still an issue.