The TB6612FNG is a dual H-bridge motor driver IC designed to control two DC motors or one stepper motor. It supports PWM (Pulse Width Modulation) for precise speed control and direction management. With built-in thermal shutdown protection, overcurrent protection, and low standby current, the TB6612FNG is a reliable choice for robotics, automation, and other motor control applications.
The TB6612FNG has 20 pins. Below is the pinout and description:
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Logic power supply (2.7V to 5.5V) |
2 | GND | Ground connection |
3 | AIN1 | Input 1 for Motor A (controls direction) |
4 | AIN2 | Input 2 for Motor A (controls direction) |
5 | PWMA | PWM input for Motor A (controls speed) |
6 | A01 | Output 1 for Motor A |
7 | A02 | Output 2 for Motor A |
8 | VM | Motor power supply (4.5V to 13.5V) |
9 | STBY | Standby control (active HIGH to enable the IC) |
10 | BIN1 | Input 1 for Motor B (controls direction) |
11 | BIN2 | Input 2 for Motor B (controls direction) |
12 | PWMB | PWM input for Motor B (controls speed) |
13 | B01 | Output 1 for Motor B |
14 | B02 | Output 2 for Motor B |
15 | NC | No connection |
16 | NC | No connection |
17 | NC | No connection |
18 | NC | No connection |
19 | NC | No connection |
20 | NC | No connection |
Power Connections:
Motor Connections:
Control Pins:
PWM Control:
Below is an example of how to control two DC motors using the TB6612FNG and an Arduino UNO:
// Pin definitions for Motor A
const int AIN1 = 7; // Direction control pin 1 for Motor A
const int AIN2 = 8; // Direction control pin 2 for Motor A
const int PWMA = 9; // PWM speed control pin for Motor A
// Pin definitions for Motor B
const int BIN1 = 4; // Direction control pin 1 for Motor B
const int BIN2 = 5; // Direction control pin 2 for Motor B
const int PWMB = 6; // PWM speed control pin for Motor B
// Standby pin
const int STBY = 10; // Standby control pin
void setup() {
// Set all 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 by pulling STBY HIGH
digitalWrite(STBY, HIGH);
}
void loop() {
// Example: Run Motor A forward at 50% speed
digitalWrite(AIN1, HIGH); // Set direction
digitalWrite(AIN2, LOW);
analogWrite(PWMA, 128); // Set speed (128/255 = 50%)
// Example: Run Motor B backward at 75% speed
digitalWrite(BIN1, LOW); // Set direction
digitalWrite(BIN2, HIGH);
analogWrite(PWMB, 192); // Set speed (192/255 = 75%)
delay(2000); // Run for 2 seconds
// Stop both motors
analogWrite(PWMA, 0); // Stop Motor A
analogWrite(PWMB, 0); // Stop Motor B
delay(2000); // Wait for 2 seconds
}
Motors not spinning:
Motors spinning in the wrong direction:
Overheating:
No response from the motor driver:
Can I control a stepper motor with the TB6612FNG? Yes, the TB6612FNG can control a stepper motor by driving its two coils. Use appropriate stepper motor control logic.
What happens if the IC overheats? The TB6612FNG has built-in thermal shutdown protection. It will disable the outputs until the temperature returns to a safe level.
Can I use the TB6612FNG with a 3.3V microcontroller? Yes, the TB6612FNG supports logic levels as low as 2.7V, making it compatible with 3.3V microcontrollers.