Introduction
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.
Common Applications:
- Robotics (e.g., motorized wheels, robotic arms)
- Automation systems
- Remote-controlled vehicles
- Conveyor belts
- Stepper motor control
Technical Specifications
Key Technical Details:
- Operating Voltage (Vcc): 2.7V to 5.5V
- Motor Voltage (VM): 4.5V to 13.5V
- Output Current (per channel): 1.2A (continuous), 3.2A (peak)
- Control Logic Voltage: 3.3V or 5V compatible
- PWM Frequency: Up to 100 kHz
- Built-in Protections: Thermal shutdown, overcurrent protection, and low-voltage detection
- Package Type: HTSSOP24 (compact surface-mount package)
Pin Configuration and Descriptions:
The TB6612FNG has 24 pins. Below is a summary of the key pins and their functions:
Truth Table for Motor Control:
The following table shows how the input signals control the motor direction:
Usage Instructions
How to Use the TB6612FNG in a Circuit:
Power Connections:
- Connect the logic power supply (2.7V to 5.5V) to the VCC pin.
- Connect the motor power supply (4.5V to 13.5V) to the VM pin.
- Connect all GND pins to the ground plane of your circuit.
Motor Connections:
- Connect the motor terminals to AO1/AO2 (for Motor A) and BO1/BO2 (for Motor B).
Control Signals:
- Use AIN1/AIN2 and BIN1/BIN2 to control the direction of Motor A and Motor B, respectively.
- Use PWMA and PWMB to control the speed of Motor A and Motor B using PWM signals.
- Set the STBY pin HIGH to enable the IC. Pull it LOW to put the IC in standby mode.
PWM Frequency:
- Generate PWM signals with a frequency of up to 100 kHz for speed control.
Example: Using TB6612FNG with Arduino UNO
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
}
Important Considerations:
- Ensure the motor power supply (VM) matches the voltage requirements of your motors.
- Use appropriate decoupling capacitors near the VCC and VM pins to reduce noise.
- Avoid exceeding the maximum current ratings to prevent damage to the IC.
- Use heatsinks or proper ventilation if operating near the maximum current limits.
Troubleshooting and FAQs
Common Issues and Solutions:
Motors Not Running:
- Ensure the STBY pin is set HIGH to enable the IC.
- Verify that the motor power supply (VM) is connected and within the specified range.
- Check the control signals (AIN1/AIN2, BIN1/BIN2) and PWM inputs.
Motor Running in the Wrong Direction:
- Swap the AIN1/AIN2 or BIN1/BIN2 signals to reverse the motor direction.
Overheating:
- Ensure the current draw of the motors does not exceed 1.2A per channel.
- Add heatsinks or improve ventilation if necessary.
Noisy Operation:
- Add decoupling capacitors (e.g., 0.1 µF) near the motor terminals to reduce electrical noise.
FAQs:
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.