I'm trying to build an Arduino robot using Arduino Uno, the DFRobot Pirate chassis with the 4 motors that come with it, and Adafruit Motor Controller v2.3. When testing with Adafruits DCMotor test sketch, the motor runs fine for a few seconds up to sometimes 15-20 seconds. Then it stops changing speed up and down as its supposed to based on the sketch code and just runs at constant speed.
I'm thinking what might be happening is that my Arduino crashes or resets although I'm not sure. On some occations I have seen in Serial Monitor the text that the sketch sends when it first starts running show up midway through running the sketch. Sometimes the motor just keeps going at constant speed.
I have stacked the shield ontop of the Arduino. At the moment im powering the Arduino from USB. I'm powering the motors from a pack of 5xAA batteries in series through the Adafruit shields external power connection.
Has anyone had this problem? I have been googling and first I found a discussion somewhere that suggested there might be a problem with wire.h file and the Adafruit shield and I2C, but that related to an old version of the shield. I then found a bunch of stuff on DC motor noise. I'm thinking this might be what is going on. I have read that capacitors soldered to the motors might help. Also, my power wires are quite long and some of them run close to the Arduino. I understood that the interference from motors might be amplified by the wires acting as antennas?
I just ran a test by having the Arduino print out numbers every 2 secs to the Serial Monitor to see if there is a problem when the motors are not running. Everything works fine with power to the Adafruit shields external power supply on but motors not turning.
Ideas as to whats going on and what to do? If you think it is the motors, I'll certainly try soldering capacitors to them, but can you recommend good replacement DC motors with low interference?
Thanks in advance!