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

How to Use DFRobot Motor Driver: Examples, Pinouts, and Specs

Image of DFRobot Motor Driver
Cirkit Designer LogoDesign with DFRobot Motor Driver in Cirkit Designer

Introduction

The DFRobot Motor Driver, based on the TB6612FNG chip, is a compact and efficient motor driver module designed for controlling DC motors and stepper motors. It supports features such as speed control, direction control, and the ability to drive two motors simultaneously. This module is ideal for robotics, automation, and other motor control applications where precise and reliable operation is required.

Explore Projects Built with DFRobot Motor Driver

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered Line Following Robot with IR Sensors and Cytron URC10 Motor Controller
Image of URC10 SUMO AUTO: A project utilizing DFRobot Motor Driver in a practical application
This circuit is a robotic control system that uses multiple IR sensors for line detection and obstacle avoidance, powered by a 3S LiPo battery. The Cytron URC10 motor driver, controlled by a microcontroller, drives two GM25 DC motors based on input from the sensors and a rocker switch, with a 7-segment panel voltmeter displaying the battery voltage.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Mega 2560 Controlled Robotic Vehicle with Bluetooth Interface and MPU-6050 Sensor Integration
Image of BalancingRobot-V2: A project utilizing DFRobot Motor Driver in a practical application
This is a robotic control circuit featuring an Arduino Mega 2560 microcontroller, which manages two DC motors via an L298N motor driver for motion control. It includes an MPU-6050 sensor for motion tracking and an HC-06 Bluetooth module for wireless communication. The Domino-8 connector facilitates power and signal connections among the components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino-Controlled Dual Motor Driver with IR Sensing
Image of Line follower 14 IR Sensor channel: A project utilizing DFRobot Motor Driver in a practical application
This circuit controls two DC motors using a TB6612FNG motor driver, which is interfaced with an Arduino Mega 2560 microcontroller. The Arduino provides PWM signals to control the speed and direction of the motors. Multiple IR sensors are connected to the Arduino's analog inputs, likely for sensing the environment or for line-following capabilities in a robot.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino-Controlled Robotic Vehicle with Ultrasonic Obstacle Avoidance and Light Sensing
Image of tugas akhir: A project utilizing DFRobot Motor Driver in a practical application
This is a robotic control system featuring an Arduino UNO connected to an L293D motor driver shield for driving DC gearmotors, a servo for actuation, and an ultrasonic sensor for distance sensing. It includes feedback mechanisms such as an LED and piezo speaker, and a photocell for light detection, all powered by a 2x 18650 battery pack with a rocker switch for power management.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with DFRobot Motor Driver

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 URC10 SUMO AUTO: A project utilizing DFRobot Motor Driver in a practical application
Battery-Powered Line Following Robot with IR Sensors and Cytron URC10 Motor Controller
This circuit is a robotic control system that uses multiple IR sensors for line detection and obstacle avoidance, powered by a 3S LiPo battery. The Cytron URC10 motor driver, controlled by a microcontroller, drives two GM25 DC motors based on input from the sensors and a rocker switch, with a 7-segment panel voltmeter displaying the battery voltage.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of BalancingRobot-V2: A project utilizing DFRobot Motor Driver in a practical application
Arduino Mega 2560 Controlled Robotic Vehicle with Bluetooth Interface and MPU-6050 Sensor Integration
This is a robotic control circuit featuring an Arduino Mega 2560 microcontroller, which manages two DC motors via an L298N motor driver for motion control. It includes an MPU-6050 sensor for motion tracking and an HC-06 Bluetooth module for wireless communication. The Domino-8 connector facilitates power and signal connections among the components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Line follower 14 IR Sensor channel: A project utilizing DFRobot Motor Driver in a practical application
Arduino-Controlled Dual Motor Driver with IR Sensing
This circuit controls two DC motors using a TB6612FNG motor driver, which is interfaced with an Arduino Mega 2560 microcontroller. The Arduino provides PWM signals to control the speed and direction of the motors. Multiple IR sensors are connected to the Arduino's analog inputs, likely for sensing the environment or for line-following capabilities in a robot.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of tugas akhir: A project utilizing DFRobot Motor Driver in a practical application
Arduino-Controlled Robotic Vehicle with Ultrasonic Obstacle Avoidance and Light Sensing
This is a robotic control system featuring an Arduino UNO connected to an L293D motor driver shield for driving DC gearmotors, a servo for actuation, and an ultrasonic sensor for distance sensing. It includes feedback mechanisms such as an LED and piezo speaker, and a photocell for light detection, all powered by a 2x 18650 battery pack with a rocker switch for power management.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Robotics projects for driving wheels or actuators
  • Automation systems requiring motorized components
  • DIY projects involving DC or stepper motors
  • Educational kits for learning motor control
  • Prototyping motorized mechanisms

Technical Specifications

The DFRobot Motor Driver (TB6612FNG) has the following key specifications:

Parameter Value
Operating Voltage 2.7V to 5.5V
Motor Drive Voltage 4.5V to 13.5V
Continuous Output Current 1.2A per channel (max)
Peak Output Current 3.2A per channel (short duration)
PWM Frequency Up to 100 kHz
Control Logic Voltage 2.7V to 5.5V
Number of Channels 2 (can drive 2 DC motors or 1 stepper motor)
Standby Current 1 µA (typical)
Dimensions 21mm x 18mm x 3mm

Pin Configuration and Descriptions

The TB6612FNG motor driver module has the following pinout:

Pin Name Type Description
VCC Power Input Logic voltage input (2.7V to 5.5V).
VM Power Input Motor power supply (4.5V to 13.5V).
GND Ground Ground connection.
AIN1 Input Input signal for Motor A direction control.
AIN2 Input Input signal for Motor A direction control.
PWMA Input (PWM) PWM signal input for Motor A speed control.
BIN1 Input Input signal for Motor B direction control.
BIN2 Input Input signal for Motor B direction control.
PWMB Input (PWM) PWM signal input for Motor B speed control.
STBY Input Standby control pin. Set HIGH to enable the driver, LOW to disable.
AO1 Output Motor A output terminal 1.
AO2 Output Motor A output terminal 2.
BO1 Output Motor B output terminal 1.
BO2 Output Motor B output terminal 2.

Usage Instructions

How to Use the Component in a Circuit

  1. Power Connections:

    • Connect the VCC pin to a 3.3V or 5V logic power supply.
    • Connect the VM pin to the motor power supply (4.5V to 13.5V).
    • Connect the GND pin to the ground of the power supply.
  2. Motor Connections:

    • Connect the motor terminals to AO1 and AO2 for Motor A, and BO1 and BO2 for Motor B.
  3. Control Connections:

    • Use the AIN1, AIN2, and PWMA pins to control Motor A.
    • Use the BIN1, BIN2, and PWMB pins to control Motor B.
    • Set the STBY pin HIGH to enable the driver.
  4. Direction and Speed Control:

    • Set the direction of the motor by configuring AIN1 and AIN2 (or BIN1 and BIN2).
    • Control the speed by providing a PWM signal to PWMA (or PWMB).

Important Considerations and Best Practices

  • Ensure that the motor power supply voltage (VM) matches the requirements of your motors.
  • Use appropriate decoupling capacitors near the power supply pins to reduce noise.
  • Avoid exceeding the maximum current rating of 1.2A per channel to prevent damage.
  • Use heat sinks or proper ventilation if operating at high currents for extended periods.
  • Always set the STBY pin LOW when the driver is not in use to minimize power consumption.

Example Code for Arduino UNO

Below is an example of how to control two DC motors using the DFRobot Motor Driver with an Arduino UNO:

// Define motor control pins
#define AIN1 7  // Motor A direction control pin 1
#define AIN2 8  // Motor A direction control pin 2
#define PWMA 9  // Motor A speed control (PWM) pin
#define BIN1 10 // Motor B direction control pin 1
#define BIN2 11 // Motor B direction control pin 2
#define PWMB 3  // Motor B speed control (PWM) pin
#define STBY 12 // Standby control pin

void setup() {
  // Set motor control pins as outputs
  pinMode(AIN1, OUTPUT);
  pinMode(AIN2, OUTPUT);
  pinMode(PWMA, OUTPUT);
  pinMode(BIN1, OUTPUT);
  pinMode(BIN2, OUTPUT);
  pinMode(PWMB, OUTPUT);
  pinMode(STBY, OUTPUT);

  // Enable the motor driver
  digitalWrite(STBY, HIGH);
}

void loop() {
  // Motor A: Forward at 50% speed
  digitalWrite(AIN1, HIGH);
  digitalWrite(AIN2, LOW);
  analogWrite(PWMA, 128); // 50% duty cycle (0-255)

  // Motor B: Reverse at 75% speed
  digitalWrite(BIN1, LOW);
  digitalWrite(BIN2, HIGH);
  analogWrite(PWMB, 192); // 75% duty cycle (0-255)

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

  // Stop both motors
  analogWrite(PWMA, 0);
  analogWrite(PWMB, 0);

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

Troubleshooting and FAQs

Common Issues and Solutions

  1. Motors Not Running:

    • Ensure the STBY pin is set HIGH to enable the driver.
    • Verify that the power supply connections (VCC, VM, and GND) are correct.
    • Check the PWM signal and ensure it is within the supported frequency range.
  2. Motor Running in the Wrong Direction:

    • Swap the AIN1 and AIN2 (or BIN1 and BIN2) signals to reverse the motor direction.
  3. Overheating:

    • Ensure the current drawn by the motors does not exceed 1.2A per channel.
    • Use heat sinks or improve ventilation if necessary.
  4. Noisy Operation:

    • Add decoupling capacitors near the motor terminals to reduce electrical noise.
    • Ensure proper grounding and minimize long wire runs.

FAQs

Q: Can I use this module to control a stepper motor?
A: Yes, the TB6612FNG can control a stepper motor by driving its two coils. You will need to generate the appropriate step sequences using the control pins.

Q: What is the maximum PWM frequency supported?
A: The module supports PWM frequencies up to 100 kHz.

Q: Can I use a 12V power supply for both VM and VCC?
A: No, VCC should be between 2.7V and 5.5V. Use a voltage regulator if your logic circuit requires 5V or 3.3V.