2x1.2A DC Motor Driver (TB6612FNG) wiki- DFRobot

Introduction

2x1.2A DC Motor Driver (TB6612FNG)

This DFRobot micro dual way DC motor driver is design based on TB6612FNG motor driver IC. It inherits DFRobot L298N motor control logic, which only need four pins to drive 2 motors. Compared with the IC Breakout, it saves two precious GPIO resource, especially in Arduino UNO board. TB6612FNG is a dual-channel full-bridge drive chip. The maximum continuous drive current of single channel can reach 1.2A, peak value 2A/3.2A (continuous pulse / single pulse) , which can drive some micro DC motors. The control logic is similar to L298n, and the code can be directly compatible with the DFROBOT L298N motor driver. Standard XH2.54 pin can be inserted directly into the breadboard. It is a good choice for DIY project or product developments.

Specification

Board Overview

2x1.2A DC Motor Driver (TB6612FNG)

Label Number Description
1 DIR1 M1 Direction Control
2 PWM1 M1 Speed control(PWM)
3 PWM2 M2 Speed control(PWM)
4 DIR2 M2 Direction Control
5 GND Negative power supply
6 VCC Power 3.3V-5V or IO port output high
7 M1 A Output 1
8 M1- A Output 2
9 M2 B Output 1
10 M2- B Output 2
11 GND Negative power supply
12 VM(<12V) Motor drive power 3.3V-12V

Tutorial

Connection Diagram

Arduino Connection

Sample Code


int PWM1 = 5;
int DIR1 = 4;
int PWM2 = 6;
int DIR2 = 7;
void setup()
{
  pinMode(DIR1, OUTPUT);
  pinMode(DIR2, OUTPUT);
}
void loop()
{
  int value;
  for(value = 0 ; value <= 255; value =5)
  {
    digitalWrite(DIR1,HIGH);
    digitalWrite(DIR2, HIGH);
    analogWrite(PWM1, value);   //PWM Speed Control
    analogWrite(PWM2, value);   //PWM Speed Control
    delay(30);
  }
}

Result

Two motor speeds change from 0 to maximum, cycle.

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum

More Documents