So, ive taken a dive into the Arduino to create a simply stepper motor apparatus. Its going well, but thanks to the "read before posting" i think i found a problem i was going to ask about, but now i have to ask about the soloution.
Im using an arduino Mega 1280 to drive a pololu A4983 step driver. Im powering everything with this beefy little thinghttp://docs.google.com/viewer?a=v&q=cache:rzmUk-E2ZKYJ:www.meanwell.com/search/s-150/s-150-spec.pdf+S-150-9&hl=en&gl=us&pid=bl&srcid=ADGEESi6WADSHGflruiVLPsZbpy8nGKNLVn6G0e0P-O7VYEGwBmTcyHxUQTBhaLbhksHKtbIAZkjWWzu0pTWE0OvlO8V0-dT5fhTQze1dwQyEo5gGXnud5dyMfujof3LN44XIGaL6Hyd&sig=AHIEtbRci8jLlPuzii_N4wONzndaBsdrnA
Considaring my stepper motor is a Nema, drawing 1.2A, and i will be adding another down the line, this thing is serving me well...except for the mentioned "dirty power" in the FAQ.
The problem i have is i'll wire everything up, upload my sketch to the arduino, and it will work amazingly. For about a minute or two...then the motor begins the all too familliar squeel and seizes. Rebooting the arduino makes it work for a few seconds, but then back to the original problem. Seems the only soloution is unplugging the arduino from my setup, hooking up the USB and simply reuploading the sketch brings it all back to life.
I read on here that dirty power can cause the arduino to lose its sketch. So how can i go about fixing that? It is at a solid 9V, would i simply use a wallwart to power the arduino? I was using the VCC/GND pins the arduino wired to this PSU.
Reason i ask this is, ive read NEVER power up the arduino when the pololu driver is without power, as you'll blow the arduino. But, if you hookup usb, you get power, soo...
The other issue i'll have is, sometimes the stepper driver starts in the wrong direction, and will usually come back and go through the sketch, which is basically, step 1666 times one direction, pause 6 seconds, step back 1666.
Im sure some "dirt" comes from powering it all up and down, which makes me beleive i should hookup a relay or switch? The motor itself i'm sure destroys my DC signal, so i assume some beefy caps would correct this?
Lastly, i made such a rookie mistake and blew up my arduino last night. You guessed it. Crossed VCC and ground POOF! That one cap smoked. I have to asses damage today to make sure my pololu is still working. Anyway i can install a diode to prevent this on the next arduino?
Thanks in advance guys!