Again the arduino mega is externally powered.
The power source usually has nothing to do with resetting an arduino. Activity on the serial port causes the arduino to reset. When a pc opens a serial port it sends signals on the rts/dtr setial lines which cause the arduino reset (unless defeated).