Motor Shield V2.3 not working with DC Motor

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
emarie121
 
Posts: 4
Joined: Tue Oct 12, 2021 2:41 pm

Motor Shield V2.3 not working with DC Motor

Post by emarie121 »

I have been trying to use the example code to run a robotzone planetary gear DC motor. The motor is able to run when directly connected to a supply and the serial monitor shows the correct serial.println()'s but power is not being supplied to the motor no matter which motor port I have it connected to (I checked with a voltmeter). I did not solder the ports myself, only the headers. Are there any ideas on what could be going wrong?

Code: Select all

/*
This is a test sketch for the Adafruit assembled Motor Shield for Arduino v2
It won't work with v1.x motor shields! Only for the v2's with built in PWM
control

For use with the Adafruit Motor Shield v2
---->	http://www.adafruit.com/products/1438
*/

#include <Adafruit_MotorShield.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 *myMotor = AFMS.getMotor(1);
// You can also make another motor on port M2
//Adafruit_DCMotor *myOtherMotor = AFMS.getMotor();

void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Adafruit Motorshield v2 - DC Motor test!");
  
  if (AFMS.begin()) {         // create with the default frequency 1.6KHz
  // if (!AFMS.begin(1000)) {  // OR with a different frequency, say 1KHz
    Serial.println("Could not find Motor Shield. Check wiring.");
    while (1);
  }
  Serial.println("Motor Shield found.");

  // Set the speed to start, from 0 (off) to 255 (max speed)
  myMotor->setSpeed(255);
  myMotor->run(FORWARD);
  delay(3000);
  // turn on motor
 // myMotor->run(RELEASE);
}

void loop() {
  uint8_t i;

  Serial.print("tick\n");

  myMotor->run(FORWARD);
  for (i=0; i<255; i++) {
    myMotor->setSpeed(i);
    delay(10);
  }
  for (i=255; i!=0; i--) {
    myMotor->setSpeed(i);
    delay(10);
  }

  Serial.print("tock\n");

  myMotor->run(BACKWARD);
  for (i=0; i<255; i++) {
    myMotor->setSpeed(i);
    delay(10);
  }
  for (i=255; i!=0; i--) {
    myMotor->setSpeed(i);
    delay(10);
  }

  Serial.print("tech\n");
  myMotor->run(RELEASE);
  delay(10);
}
Attachments
20211012_143345.jpg
20211012_143345.jpg (174.9 KiB) Viewed 925 times
20211012_143723.jpg
20211012_143723.jpg (254.75 KiB) Viewed 925 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Motor Shield V2.3 not working with DC Motor

Post by adafruit_support_bill »

Please post a link to the specs for the motor.

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: Motor Shield V2.3 not working with DC Motor

Post by dastels »

It's hard to tell from the angle of the photo, but make sure you don't have the VIN jumper installed when using a separate power supply (the batteries) for the motors.

Have you measured the power at the power connector (i.e. is it getting power from the batteries)?

Dave

User avatar
emarie121
 
Posts: 4
Joined: Tue Oct 12, 2021 2:41 pm

Re: Motor Shield V2.3 not working with DC Motor

Post by emarie121 »

There is nothing on the VIN jumper that I can take off. I can touch an led to the top of the power connector and it turns on. This is not true for the motor connectors. The specs of the motor are attached. Thank you!
Attachments
116_rpm_precision_planetary_gearmotor_-_specifications.pdf
(670.42 KiB) Downloaded 16 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Motor Shield V2.3 not working with DC Motor

Post by adafruit_support_bill »

Motor startup current is essentially the same as the stall current until the rotor starts moving. That motor has a stall current of 4.9A which is considerably more than the 3A peak rating of the drivers on the shield. It is very possible that the driver is burned out.

Try your LED test (without the motor) on some of the other motor channels. The damage might be limited to the M1 channel.

User avatar
emarie121
 
Posts: 4
Joined: Tue Oct 12, 2021 2:41 pm

Re: Motor Shield V2.3 not working with DC Motor

Post by emarie121 »

I believe both drivers have been burnt out, none of the connections lit up the LED. Am I correct in thinking I need to buy a new shield?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Motor Shield V2.3 not working with DC Motor

Post by adafruit_support_bill »

A new shield would end up the same way. The DRV8871 would be a better match for that motor: https://www.adafruit.com/product/3190

User avatar
emarie121
 
Posts: 4
Joined: Tue Oct 12, 2021 2:41 pm

Re: Motor Shield V2.3 not working with DC Motor

Post by emarie121 »

Just to confirm, do I need to buy both a new shield and driver, or can I bypass the burnt-out driver with two of the DRV8871's? Thank you for explaining!

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Motor Shield V2.3 not working with DC Motor

Post by adafruit_support_bill »

The DRV8871 is a standalone single-channel motor driver. It is not compatible with the shield or the shield library. You control it with 2 GPIO pins (PWM capable if you need speed control).

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”