Electronics

Motor Driver Module 2ch 1.2A 15V TB6612FNG

Out Of Stock

1

Description

The TB6612FNG motor driver has a constant current of 1.2A and can control up to two DC motors (3.2A peak). The motor can be controlled by two input signals (IN1 and IN2) in one of four function modes: CW, CCW, short-brake, and stop. The two motor outputs (A and B) can be controlled independently, and the speed of each motor is controlled by a PWM input signal with a frequency range of up to 100kHz. To remove the motor from standby mode, pull the STBY pin high. The logic supply voltage (VCC) can range from 2.7 to 5.5VDC, while the motor supply (VM) has a maximum voltage of 15VDC. The output current per channel is rated at up to 1.2A. (or up to 3.2A for a short, single pulse). On both supply lines, decoupling capacitors are installed. The TB6612FNG has all of its pins broken out into two 0.1" pitch headers, with input pins on one side and output pins on the other.

Specifications:

  • Power supply voltage: VM=15V max, VCC=2.7-5.5V
  • Output current: Iout=1.2A(average) / 3.2A (peak) 
  • Standby control to save power
  • CW/CCW/short brake/stop motor control modes
  • Built-in thermal shutdown circuit and low voltage detecting circuit
  •  0.1" spaced pins
  • Filtering capacitors on both supply lines
  • Dimensions: 0.8x0.8"

Pinout of the Module:

  • VM: Motor voltage
  • VCC: Module power supply
  • GND: Ground – In this module we have three ground pins that are connected to each other.
  • A1: Motor A connection ‘+’
  • A2: Motor A connection ‘-‘
  • B1: Motor A connection ‘+’
  • B2: Motor A connection ‘-’
  • PWMA: PWM pin for Motor A for speed control
  • PWMB: PWM pin for Motor B for speed control
  • AIN1: Control signal for motor A
  • AIN2: Control signal for motor A
  • BIN1: Control signal for motor B
  • BIN2: Control signal for motor B
  • STBY: This PIN must be HIGH to activate Standby

Driving Small Motors With the TB6612FNG : 8 Steps - Instructables

Arduino Library:

Library

Download the library from Sparkfun's GitHub page.

After you've downloaded the zip file, launch the Arduino IDE.

Add the library you downloaded from Sketch > Include Library > Add. Zip Library.

Once installed, it should appear under File > Examples as 'SparkFun TB6612FNG Motor Library.'

Connections with Arduino :

Sample Arduino Code:

#include 

// Pins for all inputs, keep in mind the PWM defines must be on PWM pins
// the default pins listed are the ones used on the Redbot (ROB-12097) with
// the exception of STBY which the Redbot controls with a physical switch
#define AIN1 2
#define BIN1 7
#define AIN2 4
#define BIN2 8
#define PWMA 5
#define PWMB 6
#define STBY 9

// these constants are used to allow you to make your motor configuration 
// line up with function names like forward.  Value can be 1 or -1
const int offsetA = 1;
const int offsetB = 1;

// Initializing motors.  The library will allow you to initialize as many
// motors as you have memory for.  If you are using functions like forward
// that take 2 motors as arguements you can either write new functions or
// call the function more than once.
Motor motor1 = Motor(AIN1, AIN2, PWMA, offsetA, STBY);
Motor motor2 = Motor(BIN1, BIN2, PWMB, offsetB, STBY);

void setup()
{
 //Nothing here
}
void loop()
{
   //Use of the drive function which takes as arguements the speed
   //and optional duration.  A negative speed will cause it to go
   //backwards.  Speed can be from -255 to 255.  Also use of the 
   //brake function which takes no arguements.
   motor1.drive(255,1000);
   motor1.drive(-255,1000);
   motor1.brake();
   delay(1000);
   
   //Use of the drive function which takes as arguements the speed
   //and optional duration.  A negative speed will cause it to go
   //backwards.  Speed can be from -255 to 255.  Also use of the 
   //brake function which takes no arguements.
   motor2.drive(255,1000);
   motor2.drive(-255,1000);
   motor2.brake();
   delay(1000);
   //Use of the forward function, which takes as arguements two motors
   //and optionally a speed.  If a negative number is used for speed
   //it will go backwards
   forward(motor1, motor2, 150);
   delay(1000);   
   //Use of the back function, which takes as arguments two motors 
   //and optionally a speed.  Either a positive number or a negative
   //number for speed will cause it to go backwards
   back(motor1, motor2, -150);
   delay(1000);
   //Use of the brake function which takes as arguments two motors.
   //Note that functions do not stop motors on their own.
   brake(motor1, motor2);
   delay(1000);
   //Use of the left and right functions which take as arguements two
   //motors and a speed.  This function turns both motors to move in 
   //the appropriate direction.  For turning a single motor use drive.
   left(motor1, motor2, 100);
   delay(1000);
   right(motor1, motor2, 100);
   delay(1000);
   //Use of brake again.
   brake(motor1, motor2);
   delay(1000);
   
}