DRV8871 Brushed DC Motor Driver Breakout Not Working

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jbettis
 
Posts: 8
Joined: Thu May 13, 2021 1:29 pm

DRV8871 Brushed DC Motor Driver Breakout Not Working

Post by jbettis »

I recently purchased the DRV8871 DC Motor Driver board, but when I went to use it, it did not appear to be working.

This is the code I used (which I got from https://learn.adafruit.com/adafruit-drv ... kout/usage):

Code: Select all

// Basic sketch for trying out the Adafruit DRV8871 Breakout

#define MOTOR_IN1 9
#define MOTOR_IN2 10

void setup() {
  Serial.begin(9600);

  Serial.println("DRV8871 test");
  
  pinMode(MOTOR_IN1, OUTPUT);
  pinMode(MOTOR_IN2, OUTPUT);
}

void loop() {

  // ramp up forward
  digitalWrite(MOTOR_IN1, LOW);
  for (int i=0; i<255; i++) {
    analogWrite(MOTOR_IN2, i);
    delay(10);
  }

  // forward full speed for one second
  delay(1000);
  
  // ramp down forward
  for (int i=255; i>=0; i--) {
    analogWrite(MOTOR_IN2, i);
    delay(10);
  }

  // ramp up backward
  digitalWrite(MOTOR_IN2, LOW);
  for (int i=0; i<255; i++) {
    analogWrite(MOTOR_IN1, i);
    delay(10);
  }

  // backward full speed for one second
  delay(1000);

  // ramp down backward
  for (int i=255; i>=0; i--) {
    analogWrite(MOTOR_IN1, i);
    delay(10);
  }
}
Using a multimeter, I watched the voltages on both of the input pins, and saw them ramping up and down as expected. I also checked the voltage across the power pins, which I saw had about 5V across them. However, there was no voltage across the motor, which was not spinning. The Arduino used is the Arduino Uno.

Is the motor driver defective, or am I doing something wrong?

This is a picture of the wiring:
Wiring:
Wiring:
IMG_20210513_113252923 (1) (1).jpg (115.92 KiB) Viewed 730 times

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

Re: DRV8871 Brushed DC Motor Driver Breakout Not Working

Post by adafruit_support_bill »

What were you using to power the UNO?

User avatar
jbettis
 
Posts: 8
Joined: Thu May 13, 2021 1:29 pm

Re: DRV8871 Brushed DC Motor Driver Breakout Not Working

Post by jbettis »

I had it plugged into my laptop.

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

Re: DRV8871 Brushed DC Motor Driver Breakout Not Working

Post by adafruit_support_bill »

When powered via the USB jack, the only current available on the VIN pin is what ever leaks backwards through the voltage regulator. Move your red VM jumper to the 5v pin to get full USB power.

User avatar
jbettis
 
Posts: 8
Joined: Thu May 13, 2021 1:29 pm

Re: DRV8871 Brushed DC Motor Driver Breakout Not Working

Post by jbettis »

I tried that. It still didn't work.

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

Re: DRV8871 Brushed DC Motor Driver Breakout Not Working

Post by adafruit_support_bill »

Please post some photos showing your soldering on the board.

User avatar
jbettis
 
Posts: 8
Joined: Thu May 13, 2021 1:29 pm

Re: DRV8871 Brushed DC Motor Driver Breakout Not Working

Post by jbettis »

Here are some photos of the soldering. None of the pins are visibly soldered together.
IMG_20210513_133543085 (1).jpg
IMG_20210513_133543085 (1).jpg (332.67 KiB) Viewed 725 times
IMG_20210513_133511348 (1).jpg
IMG_20210513_133511348 (1).jpg (332.7 KiB) Viewed 725 times
IMG_20210513_133427177 (1).jpg
IMG_20210513_133427177 (1).jpg (373.16 KiB) Viewed 725 times

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

Re: DRV8871 Brushed DC Motor Driver Breakout Not Working

Post by adafruit_support_bill »

That all looks good. We can try replacing the board. Please contact [email protected] with a link to this thread.

User avatar
bucc5062
 
Posts: 7
Joined: Sat Jul 17, 2021 8:15 pm

Re: DRV8871 Brushed DC Motor Driver Breakout Not Working

Post by bucc5062 »

I had the same issue where I soldered the board clean (had it checked by someone who knows), wired it up and yet I dwid not see any voltage change when I ran the same program. I also checked that the board was getting power from the arduino (5V), but nothing on the motor side.

I will try another (I bought two), but I am wondering if I'm still not doing something right.

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

Return to “Other Arduino products from Adafruit”