The TB6612 is a versatile and efficient motor driver and PWM (Pulse Width Modulation) controller designed to drive DC motors in various applications, including robotics, automation systems, and hobbyist projects. It offers the ability to control both the speed and direction of one or two DC motors and is known for its low power consumption and high efficiency.
Pin Number | Pin Name | Description |
---|---|---|
1 | VM | Motor voltage supply (2.5V to 13.5V) |
2 | VCC | Logic voltage supply (2.7V to 5.5V) |
3 | GND | Ground |
4 | STBY | Standby (Low: Standby mode, High: Normal operation) |
5 | AIN1 | Input A channel 1 |
6 | AIN2 | Input A channel 2 |
7 | PWMA | PWM input for A channel |
8 | BIN1 | Input B channel 1 |
9 | BIN2 | Input B channel 2 |
10 | PWMB | PWM input for B channel |
11 | AOUT1 | Output A channel 1 |
12 | AOUT2 | Output A channel 2 |
13 | BOUT1 | Output B channel 1 |
14 | BOUT2 | Output B channel 2 |
Power Connections:
Motor Connections:
Control Connections:
Standby Mode:
#include <Arduino.h>
// Define TB6612 control pins connected to the Arduino
const int PWMA = 3; // Speed control for motor A
const int AIN1 = 4; // Direction control for motor A
const int AIN2 = 5; // Direction control for motor A
const int STBY = 6; // Standby
void setup() {
// Set control pins as outputs
pinMode(PWMA, OUTPUT);
pinMode(AIN1, OUTPUT);
pinMode(AIN2, OUTPUT);
pinMode(STBY, OUTPUT);
// Disable standby mode
digitalWrite(STBY, HIGH);
}
void loop() {
// Set motor A direction to clockwise
digitalWrite(AIN1, HIGH);
digitalWrite(AIN2, LOW);
// Set motor A speed to 50%
analogWrite(PWMA, 128);
delay(2000); // Run for 2 seconds
// Set motor A direction to counter-clockwise
digitalWrite(AIN1, LOW);
digitalWrite(AIN2, HIGH);
delay(2000); // Run for 2 seconds
// Stop motor A
digitalWrite(AIN1, LOW);
digitalWrite(AIN2, LOW);
delay(2000); // Stop for 2 seconds
}
Q: Can the TB6612 drive stepper motors? A: No, the TB6612 is designed for DC motors. Stepper motors require a different type of driver.
Q: What is the maximum frequency for PWM input? A: The TB6612 can handle PWM frequencies up to 100kHz.
Q: How do I put the TB6612 in standby mode? A: Set the STBY pin to LOW to put the TB6612 in standby mode and reduce power consumption.
Q: Can I use the TB6612 to drive a single motor at 2.4A? A: No, the continuous current per channel is 1.2A. To drive a motor with higher current, consider using a motor driver with a higher current rating or paralleling the outputs with proper current sharing.
This documentation provides a comprehensive guide to using the TB6612 motor driver/PWM controller. For further information, consult the manufacturer's datasheet and application notes.