The TB6612FNG is a dual H-bridge motor driver IC designed to control two DC motors or one stepper motor. It is widely used in robotics, automation, and other motor control applications due to its compact size, high efficiency, and ease of use. The IC can drive motors in both forward and reverse directions, supports PWM (Pulse Width Modulation) for speed control, and features built-in thermal shutdown and overcurrent protection for reliable operation.
The TB6612FNG has 24 pins. Below is a summary of the key pins and their functions:
Pin Name | Pin Number | Description |
---|---|---|
VCC | 1 | Logic power supply (2.7V to 5.5V). |
VM | 4 | Motor power supply (4.5V to 13.5V). |
GND | 3, 5, 21 | Ground pins. Connect all to the ground plane. |
AIN1, AIN2 | 7, 8 | Input control signals for Motor A. |
BIN1, BIN2 | 10, 11 | Input control signals for Motor B. |
PWMA | 6 | PWM input for Motor A speed control. |
PWMB | 9 | PWM input for Motor B speed control. |
AO1, AO2 | 13, 14 | Output pins for Motor A. |
BO1, BO2 | 18, 19 | Output pins for Motor B. |
STBY | 22 | Standby control pin. Set HIGH to enable the IC. |
NC | Various | No connection. Leave these pins unconnected. |
The following table shows how the input signals control the motor direction:
AIN1/BIN1 | AIN2/BIN2 | Motor Direction |
---|---|---|
HIGH | LOW | Forward |
LOW | HIGH | Reverse |
HIGH | HIGH | Brake |
LOW | LOW | Stop (Coast) |
Power Connections:
Motor Connections:
Control Signals:
PWM Frequency:
Below is an example Arduino sketch to control two DC motors using the TB6612FNG:
// Define motor control pins
const int STBY = 7; // Standby pin
const int AIN1 = 8; // Motor A direction pin 1
const int AIN2 = 9; // Motor A direction pin 2
const int PWMA = 10; // Motor A speed (PWM) pin
const int BIN1 = 11; // Motor B direction pin 1
const int BIN2 = 12; // Motor B direction pin 2
const int PWMB = 3; // Motor B speed (PWM) pin
void setup() {
// Set pin modes
pinMode(STBY, OUTPUT);
pinMode(AIN1, OUTPUT);
pinMode(AIN2, OUTPUT);
pinMode(PWMA, OUTPUT);
pinMode(BIN1, OUTPUT);
pinMode(BIN2, OUTPUT);
pinMode(PWMB, 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
digitalWrite(AIN1, LOW);
digitalWrite(AIN2, LOW);
digitalWrite(BIN1, LOW);
digitalWrite(BIN2, LOW);
analogWrite(PWMA, 0);
analogWrite(PWMB, 0);
delay(2000); // Wait for 2 seconds
}
Motors Not Running:
Motor Running in the Wrong Direction:
Overheating:
Noisy Operation:
Can I use the TB6612FNG with a 3.3V microcontroller? Yes, the control logic is compatible with both 3.3V and 5V systems.
What happens if the motor draws more than 1.2A? The IC has built-in overcurrent protection, which will shut down the output to prevent damage.
Can I control a stepper motor with this IC? Yes, the TB6612FNG can control a bipolar stepper motor by driving its two coils.
Is it possible to use only one motor with this IC? Yes, you can use one motor by leaving the unused channel unconnected.