URGENT!-Restart problem with Arduino Mega 2560

Did you put a flyback diode?