rc snubber networks/ac filter caps

Tayda Electrinics sells a Varistor herehttp://www.taydaelectronics.com/varistors.html the first one looks like your answer for a 120VAC circuit, use the 300V part for 220VAC and use the biggest one you find there the hogher the "Joule" rating, the more energy it can dissipate. This part is installed across the motor and should nicely clean up the problem. In addition I have 2 other recommendations, One is to connect the motor frame to neutral (This might well fix all the problem) and the other is to gather the AC power leads close together and route them away from the AC wiring to prevent coupling the motor current spike from being radiated to the USB cable as it (the cable) is the direct connection to the processor and the easiest place for noise or switching transients to affect the operation of the processor. Typically relays are rated at > 1000V isolation from contacts to the coil and are unlikely to have much of an effect on the processor inputs considering that the power used to operate the relays "should" be from a very low impedance circuit and thus more likely to conduct the transient to ground then the processor, The inputs are however a wholly different thing. Originally I thought you were using a more "low tech" relay board or "rolling your own" relay board and my comments were directed to that situation, I apologize for misleading you in my previous "recommendations" and in the future please be more forthcoming with ALL the details... It will get you a better quality answer, one more likely to solve your issues faster. If you keep me informed I will do my best to provide the same quality of help that I would expect from others.

Bob