The Arduino is connected to a 5V power supply that is plugged in at the same outlet as the motor.
When the relay is connected to the Arduino but without the motor the program works fine. The relay will do the on off sequence as programed when pushing the button (10 sec on then off for 2 sec then 5 sec on then off)
When the motor is connected and you press the button it will go on for a random time then off or it keeps on. It's different every time, some times on off very fast or it doesn't even start with the first push but after you push the button 3-4 times. Total random.