The Motor Driver 1A Dual TB6612FNG is a versatile and efficient motor driver capable of controlling two DC motors or one bipolar stepper motor. Its compact form factor and low power consumption make it ideal for embedded systems, particularly in robotics, automation, and small-scale motor control applications.
Pin Number | Pin Name | Description |
---|---|---|
1 | VM | Motor voltage supply, connects to the motor power source |
2 | VCC | Logic voltage supply, connects to the control board (e.g., Arduino) |
3 | GND | Ground connection |
4 | STBY | Standby pin (active low) |
5 | AIN1 | Input 1 for motor A |
6 | AIN2 | Input 2 for motor A |
7 | BIN1 | Input 1 for motor B |
8 | BIN2 | Input 2 for motor B |
9 | PWMA | PWM input for motor A |
10 | PWMB | PWM input for motor B |
11 | AOUT1 | Output 1 for motor A |
12 | AOUT2 | Output 2 for motor A |
13 | BOUT1 | Output 1 for motor B |
14 | BOUT2 | Output 2 for motor B |
// Define the connections to the Arduino
const int motorAin1 = 2;
const int motorAin2 = 3;
const int motorApwm = 9; // Must be a PWM pin
const int motorBin1 = 4;
const int motorBin2 = 5;
const int motorBpwm = 10; // Must be a PWM pin
const int standbyPin = 6;
void setup() {
// Set all the motor driver pins as outputs
pinMode(motorAin1, OUTPUT);
pinMode(motorAin2, OUTPUT);
pinMode(motorApwm, OUTPUT);
pinMode(motorBin1, OUTPUT);
pinMode(motorBin2, OUTPUT);
pinMode(motorBpwm, OUTPUT);
pinMode(standbyPin, OUTPUT);
// Take the motor driver out of standby
digitalWrite(standbyPin, HIGH);
}
void loop() {
// Drive motor A forward at full speed
digitalWrite(motorAin1, HIGH);
digitalWrite(motorAin2, LOW);
analogWrite(motorApwm, 255); // Full speed
// Drive motor B backward at half speed
digitalWrite(motorBin1, LOW);
digitalWrite(motorBin2, HIGH);
analogWrite(motorBpwm, 127); // Half speed
delay(2000); // Run for 2 seconds
// Stop both motors
digitalWrite(motorAin1, LOW);
digitalWrite(motorAin2, LOW);
digitalWrite(motorBin1, LOW);
digitalWrite(motorBin2, LOW);
delay(1000); // Stop for 1 second
}
Q: Can I use the TB6612FNG to drive a stepper motor? A: Yes, the TB6612FNG can be used to drive a bipolar stepper motor by controlling the current in the coils with the input and PWM pins.
Q: What should I do if the motor driver gets too hot? A: Ensure that the current draw is within the specified limits, check for any shorts, and consider adding a heat sink or improving airflow around the driver.
Q: Can I control the TB6612FNG with a microcontroller other than an Arduino? A: Absolutely, any microcontroller with digital output capability can be used to control the TB6612FNG, as long as it operates within the logic voltage range.