I have arduino mega, and ladyada's motor shield v1.0(http://ladyada.net/make/mshield/) and i want connect 4 DC motors(http://www.dfrobot.com/index.php?route= ... UOuh1d42lu).
Mega powered by USB or 9v jack, Shield powered by 5xAAA battery. I want test one motor, wired him to M1 terminal on motor shield. Then i run typical code for test:
Code: Select all
#include <AFMotor.h>
AF_DCMotor motor(1);
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Motor test!");
motor.setSpeed(200); // set the speed to 200/255
}
void loop() {
Serial.print("tick");
motor.run(FORWARD); // turn it on going forward
delay(10000);
Serial.print("tock");
motor.run(BACKWARD); // the other way
delay(10000);
Serial.print("tack");
motor.run(RELEASE); // stopped
delay(1000);
}
But when motor connected to shield, he does not work, but sometimes it makes a noise. I use the voltmeter to test a voltage. On the shield's ext_pwr 8V, on the unplugged terminals 6v, but when i plug in motors - voltage drops to 0. Why voltage drops when i connect the motor? I tried to connect a new batteries, and increase the number up to 8 pieces(AAx8), but no effect. May be my shield has broken?
Please help me fix this trouble...