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

How to Use TB6612FNG Module: Examples, Pinouts, and Specs

Image of TB6612FNG ModuleDesign with TB6612FNG Module in Cirkit Designer

Introduction

The TB6612FNG module, manufactured by Breakout, is a dual H-bridge motor driver IC designed to control two DC motors or one stepper motor. It provides advanced features such as PWM (Pulse Width Modulation) control, direction control, and current sensing, making it a versatile and efficient choice for motor control applications. This module is widely used in robotics, automation systems, and other projects requiring precise motor control.

Explore Projects Built with TB6612FNG Module

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 Cellular-Enabled IoT Device with Real-Time Clock and Power Management: A project utilizing TB6612FNG Module in a practical application
Cellular-Enabled IoT Device with Real-Time Clock and Power Management

This circuit features a LilyGo-SIM7000G module for cellular communication and GPS functionality, interfaced with an RTC DS3231 for real-time clock capabilities. It includes voltage sensing through two voltage sensor modules, and uses an 8-channel opto-coupler for isolating different parts of the circuit. Power management is handled by a buck converter connected to a DC power source and batteries, with a fuse for protection and a rocker switch for on/off control. Additionally, there's an LED for indication purposes.

Open Project in Cirkit Designer
Image of Arduino Mega 2560 Based Security System with Fingerprint Authentication and SMS Alerts: A project utilizing TB6612FNG Module in a practical application
Arduino Mega 2560 Based Security System with Fingerprint Authentication and SMS Alerts

This circuit features an Arduino Mega 2560 microcontroller interfaced with a SIM800L GSM module, two fingerprint scanners, an I2C LCD display, an IR sensor, and a piezo buzzer. Power management is handled by a PowerBoost 1000 Basic Pad USB, a TP4056 charging module, and a Li-ion 18650 battery, with an option to use a Mini AC-DC 110V-230V to 5V 700mA module for direct power supply. The primary functionality appears to be a security system with GSM communication capabilities, biometric access control, and visual/audible feedback.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

The TB6612FNG module is designed to handle a wide range of motor control requirements. Below are its key technical details:

Key Specifications

Parameter Value
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 Interface PWM, Direction Control
Standby Current 1 µA (typical)
Operating Temperature -20°C to +85°C
Dimensions 20mm x 15mm (module size may vary)

Pin Configuration and Descriptions

The TB6612FNG module has 16 pins, each serving a specific function. Below is the pinout and description:

Pin Name Pin Number Description
VCC 1 Logic power supply (2.7V to 5.5V)
VM 2 Motor power supply (4.5V to 13.5V)
GND 3, 8, 13 Ground connection
AIN1 4 Input 1 for Motor A (controls direction)
AIN2 5 Input 2 for Motor A (controls direction)
PWMA 6 PWM input for Motor A (speed control)
STBY 7 Standby control (active HIGH to enable the module)
BIN1 9 Input 1 for Motor B (controls direction)
BIN2 10 Input 2 for Motor B (controls direction)
PWMB 11 PWM input for Motor B (speed control)
AO1 12 Output 1 for Motor A
AO2 14 Output 2 for Motor A
BO1 15 Output 1 for Motor B
BO2 16 Output 2 for Motor B

Usage Instructions

The TB6612FNG module is straightforward to use in motor control circuits. Below are the steps and best practices for integrating it into your project.

Connecting the Module

  1. Power Supply:

    • Connect the VCC pin to a 3.3V or 5V logic power supply.
    • Connect the VM pin to the motor power supply (4.5V to 13.5V).
    • Connect all GND pins to the ground of your circuit.
  2. Motor Connections:

    • Connect the motor terminals to AO1 and AO2 for Motor A, and BO1 and BO2 for Motor B.
  3. Control Pins:

    • Use AIN1 and AIN2 to control the direction of Motor A, and BIN1 and BIN2 for Motor B.
    • Use PWMA and PWMB to control the speed of Motor A and Motor B, respectively, via PWM signals.
    • Set the STBY pin HIGH to enable the module.

Example Arduino Code

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

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

void setup() {
  // Set 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
  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
}

Best Practices

Troubleshooting and FAQs

Common Issues

  1. Motors not spinning:

    • Verify that the STBY pin is set HIGH.
    • Check the power supply connections for VCC and VM.
    • Ensure the PWM signals are being generated correctly.
  2. Motor spins in the wrong direction:

    • Swap the connections to AIN1 and AIN2 (or BIN1 and BIN2) to reverse the direction.
  3. Module overheating:

    • Ensure the current drawn by the motors does not exceed the module's rated limits.
    • Add a heat sink or improve ventilation if necessary.
  4. PWM control not working:

    • Verify that the PWM pins are connected to Arduino PWM-capable pins.
    • Check the duty cycle values being sent to the analogWrite() function.

FAQs

Q: Can I control a stepper motor with this module?
A: Yes, the TB6612FNG can control a stepper motor by using both H-bridges. You will need to generate the appropriate step and direction signals.

Q: What happens if I leave the STBY pin floating?
A: The module will remain in standby mode, and the motors will not operate. Always set the STBY pin HIGH to enable the module.

Q: Can I use this module with a 3.3V microcontroller?
A: Yes, the TB6612FNG supports logic levels as low as 2.7V, making it compatible with 3.3V microcontrollers.

By following this documentation, you can effectively integrate the TB6612FNG module into your motor control projects.