Electronic – USB communication keeps disconnecting because of power dip/spike

capacitorpower supplyupsusbusb device

I've got a question. I've got CNC router that's connected by USB to a desktop computer. We're in an old building, and wiring is not optimal 🙂 I'm not an expert, but I think too many rooms are on the same group.

My CNC machine disconnects every few minutes/hours. This happens when someone else turns on; a light, a water cooker, a vacuum cleaner, coffee machine, heck even the radio. This does not even have to be in the same room.

In a approach to fix this I've:

  • put one machine (cnc or pc) on a different group
  • put both machines on a different group
  • added a powered usb cable (5 or 10m)(the pc is a few meters away)

But no result. So my question is:

  • Do you know something to fix this?
  • would adding a UPS to the pc and/or cnc help? (are they quick enough to catch the dip/spike?)
  • Could or should a I add capacitors to the usb power wires. (if so, which)
  • Or even better, what is the exact cause for it all to crash. 🙂

— edit —

The setup is as following

  • CNC Router from X-Carve
    • The machine (execpt the spindel) is powerd by the x-controller
    • it has an internal 24V 400W power supply
  • The CNC is connected to the PC with a USB cable
    • The USB cable has it's own (extra) external power adapter (5V 0.25 amp), a powered usb cable.
  • The desktop computer sends the commands to the CNC router
    • The pc has, from the top of my head, a power supply of around 200W

When a power drop occurs the CNC freezes. This is most likely because the connection to the pc is reset and it stops receiving commands.

Note, the power drop is always also noticed on other electronical devices.

  • Radio/Stereo speakers make a crispy/ticking sound on a power drop
  • Some people experience the mouse cursor jump a few cm on the screen on a power drop.

Best Answer

"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.