Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.

Adafruit Motor Shields & Drivers: Stepper & DC Motor Control

Anyone who’s built a robot, CNC machine, or automated project knows that motor control makes or breaks the design. I’ve burned through my share of cheap driver boards before discovering what a difference quality hardware makes. The Adafruit Motor Shield and their lineup of dedicated DC motor drivers and stepper motor drivers represent the kind of thoughtful engineering that actually survives real-world projects.

This guide covers everything you need to know about selecting and using Adafruit’s motor control products, from the flagship Motor Shield V2 to standalone drivers like the DRV8871 and TB6612 breakouts.

Understanding Motor Driver Fundamentals

Before diving into specific products, let’s establish why motor drivers exist in the first place. Microcontrollers like Arduino output 5V at roughly 40mA per pin. Most DC motors and stepper motors need significantly more current, often at higher voltages. A motor shield or DC motor driver acts as the power amplifier between your logic signals and the motor itself.

The core component in most motor drivers is an H-bridge, a circuit arrangement that allows current to flow through a motor in either direction. This enables bidirectional control, meaning your motor can spin both clockwise and counter-clockwise. Modern H-bridge chips also include protection circuitry against overcurrent, overtemperature, and back-EMF spikes that could damage your electronics.

Why Choose Adafruit Motor Drivers

Having worked with generic Chinese motor driver boards and premium options alike, I can tell you the difference shows up quickly. The Adafruit Motor Shield and their breakout boards offer several advantages over budget alternatives:

Built-in protection circuitry: Flyback diodes, thermal shutdown, and polarity protection come standard. I’ve had generic L298N boards fail spectacularly when motors generated back-EMF during sudden direction changes.

Consistent quality control: Every board gets tested before shipping. That matters when you’re debugging a project and need to trust your hardware.

Comprehensive documentation: The Adafruit Learning System provides detailed tutorials, wiring diagrams, and example code. You’re not guessing at pinouts or register configurations.

Active software support: The libraries receive regular updates and work reliably across Arduino, CircuitPython, and other platforms.

Adafruit Motor Shield V2: The Complete Solution

The Adafruit Motor Shield V2 represents the most versatile option for Arduino-based motor control. It stacks directly onto Arduino Uno, Mega, or Leonardo boards and provides control for multiple motors simultaneously.

Motor Shield V2 Specifications

ParameterSpecification
Motor Driver ICTB6612FNG
DC MotorsUp to 4 (bidirectional)
Stepper MotorsUp to 2 (bipolar/unipolar)
Current per Channel1.2A continuous, 3A peak (20ms)
Motor Voltage4.5V – 13.5V
Logic Voltage3.3V or 5V (jumper selectable)
CommunicationI2C (address 0x60 default)
Servo Connections2 (pins 9 and 10)
StackableYes, up to 32 shields

The V2 shield marked a significant upgrade from the original. Instead of the L293D Darlington driver, Adafruit switched to the TB6612 MOSFET-based driver. The practical difference is substantial: lower voltage drop across the driver means more of your battery power reaches the motor. You get better torque and longer runtime from the same power source.

Why I2C Communication Matters

One design decision that sets the Motor Shield V2 apart is its use of I2C for motor control. Rather than consuming Arduino PWM pins directly, the shield includes a PCA9685 PWM driver chip that handles all the timing over the I2C bus.

This approach provides several benefits:

Pin efficiency: Only SDA and SCL are used, leaving other pins free for sensors and other peripherals.

Stacking capability: Multiple shields can share the I2C bus with different addresses, allowing control of 64 steppers or 128 DC motors from a single Arduino.

12-bit PWM resolution: The PCA9685 provides finer speed control than the 8-bit PWM on most Arduino boards.

Setting Up the Adafruit Motor Shield V2

Getting started requires installing the Adafruit Motor Shield V2 library through the Arduino Library Manager. Search for “Adafruit Motor Shield” and install the package.

Basic DC motor control looks like this:

cpp

#include <Adafruit_MotorShield.h>Adafruit_MotorShield AFMS = Adafruit_MotorShield();Adafruit_DCMotor *motor1 = AFMS.getMotor(1);void setup() {  AFMS.begin();  motor1->setSpeed(150);}void loop() {  motor1->run(FORWARD);  delay(1000);  motor1->run(BACKWARD);  delay(1000);  motor1->run(RELEASE);  delay(500);}

For stepper motor control, the library supports single-step, double-step, interleave, and microstepping modes:

cpp

#include <Adafruit_MotorShield.h>Adafruit_MotorShield AFMS = Adafruit_MotorShield();Adafruit_StepperMotor *stepper = AFMS.getStepper(200, 2);void setup() {  AFMS.begin();  stepper->setSpeed(30);  // 30 RPM}void loop() {  stepper->step(100, FORWARD, DOUBLE);  stepper->step(100, BACKWARD, DOUBLE);}

TB6612 Breakout Board: Compact Motor Control

When you don’t need a full shield or want more flexibility in your layout, the Adafruit TB6612 breakout board offers the same driver chip in a breadboard-friendly format.

TB6612 Specifications

ParameterSpecification
Driver ICTB6612FNG
Channels2 H-bridges
Output Current1.2A continuous, 3A peak
Motor Voltage4.5V – 13.5V
Logic Voltage2.7V – 5.5V
Control Inputs2 per channel + PWM
ProtectionBuilt-in kickback diodes, polarity FET

The TB6612 excels at driving two DC motors bidirectionally or one bipolar stepper motor. Each H-bridge has two direction control pins (AIN1/AIN2 or BIN1/BIN2) plus a dedicated PWM input for speed control. A standby pin lets you disable both motors quickly.

What I particularly appreciate about this chip is the internal flyback diode protection. When a motor stops suddenly, the collapsing magnetic field generates voltage spikes that can destroy driver circuitry. The TB6612 handles this internally, so you don’t need external diodes cluttering your board.

TB6612 Wiring for Stepper Motors

For a bipolar stepper motor with 200 steps per revolution:

TB6612          Stepper Motor——-         ————-AOUT1    –>    Coil A (wire 1)AOUT2    –>    Coil A (wire 2)BOUT1    –>    Coil B (wire 1)BOUT2    –>    Coil B (wire 2)TB6612          Arduino——-         ——-AIN1     –>    Digital 4AIN2     –>    Digital 5BIN1     –>    Digital 6BIN2     –>    Digital 7PWMA     –>    5V (or PWM pin)PWMB     –>    5V (or PWM pin)STBY     –>    5VVCC      –>    5VVMOT     –>    12V motor supplyGND      –>    Common ground

The Arduino Stepper library works directly with this configuration:

cpp

#include <Stepper.h>#define STEPS 200Stepper stepper(STEPS, 4, 5, 6, 7);void setup() {  stepper.setSpeed(60);  // 60 RPM}void loop() {  stepper.step(STEPS);    // One revolution forward  stepper.step(-STEPS);   // One revolution backward}

DRV8871 Driver: High-Power DC Motor Control

For projects requiring more current than the TB6612 can deliver, the Adafruit DRV8871 breakout provides serious muscle. This Texas Instruments chip targets brushed DC motors that need up to 3.6A continuous current.

DRV8871 Specifications

ParameterSpecification
Driver ICDRV8871
Output Current3.6A continuous
Motor Voltage6.5V – 45V
Logic VoltageUp to 5.5V
Control Inputs2 (IN1, IN2)
Current LimitingAdjustable via resistor
PWM FrequencyUp to 200kHz
ProtectionOvercurrent, thermal shutdown

The DRV8871 differs from the TB6612 in several important ways. First, it’s a single H-bridge rather than dual, so you control one motor per board. Second, the voltage range extends much higher (45V vs 13.5V), making it suitable for larger motors. Third, it includes adjustable current limiting through an external resistor.

Current Limiting on the DRV8871

The board ships with a 30kΩ resistor setting approximately 2A current limit. You can calculate the limit using:

I_limit = (K_ILIM × V_REF) / R_ILIMWhere:K_ILIM = 128,500V_REF = 1.285VR_ILIM = Your resistor value

For a 30kΩ resistor:

I_limit = (128,500 × 1.285) / 30,000 ≈ 5.5A (internal limit caps at 3.6A)

To increase current, lower the resistance. To protect smaller motors, increase resistance.

DRV8871 Arduino Example

Control is straightforward with just two pins:

cpp

#define MOTOR_IN1 9#define MOTOR_IN2 10void setup() {  pinMode(MOTOR_IN1, OUTPUT);  pinMode(MOTOR_IN2, OUTPUT);}void loop() {  // Forward at variable speed  digitalWrite(MOTOR_IN1, LOW);  for (int i = 0; i < 255; i++) {    analogWrite(MOTOR_IN2, i);    delay(10);  }    // Brake  digitalWrite(MOTOR_IN1, LOW);  digitalWrite(MOTOR_IN2, LOW);  delay(500);    // Reverse at variable speed  digitalWrite(MOTOR_IN2, LOW);  for (int i = 0; i < 255; i++) {    analogWrite(MOTOR_IN1, i);    delay(10);  }    // Coast  digitalWrite(MOTOR_IN1, LOW);  digitalWrite(MOTOR_IN2, LOW);  delay(500);}

Motor FeatherWing: Portable Motor Control

For Feather-based projects, the Adafruit Motor FeatherWing brings the same capabilities as the Motor Shield V2 in a compact form factor. It stacks onto any Feather board using I2C communication.

Motor FeatherWing Specifications

ParameterSpecification
Motor DriverTB6612FNG
DC MotorsUp to 4
Stepper MotorsUp to 2
Current per Channel1.2A continuous, 3A peak
Motor Voltage4.5V – 13.5V
CommunicationI2C
StackableYes, 32 addresses available
Dimensions50.8mm × 22.9mm

The FeatherWing uses the same Adafruit Motor Shield library, so code written for the full-size shield works without modification. This makes it easy to prototype on an Uno with the shield, then migrate to a Feather for a more compact final design.

Note that unlike the Motor Shield V2, the FeatherWing doesn’t include servo connections. If you need servo control, add the separate 8-Channel Servo FeatherWing.

Comparing Adafruit Motor Driver Options

Selecting the right driver depends on your specific motor requirements:

DriverBest ForMotorsMax CurrentVoltage RangeForm Factor
Motor Shield V2Multi-motor Arduino projects4 DC or 2 stepper1.2A/channel4.5-13.5VArduino shield
TB6612 BreakoutBreadboard prototyping2 DC or 1 stepper1.2A/channel4.5-13.5VBreakout board
DRV8871High-current single motor1 DC3.6A6.5-45VBreakout board
Motor FeatherWingPortable Feather projects4 DC or 2 stepper1.2A/channel4.5-13.5VFeatherWing

When to Use Each Option

Motor Shield V2: Choose this when building robots or CNC machines with Arduino as the controller. The ability to drive four DC motors or two steppers from a single shield covers most wheeled robot and 2-axis positioning applications.

TB6612 Breakout: Use this for custom PCB designs or when you need the driver separate from the microcontroller. It’s also ideal for projects where the motor electronics need physical separation from the logic board.

DRV8871: Select this for high-torque DC motors, windshield wiper motors, or anything else that draws more than 1.2A continuous. The high voltage range also suits 24V or 36V motor systems common in industrial applications.

Motor FeatherWing: Perfect for battery-powered mobile robots using Feather boards. The compact size and LiPo charging capability of Feathers makes for tidy portable designs.

Stepper Motor Driver Stepping Modes Explained

The Adafruit libraries support four stepping modes, each with different characteristics:

ModeTorqueSpeedSmoothnessPower Usage
SingleLowFastRoughLow
DoubleHighFastRoughHigh
InterleaveMediumHalf speedSmoothMedium
MicrostepMediumSlowVery smoothMedium

Single stepping energizes one coil at a time. It uses the least power but provides the lowest torque and can feel “coggy” at low speeds.

Double stepping energizes both coils simultaneously, doubling the torque but also doubling power consumption. Good for applications where holding torque matters.

Interleave alternates between single and double stepping, effectively doubling the resolution. A 200-step motor becomes 400 steps per revolution, but maximum speed drops by half.

Microstepping uses PWM to create intermediate current levels in the coils, producing very smooth motion. The Motor Shield V2 supports 8x microstepping, turning a 200-step motor into 1600 microsteps per revolution. However, the torque between microsteps is reduced compared to full steps.

Power Supply Considerations for Motor Drivers

Motor power supply design trips up many beginners. Here are the key principles:

Separate Logic and Motor Power

The Adafruit Motor Shield and most Adafruit drivers support separate power supplies for logic and motors. This is the recommended configuration because:

  1. Motors create electrical noise that can reset microcontrollers
  2. Motor current spikes can cause brownouts that corrupt program execution
  3. Different voltage requirements are easier to meet with separate supplies

On the Motor Shield V2, remove the VIN jumper to enable split supply mode. Power the Arduino through USB or its DC jack, and connect motor power to the shield’s power terminal.

Sizing Your Motor Power Supply

Your power supply must handle peak current, not just average current. When motors start or reverse direction, current can spike to 5-10x the running current. A motor rated at 500mA might need a supply capable of 2A or more.

Battery packs work well for motors because they can deliver high peak currents. For benchtop testing, use a supply rated for at least 2x your expected maximum current.

Avoid These Common Mistakes

Never use a 9V battery for motors. Despite the voltage, 9V batteries can only supply about 500mA and will drain within minutes under motor load.

Don’t connect motor voltage to Arduino 5V. This bypasses voltage regulation and protection circuitry, risking permanent damage.

Don’t disconnect motors while the driver is powered. The sudden open circuit can cause voltage spikes that damage the driver IC. Always power down before changing motor connections.

Troubleshooting Motor Driver Issues

After years of building motor-driven projects, these are the problems I see most often:

Motors Don’t Run

Check the power LED. On Adafruit shields and breakouts, a green LED indicates motor power is present. If it’s not lit, your motor supply isn’t reaching the driver.

Verify motor voltage. The TB6612 needs at least 4.5V to operate. Lower voltages may light the LED but won’t actually drive motors.

Check I2C address conflicts. If using the Motor Shield with other I2C devices, ensure nothing else uses address 0x60 or 0x70.

Motors Run in Wrong Direction

This isn’t really a problem. Simply swap the two motor wires at the terminal block, or change FORWARD to BACKWARD in your code.

Stepper Motor Vibrates But Doesn’t Turn

Wiring order matters for steppers. Unlike DC motors, stepper coils must connect in the correct sequence. Check your motor’s datasheet for the coil arrangement.

Reduce speed. Steppers have a maximum speed determined by their inductance and your supply voltage. Starting too fast causes missed steps and vibration.

Driver Gets Very Hot

Check current draw. If your motor draws more than the driver’s rated continuous current, heat buildup is expected. Add heatsinks or choose a higher-rated driver.

Verify motor voltage. Overvoltage causes excessive current flow and heating. Match your supply to the motor’s rated voltage.

Essential Resources and Downloads

Official Documentation and Libraries

ResourceURL
Motor Shield V2 Guidehttps://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino
TB6612 Breakout Guidehttps://learn.adafruit.com/adafruit-tb6612-h-bridge-dc-stepper-motor-driver-breakout
DRV8871 Breakout Guidehttps://learn.adafruit.com/adafruit-drv8871-brushed-dc-motor-driver-breakout
Motor FeatherWing Guidehttps://learn.adafruit.com/adafruit-stepper-dc-motor-featherwing
Motor Shield V2 LibraryArduino Library Manager: “Adafruit Motor Shield V2”
AccelStepper LibraryArduino Library Manager: “AccelStepper”

Datasheets

ComponentDatasheet
TB6612FNGhttps://www.sparkfun.com/datasheets/Robotics/TB6612FNG.pdf
DRV8871https://www.ti.com/lit/ds/symlink/drv8871.pdf
PCA9685https://www.nxp.com/docs/en/data-sheet/PCA9685.pdf

GitHub Repositories

RepositoryContents
Adafruit Motor Shield V2 Libraryhttps://github.com/adafruit/Adafruit_Motor_Shield_V2_Library
Adafruit Motor Shield V2 PCB Fileshttps://github.com/adafruit/Adafruit-Motor-Shield-v2-PCB
TB6612 Fritzing Objecthttps://github.com/adafruit/Fritzing-Library

Frequently Asked Questions

Can the Adafruit Motor Shield V2 drive NEMA 17 stepper motors?

Yes, but with limitations. NEMA 17 refers only to the frame size (1.7 inches square), not electrical specifications. The Motor Shield V2 can drive NEMA 17 motors rated at 1.2A or less per phase. Many common NEMA 17 motors draw 1.5A-2A, which exceeds the TB6612’s continuous rating. For higher-current steppers, consider dedicated stepper motor drivers like the A4988 or DRV8825 that include current limiting.

What’s the difference between the TB6612 and DRV8871?

The TB6612 contains two H-bridges for driving two motors or one stepper, with 1.2A continuous current capacity and a maximum motor voltage of 13.5V. The DRV8871 has a single H-bridge but handles 3.6A continuous and motor voltages up to 45V. Choose the TB6612 for multiple small motors, the DRV8871 for single high-power motors.

Can I stack multiple Motor Shield V2 boards?

Yes, the Motor Shield V2 supports stacking up to 32 shields using I2C address selection. Each shield has 5 address jumper pads allowing addresses from 0x60 to 0x7F. Solder the appropriate address pads on each shield, then instantiate multiple Adafruit_MotorShield objects with different addresses in your code.

Why do my motors run slower than expected with the Motor Shield?

The TB6612 driver has a voltage drop of approximately 0.5V-1V. If you’re powering motors at 6V, they effectively receive 5V-5.5V. This matters more at lower voltages. Additionally, the shield’s PWM frequency (1.6kHz default) may not be optimal for all motors. You can change the frequency using AFMS.begin(1600) for different values.

Do I need external flyback diodes with Adafruit motor drivers?

No. Both the TB6612 and DRV8871 include internal protection diodes for handling back-EMF from motor coils. The older L293D-based Motor Shield V1 required external diodes, but all current Adafruit motor products have this protection built-in.

Final Thoughts on Motor Control

Choosing the right motor driver comes down to matching the driver’s capabilities to your motor’s requirements. The Adafruit Motor Shield V2 handles most hobby robotics applications with its four DC motor channels or two stepper channels. When you need more current or higher voltage, step up to the DRV8871. For compact designs, the TB6612 breakout or Motor FeatherWing deliver the same performance in smaller packages.

What I appreciate most about Adafruit’s motor control products is the attention to protection circuitry. In my experience, motor projects involve a lot of trial and error, accidental shorts, and current spikes. Having drivers that survive these learning moments makes development far less frustrating than working with bare H-bridge ICs.

Start with the Motor Shield V2 if you’re new to motor control. The comprehensive documentation and example code will get you running quickly. As your projects grow more demanding, the skills transfer directly to the standalone drivers.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.

  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.

Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.