Arduino hangs due to EMI

Well, thank you all guys!
Moving the DC +5V input to 5V instead of Vin, adding the 0,1uf capacitors to each module, adding a filter 1000uf cap to the dc in jack and the varistor to the relay made the system work flawlessly. I don’t know if everything is really necessary but as it is very cheap I just added all. Thanks again for your advices