I found this setup online to control a motor using a MOSFET with an Arduino:
In my case the external power source is a 9.6v battery. I wired everything up and it works great so long as the Arduino is powered via USB.
However, when I simply added a connection between the + of the battery to VIN of the Arduino (so that I wouldn't need USB power) it stops working and my Arduino heats up a lot.
How do I power the Arduino from the battery properly?