Arduino on USB Interfering with Parallel Port CNC Machine

I set up an arduino connected to a relay which switches the spindle on my CNC machine on or off. The arduino is connected to the CNC computer (a salvaged old computer made in 2005ish with around 1GB of RAM) through a USB port. The program on the arduino reads a byte from the serial port and switches on or off the relay depending on what it reads. Pretty basic, right?

The arduino is somehow interfering with at least one axis's steppers when the spindle is switched on since I noticed a creaking noise when I told the arduino to switch on the spindle, and on closer inspection I noticed my Z axis creeping up despite EMC2 (machine controller program) telling me all axes were stationary and I was not running anything. The steppers are driven by a separate driver board connected to the computer through a parallel port.

No other USB device attached to the computer causes any problems. I have a webcam attached so I can monitor the machine and a wifi USB adapter so I can control and observe the machine remotely.

What exactly is going on here and how should I fix it? See the below picture for the setup:


I have a better CNC computer on the way so would that help?

You probably have a problem created by the introduction of the new path to ground through the USB cable. Take another look at your wiring and try to picture the easiest path to ground for your CNC controller / stepper drivers.

^ Could be a groundloop problem.

Why an Arduino for a simple task like this.

The parallel port has a spindle on/off or spindle speed PWM signal.
Just connect your relay driver to that parallel port pin.

I got the newer computer today to control the CNC machine and I no longer have any interference problems.

I can still run the relay with the arduino connected to the computer via USB, and accurately control the machine's steppers/