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 super easy to use with almost any brushed DC motor.

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

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.

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.

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.

Motor power pins

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

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

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

Prepare the header strip and Add the breakout board:


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


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



Be sure to solder all pins for reliable electrical contact.

(For tips on soldering, be sure to check out our Guide to Excellent Soldering).

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


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


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!


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

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

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

// Basic sketch for trying out the Adafruit DRV8871 Breakout

#define MOTOR_IN1 9
#define MOTOR_IN2 10

void setup() {

  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);

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

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

  // backward full speed for one second

  // ramp down backward
  for (int i=255; i>=0; i--) {
    analogWrite(MOTOR_IN1, i);


Fabrication Print

Dimensions in Inches

This guide was first published on Jul 06, 2016. It was last updated on Mar 08, 2024.