Hello Again!
Becoming my favorite web page!
So I purchase two gear motors and they finally arrived this weekend connecting them to the 9v 1A adapter that comes with the Arduino I get constant power in reverse and forward. then I load the DCmotor test example that populates after the Motor shield library is loaded.
I have a green light on the motor shield when the same 9v I used to test the motor prior and the shield is stacked to the Arduino. the serial monitor display "tick tock" continuously but the motor fails to respond. I have tried multiple ports and changing the code to match but I cant seen to get the power to go from the "motor power" in of the shield to the motor.
HELP!!
Motor Shield V2
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Motor Shield V2
What are the electrical specifications of the motor you are using?
-
- Posts: 16
- Joined: Fri Jul 25, 2014 9:58 pm
Re: Motor Shield V2
12v no amperage listed gear motor
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Motor Shield V2
Most listings for that model number (ZYTD520) specify 0.16A "no load". Not a particularly useful spec (what is the point of a motor with no load) But it is sufficiently low that we are not likely to be running into current limitations on the shield.
Load the following sketch, and measure the voltage on the 4 motor terminals. It should alternate between +9v and -9v.
Also, a closer photo showing your soldering on the shield would be helpful.
Load the following sketch, and measure the voltage on the 4 motor terminals. It should alternate between +9v and -9v.
Also, a closer photo showing your soldering on the shield would be helpful.
Code: Select all
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_PWMServoDriver.h"
// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
// Or, create it with a different I2C address (say for stacking)
// Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61);
// Select which 'port' M1, M2, M3 or M4. In this case, M1
Adafruit_DCMotor *myMotor1 = AFMS.getMotor(1);
Adafruit_DCMotor *myMotor2 = AFMS.getMotor(2);
Adafruit_DCMotor *myMotor3 = AFMS.getMotor(3);
Adafruit_DCMotor *myMotor4 = AFMS.getMotor(4);
// You can also make another motor on port M2
//Adafruit_DCMotor *myOtherMotor = AFMS.getMotor(2);
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Adafruit Motorshield v2 - DC Motor test!");
AFMS.begin(); // create with the default frequency 1.6KHz
//AFMS.begin(1000); // OR with a different frequency, say 1KHz
myMotor1->setSpeed(255);
myMotor2->setSpeed(255);
myMotor3->setSpeed(255);
myMotor4->setSpeed(255);
}
void loop()
{
myMotor1->run(FORWARD);
myMotor2->run(FORWARD);
myMotor3->run(FORWARD);
myMotor4->run(FORWARD);
delay(1000);
myMotor1->run(RELEASE);
myMotor2->run(RELEASE);
myMotor3->run(RELEASE);
myMotor4->run(RELEASE);
delay(500);
myMotor1->run(BACKWARD);
myMotor2->run(BACKWARD);
myMotor3->run(BACKWARD);
myMotor4->run(BACKWARD);
delay(1000);
myMotor1->run(RELEASE);
myMotor2->run(RELEASE);
myMotor3->run(RELEASE);
myMotor4->run(RELEASE);
delay(500);
}
-
- Posts: 16
- Joined: Fri Jul 25, 2014 9:58 pm
Re: Motor Shield V2
ok uploaded code. I am not getting power passed thru the board. none of the port have any voltage change while program is running.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Motor Shield V2
Very strange. I don't see any problems with the board assembly. If you contact [email protected] with a link to this thread, we can send out a replacement.
Please be positive and constructive with your questions and comments.