controlling antenna rotator - serial connection problem

I have one of these (similar) cheap antenna rotator:

I'm using Arduino Uno and 2-channel relay board:

Every time I turn off/on motor(relay) via serial command, serial port on PC just freezes, and I need to unplug/plug android uno to make it work again. It's completely random, sometimes I can do multiple on/off's, sometimes it freezes after one command.
If I disconnect motor from relay, it works great...same with turning on/off led.
So obviously there is some problem with power/magnetic field or something else from motor (sorry I'm noob) :slight_smile:
Arduino sketch is irrelevant here, because it works. I'm using arduino serial monitor to send commands to arduino uno (0 turn off, 1 turn on).

I have attached "schematics" how motor is connected to relay board.
Please help!
Thanks.

Do you get the crash if the motor is not connected, i.e. you're just operating the relay?

No I don't, it works great with just switching relay or some LED on/off

Have you tried shielding the motor cables?
How long are the various cables?

What should I use to shield motor cable? Aluminium folium ?
Motor cable is ~4m long.
While others are roughly 20-40cm

btw. I have found that few people had similar issues with big motors, and capacitor helped.
But what size do I need and where to connect it?

This definitely seems like EMI (Electro-Magnetic Interference).

See this on the ArduinoInfo.Info WIKI HERE:

And also worth reading this on the ArduinoInfo.Info WIKI HERE:to make sure you know how to really use the opto-isolation on those relay boards:

You should be able to make this work.. With relays located next to the control box with a separate small 5V supply running the relay logic and coils, some cable distance to the Arduino, and the opto-isolation used so there is no direct electrical connection from the Arduino to the relay power section it should be LOTS better.

Thanks everyone, I will try with those "EMI fixes".