- Code: Select all
#include <AFMotor.h>
AF_DCMotor motor(4, MOTOR12_64KHZ);
void setup() {
Serial.begin(9600);
Serial.println("Motor test!");
motor.setSpeed(200);
}
void loop() {
Serial.println("forward");
motor.run(FORWARD);
delay(3000);
Serial.println("release");
motor.run(RELEASE);
delay(1000);
}
I tried putting a 0.1uF capacitor between the motor leads as suggested in posts: viewtopic.php?f=31&t=12012 and viewtopic.php?f=31&t=10290 but it doesn't make a difference. If I touch the capacitors, it makes it spin a bit longer initially but still not to 3 seconds and eventually it goes back to the short pulses. Could my finger tips be holding a charge? Stranger still is when I try to measure the voltage across the motor leads, the motor will run for the full 3 seconds initially but eventually it will also go back to the short pulses after testing for about 10-15 seconds.
I'm using a separate power source for the motor shield connected to EXT_PWR. I tried 7.2V, 9V, 12V at 350mA and 1A with no difference.
A couple of more observations:
- When I set the frequency to MOTOR12_1KHZ, the motor doesn't even pulse. This happens on M1 and M4 even though M4 is only suppose to run at MOTOR12_1KHZ.
- I tested it out on an Arduino Mega and Duemilanove with no difference.
- The Arduino itself doesn't appear to be resetting since the setup() messages are not repeating, just the messages within loop()
- A servo connected to the shield is working correctly
- The L293D feels a bit warm but not hot after testing for about 2-3 minutes. Is this normal?
The motor didn't come with any specs except the input voltage should be 3-12V. I purchased it from robotshop.ca as part of the DFRobot 4WD Arduino Mobile Platform, (http://www.robotshop.ca/dfrobot-4wd-ard ... orm-3.html). I think it is a Solarbotics GM2 which free runs at 52mA and stalls at 600mA which is within the specs of the motorshield.
Anyways, I'm lost as what I should do next. Any help would be appreciated. Thanks.

