2WD + adafruit motor shield

Hello.
I use processing to control my robot via bluetooth

I have connected the arduino (mega 2560) to a 12V battery.
I don't use external power to power up the 2 DC motors in adafruit motor shield.

when motor speed is low (50-100) robot runs normally
but when I increase the motor speed arduino resets itself

Any suggestion?

p.s: Can capacitors on DC motors help?

Thanks

Are the DC motors 5V ?
You can't use the voltage regulator of the Mega board for that, you need a seperate power supply for the motors. Perhaps with a DC/DC converter.