V2 Motor Shields
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 8
- Joined: Sat Sep 14, 2013 11:17 am
V2 Motor Shields
I have two version 2 arduino motor shields that do not show any voltage at any of the motor terminals. This is my first time soldering a shield. I tested terminal 1,2,3 and 4. I tried powering through the arduino using a 9V 1000amp barrel plug and using the jumper. I also used this same power source to the power terminals without the jumper and put USB power to the Arduino. I also used the same procedure using 5 AA batteries. In all cases there was no power detected at the motor terminals. I tested this with a volt meter. The power terminals did show voltage through the screws and I got a good power measurement when I flipped the board over and tested the terminal stubs. Maybe I soldered badly on both boards? Hopefully the pictures are close enough to see.
- Attachments
-
- IMG_9674.JPG (241.29 KiB) Viewed 331 times
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: V2 Motor Shields
Don't see any obvious soldering issues. Post the code you are using.
-
- Posts: 8
- Joined: Sat Sep 14, 2013 11:17 am
Re: V2 Motor Shields
I downloaded this code from: http://learn.adafruit.com/adafruit-moto ... l-software. I do get voltage across two of the capacitors on the board. The serial monitor does indicate that the code is running.
Code: Select all
// Adafruit Motor shield library
// copyright Adafruit Industries LLC, 2009
// this code is public domain, enjoy!
#include <AFMotor.h>
AF_DCMotor motor(4);
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Motor test!");
// turn on motor
motor.setSpeed(200);
motor.run(RELEASE);
}
void loop() {
uint8_t i;
Serial.print("tick");
motor.run(FORWARD);
for (i=0; i<255; i++) {
motor.setSpeed(i);
delay(10);
}
for (i=255; i!=0; i--) {
motor.setSpeed(i);
delay(10);
}
Serial.print("tock");
motor.run(BACKWARD);
for (i=0; i<255; i++) {
motor.setSpeed(i);
delay(10);
}
for (i=255; i!=0; i--) {
motor.setSpeed(i);
delay(10);
}
Serial.print("tech");
motor.run(RELEASE);
delay(1000);
}
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: V2 Motor Shields
That is the code for the V1 shield. It will not work with the V2 shield.
You need to install the library linked in the V2 tutorial: http://learn.adafruit.com/adafruit-moto ... l-software
You need to install the library linked in the V2 tutorial: http://learn.adafruit.com/adafruit-moto ... l-software
-
- Posts: 8
- Joined: Sat Sep 14, 2013 11:17 am
Re: V2 Motor Shields
That was the URL I used. The blue button downloads the code i posted. I just downloaded the github code and see that it is different.
- Attachments
-
- Screenshot.png (345.27 KiB) Viewed 302 times
-
- Posts: 8
- Joined: Sat Sep 14, 2013 11:17 am
Re: V2 Motor Shields
That code worked. Thanks Bill. You made my weekend!
-
- Posts: 8
- Joined: Sat Sep 14, 2013 11:17 am
Re: V2 Motor Shields
My mistake. looks like the link is fine. Not sure where I got that code...
Please be positive and constructive with your questions and comments.