Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use TB6612FNG: Examples, Pinouts, and Specs

Image of TB6612FNGDesign with TB6612FNG in Cirkit Designer

Introduction

The TB6612FNG is a dual H-bridge motor driver IC designed for controlling two DC motors or one stepper motor. It supports PWM (Pulse Width Modulation) for precise speed control and direction management. With a compact design and robust features like thermal shutdown protection, this IC is ideal for robotics, automation, and other motor control applications.

Explore Projects Built with TB6612FNG

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Arduino Nano Controlled Robot with Ultrasonic Sensor and Dual Motor Drivers: A project utilizing TB6612FNG in a practical application
Arduino Nano Controlled Robot with Ultrasonic Sensor and Dual Motor Drivers

This circuit features an Arduino Nano microcontroller interfaced with a TB6612FNG motor driver to control two DC Mini Metal Gear Motors. It also includes an HC-SR04 Ultrasonic Sensor for distance measurement, a 5 channel IR sensor for line tracking, and a Servomotor SG90 for positioning tasks. The system is powered by a 12V battery, with the Arduino Nano managing sensor inputs and motor outputs to perform tasks such as navigation or automation.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

The TB6612FNG has 20 pins, with the following configuration:

Pin Number Pin Name Description
1 AIN1 Input signal for Motor A (controls direction)
2 AIN2 Input signal for Motor A (controls direction)
3 PWMA PWM input for Motor A (controls speed)
4 A01 Output 1 for Motor A
5 A02 Output 2 for Motor A
6 VM Motor power supply (4.5V to 13.5V)
7 VCC Logic power supply (2.7V to 5.5V)
8 STBY Standby control (active HIGH)
9 BIN1 Input signal for Motor B (controls direction)
10 BIN2 Input signal for Motor B (controls direction)
11 PWMB PWM input for Motor B (controls speed)
12 B01 Output 1 for Motor B
13 B02 Output 2 for Motor B
14 GND Ground
15 NC No connection
16 NC No connection
17 NC No connection
18 NC No connection
19 NC No connection
20 NC No connection

Usage Instructions

How to Use the TB6612FNG in a Circuit

  1. Power Connections:

    • Connect the VM pin to the motor power supply (4.5V to 13.5V).
    • Connect the VCC pin to the logic power supply (2.7V to 5.5V).
    • Connect the GND pin to the ground of the circuit.
  2. Motor Connections:

    • For Motor A, connect the motor terminals to A01 and A02.
    • For Motor B, connect the motor terminals to B01 and B02.
  3. Control Signals:

    • Use the AIN1 and AIN2 pins to control the direction of Motor A.
    • Use the BIN1 and BIN2 pins to control the direction of Motor B.
    • Apply a PWM signal to PWMA and PWMB to control the speed of Motor A and Motor B, respectively.
  4. Standby Mode:

    • Set the STBY pin HIGH to enable the IC. Set it LOW to put the IC in standby mode.

Important Considerations and Best Practices

Example: Using TB6612FNG with Arduino UNO

Below is an example code to control two DC motors using the TB6612FNG and an Arduino UNO:

// Define motor control pins
#define AIN1 7  // Motor A direction control pin 1
#define AIN2 6  // Motor A direction control pin 2
#define PWMA 5  // Motor A speed control (PWM) pin
#define BIN1 4  // Motor B direction control pin 1
#define BIN2 3  // Motor B direction control pin 2
#define PWMB 2  // Motor B speed control (PWM) pin
#define STBY 8  // Standby control pin

void setup() {
  // Set motor control 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 setting STBY HIGH
  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
  analogWrite(PWMA, 0);
  analogWrite(PWMB, 0);

  delay(2000); // Wait for 2 seconds
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Motors Not Running:

    • Ensure the STBY pin is set HIGH to enable the IC.
    • Verify that the power supply voltage for VM and VCC is within the specified range.
    • Check the connections to the motor terminals and control pins.
  2. Overheating:

    • Ensure the motor's current does not exceed the IC's maximum ratings.
    • Use proper heat dissipation methods, such as heat sinks or fans.
  3. Erratic Motor Behavior:

    • Add decoupling capacitors between VM and GND to reduce noise.
    • Verify the PWM signal frequency and duty cycle.
  4. No Response to PWM Signals:

    • Confirm that the PWM pins are correctly connected to the microcontroller.
    • Check the microcontroller's PWM configuration and ensure the signal is being generated.

FAQs