Fried Arduino on a motorized stick?

Hi guys, I'm a newbie to fritzing with my Arduino Uno rev.2, well, what was my Arduino. I'm trying to figure out what went wrong.

I used a usb to computer to begin with for power, then I used an external power supply of 12v/1amp and it wasn't doing anything. Then I unplugged and switched the wires from the 5v on the Arduino to pin 9 on my ULN2004A, and left Vin attached to the 50k trimpot and Unipolar 2-phase stepper(4vdc, 1.2A/phase) Com A and Com B. I heard a pop when I plugged it in, and immediately unplugged it; smelling burnt chips. It will still operate the stepper, but unrecognized by my computer.

My question is, can I replace my AtMega328 and get programming again, and what was the moronic decision I made that fried my Arduino?

Thanks guys! XD

It will still operate the stepper, but unrecognized by my computer.

Sound like the ATmega328 is working okay but you have fried the USB/RS232 chip. If you have a FTDI breakout then try connecting directly to the mega328 pins and see if you can still program it.

Then I unplugged and switched the wires from the 5v on the Arduino to pin 9 on my ULN2004A, and left Vin attached to the 50k trimpot and Unipolar 2-phase stepper(4vdc, 1.2A/phase) Com A and Com B.

That's what you did wrong - that put all the power of the inductive spikes from the motor through the Arduino board and put large spikes on the 5V line (upto 12V perhaps), and for some reason the 328 survived (luck plus the decoupling caps!).

You must connect the motor supply directly to the pin 9 of the ULN2003. Its essential to preventing destructive inductive voltage spikes.

Thank you for your advice! GOOD NEWS! I was able to get my Arduino firmware reprogrammed through DFU mode and the FLIP software!

Did I nearly use method 8 in this resource page to destroy my Arduino? http://ruggedcircuits.com/html/ancp01.html

Also, I'm feeling a bit overwhelmed as to what I can do with the Arduino and motor controllers. Can I use my 1.2A/phase 4v unipolar stepper to its full capacity? In the aformentioned link on method 10, am I understanding that I can't exceed 200mA of current on my controlled devices?

Some kind of link to an information dump to understand these circuits would be great also, if anyone knows of one!

Thanks again for your constructive input!