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?