Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use DRV8876: Examples, Pinouts, and Specs

Image of DRV8876
Cirkit Designer LogoDesign with DRV8876 in Cirkit Designer

Introduction

The DRV8876, manufactured by Pololu (Part ID: 4036), is a robust dual H-bridge motor driver designed for driving DC motors and stepper motors. It supports a wide range of operating voltages (up to 36V) and features adjustable current limiting, thermal shutdown, and fault reporting. The device is highly versatile, offering multiple control modes, including PWM for precise speed and torque regulation.

Explore Projects Built with DRV8876

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-Powered Wi-Fi Controlled Robotic Car with OLED Display and Ultrasonic Sensor
Image of playbot: A project utilizing DRV8876 in a practical application
This circuit is a battery-powered system featuring an ESP32 microcontroller that controls an OLED display, a motor driver for two hobby motors, an ultrasonic sensor for distance measurement, and a DFPlayer Mini for audio output through a loudspeaker. The TP4056 module manages battery charging, and a step-up boost converter provides a stable 5V supply to the components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Based Camera Interface with OV7670 and TFT LCD Display
Image of iot project: A project utilizing DRV8876 in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an OV7670 camera module and a TFT LCD display (ST7735S). The Arduino is configured to communicate with the camera module to capture image data and with the TFT display to show the captured images. Additionally, an IR sensor is connected to the Arduino for potential object detection or user input, and a resistor is used to provide current limiting for the display's backlight.
Cirkit Designer LogoOpen Project in Cirkit Designer
RTL8720DN-Based Interactive Button-Controlled TFT Display
Image of coba-coba: A project utilizing DRV8876 in a practical application
This circuit features an RTL8720DN microcontroller interfaced with a China ST7735S 160x128 TFT LCD display and four pushbuttons. The microcontroller reads the states of the pushbuttons and displays their statuses on the TFT LCD, providing a visual feedback system for button presses.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO-Based Dual Stepper Motor Controller with Gesture Sensing and RTC Display
Image of Arduino UNO-Based Dual Stepper Motor Controller with Gesture Sensing and RTC Display: A project utilizing DRV8876 in a practical application
This circuit is an Arduino UNO-based dual stepper motor controller that uses ULN2003A driver boards to control two 28BYJ-48 stepper motors. It features an APDS-9960 RGB and gesture sensor for gesture-based control, a DS1307 RTC module to display time on a 16x2 I2C LCD, and includes a green LED and two pushbuttons for additional control and status indication.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with DRV8876

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of playbot: A project utilizing DRV8876 in a practical application
ESP32-Powered Wi-Fi Controlled Robotic Car with OLED Display and Ultrasonic Sensor
This circuit is a battery-powered system featuring an ESP32 microcontroller that controls an OLED display, a motor driver for two hobby motors, an ultrasonic sensor for distance measurement, and a DFPlayer Mini for audio output through a loudspeaker. The TP4056 module manages battery charging, and a step-up boost converter provides a stable 5V supply to the components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of iot project: A project utilizing DRV8876 in a practical application
Arduino UNO Based Camera Interface with OV7670 and TFT LCD Display
This circuit features an Arduino UNO microcontroller interfaced with an OV7670 camera module and a TFT LCD display (ST7735S). The Arduino is configured to communicate with the camera module to capture image data and with the TFT display to show the captured images. Additionally, an IR sensor is connected to the Arduino for potential object detection or user input, and a resistor is used to provide current limiting for the display's backlight.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of coba-coba: A project utilizing DRV8876 in a practical application
RTL8720DN-Based Interactive Button-Controlled TFT Display
This circuit features an RTL8720DN microcontroller interfaced with a China ST7735S 160x128 TFT LCD display and four pushbuttons. The microcontroller reads the states of the pushbuttons and displays their statuses on the TFT LCD, providing a visual feedback system for button presses.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Arduino UNO-Based Dual Stepper Motor Controller with Gesture Sensing and RTC Display: A project utilizing DRV8876 in a practical application
Arduino UNO-Based Dual Stepper Motor Controller with Gesture Sensing and RTC Display
This circuit is an Arduino UNO-based dual stepper motor controller that uses ULN2003A driver boards to control two 28BYJ-48 stepper motors. It features an APDS-9960 RGB and gesture sensor for gesture-based control, a DS1307 RTC module to display time on a 16x2 I2C LCD, and includes a green LED and two pushbuttons for additional control and status indication.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Robotics: Driving DC motors for wheels, arms, or other actuators.
  • Industrial automation: Controlling stepper motors in conveyor belts or CNC machines.
  • Consumer electronics: Motorized systems such as fans, pumps, or toys.
  • Prototyping: Ideal for use with microcontrollers like Arduino for motor control projects.

Technical Specifications

Key Technical Details

Parameter Value
Supply Voltage (VM) 4.5V to 36V
Output Current (per H-bridge) Up to 3.5A (peak), 2A (continuous)
Control Modes PWM, PH/EN, or IN/IN
Current Limiting Adjustable via external resistor
Thermal Shutdown Yes
Fault Reporting Overcurrent, undervoltage, and thermal faults
Operating Temperature Range -40°C to 125°C

Pin Configuration and Descriptions

The DRV8876 is available in a 16-pin HTSSOP package. Below is the pinout and description:

Pin Number Pin Name Description
1 VM Motor power supply (4.5V to 36V). Connect a decoupling capacitor to GND.
2 GND Ground reference for the device.
3 IN1 Input control for H-bridge 1.
4 IN2 Input control for H-bridge 2.
5 nFAULT Fault output (active low). Indicates fault conditions.
6 VREF Reference voltage for current regulation.
7 ISEN Current sense pin. Connect a resistor to set current limit.
8 OUT1 Output terminal for H-bridge 1. Connect to motor terminal.
9 OUT2 Output terminal for H-bridge 2. Connect to motor terminal.
10 OUT3 Output terminal for H-bridge 3. Connect to motor terminal.
11 OUT4 Output terminal for H-bridge 4. Connect to motor terminal.
12 nSLEEP Sleep mode input (active low). Pull high to enable the device.
13 PH/EN Phase/Enable control input (optional, depends on control mode).
14 PWM PWM input for speed control (optional, depends on control mode).
15 VCC Logic power supply (3.3V or 5V).
16 NC No connection. Leave unconnected.

Usage Instructions

Using the DRV8876 in a Circuit

  1. Power Supply: Connect the motor power supply (VM) to the VM pin. Ensure the voltage is within the range of 4.5V to 36V. Add a decoupling capacitor (e.g., 100 µF) between VM and GND to stabilize the supply.
  2. Motor Connections: Connect the motor terminals to the OUT1/OUT2 or OUT3/OUT4 pins, depending on the motor configuration.
  3. Control Inputs:
    • For PWM control, connect the PWM signal to the PWM pin and set the PH/EN pin for direction control.
    • Alternatively, use the IN1/IN2 pins for IN/IN control mode.
  4. Current Limiting: Set the current limit by connecting a resistor between the ISEN pin and GND. Use the formula: [ I_{LIMIT} = \frac{V_{REF}}{R_{ISEN}} ] where ( V_{REF} ) is the reference voltage applied to the VREF pin.
  5. Fault Monitoring: Monitor the nFAULT pin for fault conditions. This pin is active low and can be connected to a microcontroller for fault detection.
  6. Sleep Mode: Pull the nSLEEP pin high to enable the device. Pull it low to put the device into low-power sleep mode.

Example Arduino Code

Below is an example of how to control a DC motor using the DRV8876 with an Arduino UNO in PWM mode:

// Define pin connections
const int pwmPin = 9;    // PWM signal for speed control
const int dirPin = 8;    // Direction control (PH/EN mode)
const int sleepPin = 7;  // Sleep mode control

void setup() {
  // Set pin modes
  pinMode(pwmPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
  pinMode(sleepPin, OUTPUT);

  // Enable the DRV8876
  digitalWrite(sleepPin, HIGH); // Pull nSLEEP high to enable the driver
}

void loop() {
  // Set motor direction
  digitalWrite(dirPin, HIGH); // Set direction (HIGH or LOW)

  // Set motor speed using PWM
  analogWrite(pwmPin, 128); // 50% duty cycle (range: 0-255)

  delay(2000); // Run motor for 2 seconds

  // Stop the motor
  analogWrite(pwmPin, 0); // Set PWM to 0 to stop the motor

  delay(2000); // Wait for 2 seconds before restarting
}

Best Practices

  • Use a heat sink or ensure proper ventilation if operating near the maximum current rating.
  • Add a flyback diode across the motor terminals to protect against voltage spikes.
  • Use a low ESR capacitor on the VM pin to reduce noise and improve stability.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Motor Not Spinning:

    • Ensure the nSLEEP pin is pulled high to enable the device.
    • Verify the motor connections to the OUT pins.
    • Check the power supply voltage and ensure it is within the specified range.
  2. Overheating:

    • Reduce the motor current by adjusting the current limit resistor.
    • Ensure proper heat dissipation with a heat sink or cooling fan.
  3. nFAULT Pin is Low:

    • Check for overcurrent, undervoltage, or thermal shutdown conditions.
    • Verify the motor is not drawing more current than the driver can handle.
  4. PWM Control Not Working:

    • Ensure the PWM frequency is within the recommended range (typically 20 kHz).
    • Verify the PWM signal is connected to the correct pin.

FAQs

Q: Can the DRV8876 drive two DC motors simultaneously?
A: Yes, the DRV8876 has two H-bridges, allowing it to drive two DC motors independently.

Q: What is the maximum PWM frequency supported?
A: The DRV8876 typically supports PWM frequencies up to 100 kHz, but 20 kHz is recommended for optimal performance.

Q: How do I calculate the current limit resistor value?
A: Use the formula ( R_{ISEN} = \frac{V_{REF}}{I_{LIMIT}} ), where ( V_{REF} ) is the reference voltage applied to the VREF pin.

Q: Can I use the DRV8876 with a 3.3V microcontroller?
A: Yes, the DRV8876 is compatible with both 3.3V and 5V logic levels.

By following this documentation, users can effectively integrate the DRV8876 into their motor control projects.