# Adafruit DRV8871 Brushed DC Motor Driver Breakout

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/033/651/medium800/adafruit_products_3190_iso_ORIG.jpg?1467826217)

Crank up your robotics with powerful&nbsp; **Adafruit DRV8871** motor driver breakout board. This motor driver has a lot of great specs that make it useful for a wide variety of mechatronics. In particular, the simple resistor-set current limiting and auto-magic PWM support make it super easy to use with almost any brushed DC motor.

![](https://cdn-learn.adafruit.com/assets/assets/000/033/653/medium800/adafruit_products_3190_top_ORIG.jpg?1467826527)

Check out the specs for the DRV8871:

- 6.5V to 45V motor power voltage
- Up to 5.5V logic level on IN pins
- 565mΩ Typical RDS(on) (high + low)
- 3.6A peak current
- PWM control
- Current limiting/regulation without an inline sense resistor
- Undervoltage lockout
- Overcurrent protection
- Thermal shutdown

![](https://cdn-learn.adafruit.com/assets/assets/000/033/652/medium800/adafruit_products_3190_top_demo_ORIG.jpg?1467826450)

Using it is super simple. Connect your motor to the **OUT** terminal block. Power the board with 6.5-45VDC power on **VMotor** and provide the H-bridge input control on **IN1** and **IN2**. You can even PWM the inputs and the driver chip will do the right thing.

![](https://cdn-learn.adafruit.com/assets/assets/000/033/655/medium800/adafruit_products_3190_quarter_ORIG.jpg?1467826631)

You can set the current limiting with an external resistor **Rlim**. We solder in a 30K resistor by default for a ~2A current limit, however you can remove this resistor and/or solder a resistor over it to change the resistance and change the limit.

![](https://cdn-learn.adafruit.com/assets/assets/000/033/656/medium800/adafruit_products_3190_kit_ORIG.jpg?1467826789)

Each order comes with one fully assembled and tested motor driver breakout, two 2-pin terminal blocks and a small strip of header. Some light soldering is required to attach the header and terminal blocks but its a simple task that can be done with basic soldering equipment.

# Adafruit DRV8871 Brushed DC Motor Driver Breakout

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/033/659/medium800/adafruit_products_pinout.jpg?1467827336)

# Motor power pins
![](https://cdn-learn.adafruit.com/assets/assets/000/033/660/medium800/adafruit_products_motorpower.jpg?1467827343)

These two sets of pads are connected internally so you can use breadboard or terminal blocks to provide motor power. Use 6.5V-45VDC to power the motor and the chip. This isn't the same as the logic level of the chip, which is up to 5.5 VDC. You do not have to provide a logic level power supply to the chip, how nice is that?

# Motor Input Pins
![](https://cdn-learn.adafruit.com/assets/assets/000/033/661/medium800/adafruit_products_inputs.jpg?1467827463)

These are the inputs to the motor control. IN2 goes to OUT2, IN1 goes to OUT1. Use up to 5.5V DC logic on these pins. You can PWM the inputs up to 200KHz, but lower frequencies will be more efficient.

# Motor Output
![](https://cdn-learn.adafruit.com/assets/assets/000/033/662/medium800/adafruit_products_motorout.jpg?1467827642)

Pretty simple - this is where your motor goes! Works with any DC brushed motor. Use thick wires to avoid dropping voltage across the wire resistance

# Adafruit DRV8871 Brushed DC Motor Driver Breakout

## Assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/033/718/medium800/adafruit_products_3190-01.jpg?1468255258)

## Prepare the header strip and Add the breakout board:

&nbsp;

Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - **long pins down**

&nbsp;

Place the breakout board over the pins so that the short pins poke through the breakout pads

![adafruit_products_1-header.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/751/medium640/adafruit_products_1-header.jpg?1468417946)

![adafruit_products_2-onbreadboard.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/776/medium640/adafruit_products_2-onbreadboard.jpg?1468426910)

## Solder!

&nbsp;

Be sure to solder all pins for reliable electrical contact.  
  
  
_(For tips on soldering, be sure to check out our&nbsp;_[_Guide to Excellent Soldering_](http://learn.adafruit.com/adafruit-guide-excellent-soldering)_)._

![adafruit_products_3-solder-1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/781/medium640/adafruit_products_3-solder-1.jpg?1468427016)

![adafruit_products_3-solder-2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/782/medium640/adafruit_products_3-solder-2.jpg?1468427066)

![adafruit_products_3-solder-3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/783/medium640/adafruit_products_3-solder-3.jpg?1468427093)

![adafruit_products_3-solder-4.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/784/medium640/adafruit_products_3-solder-4.jpg?1468427117)

Next we will solder in the two 3.5mm terminal blocks used to connect power & the motor to the breakout board.&nbsp;

&nbsp;

**Make sure the open parts of the terminals face outwards** so you can easily connect wires

&nbsp;

To make it easier to keep these in place, you can use some tape to hold down the two header pieces. Tacky clay also works, whatever you've got handy!

&nbsp;

![adafruit_products_4-terminalplacement.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/785/medium640/adafruit_products_4-terminalplacement.jpg?1468427168)

![adafruit_products_4-terminalplacement-2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/786/medium640/adafruit_products_4-terminalplacement-2.jpg?1468427185)

Solder in both pins of each&nbsp;terminal block. You can remove the tape when done.

![adafruit_products_5-soldering-1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/787/medium640/adafruit_products_5-soldering-1.jpg?1468427208)

![adafruit_products_5-soldering-2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/788/medium640/adafruit_products_5-soldering-2.jpg?1468427233)

![adafruit_products_5-soldering-3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/789/medium640/adafruit_products_5-soldering-3.jpg?1468427252)

![adafruit_products_5-soldering-4.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/791/medium640/adafruit_products_5-soldering-4.jpg?1468427323)

OK You're done!&nbsp;Now you can get your motors spinnin' !&nbsp;

![adafruit_products_6-finished.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/792/medium640/adafruit_products_6-finished.jpg?1468427362)

# Adafruit DRV8871 Brushed DC Motor Driver Breakout

## Usage

Using the motor driver is really easy. Wire up the two input pins to your microcontroller's PWM outputs. We'll be using an Arduino but any microcontroller or microcomputer can be used. If you don't have PWM outputs you can also just use straight logic high and low but you wont get speed control

![](https://cdn-learn.adafruit.com/assets/assets/000/033/663/medium800/adafruit_products_3190_top_demo_ORIG.jpg?1467829880)

```
// 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&lt;255; i++) {
    analogWrite(MOTOR_IN2, i);
    delay(10);
  }

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

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

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

  // ramp down backward
  for (int i=255; i&gt;=0; i--) {
    analogWrite(MOTOR_IN1, i);
    delay(10);
  }
}
```

![](https://cdn-learn.adafruit.com/assets/assets/000/033/664/medium800/adafruit_products_drv8871_bb.png?1467830204)

# Adafruit DRV8871 Brushed DC Motor Driver Breakout

## Download

# Datasheets & Files

- [DRV8871 Datasheet](https://cdn-shop.adafruit.com/product-files/3190/drv8871.pdf)
- [EagleCAD PCB Files on GitHub](https://github.com/adafruit/Adafruit-DRV8871-Breakout-PCB)
- [Fritzing object in our library](https://github.com/adafruit/Fritzing-Library)
- [3D Model on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/3190%20DRV8871%20Breakout)

# Schematic
![](https://cdn-learn.adafruit.com/assets/assets/000/033/665/medium800/adafruit_products_schem.png?1467833194)

# Fabrication Print

Dimensions in Inches

![](https://cdn-learn.adafruit.com/assets/assets/000/033/666/medium800/adafruit_products_fapbirnt.png?1467833220)

# 3D Model
![](https://cdn-learn.adafruit.com/assets/assets/000/133/121/medium800/adafruit_products_3190_DRV8871_Breakout.jpg?1729004841)


## Featured Products

### Adafruit DRV8871 DC Motor Driver Breakout Board - 3.6A Max

[Adafruit DRV8871 DC Motor Driver Breakout Board - 3.6A Max](https://www.adafruit.com/product/3190)
Crank up your robotics with powerful **Adafruit DRV8871 motor driver breakout board**. This motor driver has a lot of great specs that make it useful for a wide variety of mechatronics. In particular, the simple resistor-set current limiting and auto-magic PWM support make it...

In Stock
[Buy Now](https://www.adafruit.com/product/3190)
[Related Guides to the Product](https://learn.adafruit.com/products/3190/guides)
### DC Toy / Hobby Motor - 130 Size

[DC Toy / Hobby Motor - 130 Size](https://www.adafruit.com/product/711)
These are standard '130 size' DC hobby motors. They come with a wider operating range than most toy motors: from 4.5 to 9VDC instead of 1.5-4.5V. This range makes them perfect for controlling with an Adafruit Motor Shield, or with an Arduino where you are more likely to have 5 or 9V...

Out of Stock
[Buy Now](https://www.adafruit.com/product/711)
[Related Guides to the Product](https://learn.adafruit.com/products/711/guides)
### DC Motor in Micro Servo Body

[DC Motor in Micro Servo Body](https://www.adafruit.com/product/2941)
This tiny&nbsp; **DC Motor in Micro Servo Body** is an interesting motor - it's the same size and shape as our micro servo but it _isn't_ a servo. It's more like a DC motor + plastic gear-train in a box. It's not a super powerful motor, it would do well as a...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2941)
[Related Guides to the Product](https://learn.adafruit.com/products/2941/guides)

## Related Guides

- [Current Limiting Stepper Driver with DRV8871](https://learn.adafruit.com/current-limiting-stepper-driver-with-drv8871.md)
- [Improve the Low Speed of Brushed DC Motors](https://learn.adafruit.com/improve-low-speed-performance-of-brushed-dc-motors.md)
- [Improve Brushed DC Motor Performance](https://learn.adafruit.com/improve-brushed-dc-motor-performance.md)
- [TIMESQUARE Watch Kit](https://learn.adafruit.com/timesquare-watch-kit.md)
- [DS3231 Precision RTC FeatherWing](https://learn.adafruit.com/ds3231-precision-rtc-featherwing.md)
- [Haunted Air Blaster](https://learn.adafruit.com/automated-air-blaster.md)
- [Adafruit LC709203F LiPoly / LiIon Fuel Gauge and Battery Monitor](https://learn.adafruit.com/adafruit-lc709203f-lipo-lipoly-battery-monitor.md)
- [reef-pi Guide 1: Setup and Demonstration](https://learn.adafruit.com/reef-pi-installation-and-configuration.md)
- [Adafruit HUSB238 USB Type C Power Delivery Breakout](https://learn.adafruit.com/adafruit-husb238-usb-type-c-power-delivery-breakout.md)
- [Tri-Layer Mini Round Robot Chassis Kit](https://learn.adafruit.com/tri-layer-mini-round-robot-chassis-kit.md)
- [FeatherWing Proto, Doubler  and Tripler](https://learn.adafruit.com/featherwing-proto-and-doubler.md)
- [Adafruit Grayscale 1.5" 128x128 OLED Display](https://learn.adafruit.com/adafruit-grayscale-1-5-128x128-oled-display.md)
- [Getting Started with the nRF8001 Bluefruit LE Breakout](https://learn.adafruit.com/getting-started-with-the-nrf8001-bluefruit-le-breakout.md)
- [DIY IoT Doorbell Camera with MEMENTO](https://learn.adafruit.com/diy-iot-doorbell-camera-with-memento.md)
- [Adafruit Sensirion SHTC3 - Temperature & Humidity Sensor Breakout](https://learn.adafruit.com/adafruit-sensirion-shtc3-temperature-humidity-sensor.md)
