TB6612FNG
| TB6612FNG | |
|---|---|
| ⚙ | |
| Function | Dual H-Bridge Motor Driver |
| Type | Integrated Circuit / Breakout Module |
| Manufacturer | Toshiba |
| Operating Voltage | 4.5V – 13.5V (motor) / 2.7V – 5.5V (logic) |
| Current Rating | 1.2A per channel (3.2A peak) |
| Package | SSOP24 (IC) / Breakout Board |
| Interface | 6 GPIO pins (2× PWM, 4× direction control) |
| Typical Cost | $1-3 USD (module) |
| Datasheet | TB6612FNG Datasheet |
The TB6612FNG is a dual H-bridge motor driver IC commonly used in robotics and embedded systems. It can independently control two DC motors with PWM speed control and direction switching, making it ideal for differential drive robots.
Overview
The TB6612FNG is manufactured by Toshiba and designed specifically for driving small DC motors in battery-powered applications. It offers significant advantages over older motor drivers like the L298N, including lower voltage drop, higher efficiency, and better thermal performance.
Key Features
- Dual H-Bridge: Control two DC motors independently
- PWM Speed Control: Smooth speed control via pulse-width modulation
- High Efficiency: Low on-resistance (0.5Ω typ.) reduces power loss
- Wide Voltage Range:
- Motor supply: 4.5V to 13.5V
- Logic supply: 2.7V to 5.5V (3.3V and 5V compatible)
- Current Rating:
- 1.2A continuous per channel
- 3.2A peak per channel (single pulse)
- Protection Features:
- Thermal shutdown
- Low-voltage detection
- Overcurrent protection
- Compact Package: SSOP24 surface-mount package
Pin Configuration
The TB6612FNG requires the following control signals per motor:
- PWMA/PWMB: PWM input for speed control (one per motor)
- AIN1/AIN2: Direction control for Motor A
- BIN1/BIN2: Direction control for Motor B
- STBY: Standby pin (pull HIGH to enable, LOW to disable)
Truth Table
| IN1 | IN2 | PWM | Motor Output |
|---|---|---|---|
| H | H | H/L | Short brake |
| L | H | H | CCW (forward) |
| L | H | L | Short brake |
| H | L | H | CW (reverse) |
| H | L | L | Short brake |
| L | L | H | Stop (coast) |
Breakout Module
The TB6612FNG is most commonly used as a pre-assembled breakout board that includes:
- The TB6612FNG IC
- Decoupling capacitors
- Pull-down resistors on control pins
- Screw terminals or header pins for motor connections
- Pin headers for microcontroller connections
Common breakout boards include models from SparkFun, Adafruit, and various Chinese manufacturers.
Usage in BRS Projects
The TB6612FNG is the motor driver used in SimpleBot's BRS Differential Drive Robot Control Board. It provides:
- Control for two TT motors (left and right wheels)
- PWM speed control from the Raspberry Pi Pico
- Direction control for forward/reverse motion
- Efficient power usage for battery-powered operation
Comparison to L298N
The TB6612FNG is generally superior to the older L298N motor driver:
| Feature | TB6612FNG | L298N |
|---|---|---|
| Voltage Drop | ~0.3V | ~2-4V |
| Efficiency | High (>95%) | Low (~70%) |
| Heat Generation | Minimal | Significant |
| Size | Small | Large |
| Cost | $1-3 | $2-4 |
The TB6612FNG's lower voltage drop is especially important for battery-powered robots, where every bit of voltage matters.
Wiring Example
Microcontroller → TB6612FNG: - GPIO (PWM) → PWMA, PWMB - GPIO → AIN1, AIN2, BIN1, BIN2 - GPIO → STBY (or tie to VCC) - GND → GND (logic) Power Supply: - Battery (+) → VM (motor power) - 3.3V → VCC (logic power) - GND → GND (power) Motors: - Motor A → AO1, AO2 - Motor B → BO1, BO2
Code Example (MicroPython)
from machine import Pin, PWM
# Motor A pins
ain1 = Pin(14, Pin.OUT)
ain2 = Pin(15, Pin.OUT)
pwma = PWM(Pin(16))
pwma.freq(1000)
# Motor B pins
bin1 = Pin(17, Pin.OUT)
bin2 = Pin(18, Pin.OUT)
pwmb = PWM(Pin(19))
pwmb.freq(1000)
# Standby pin
stby = Pin(20, Pin.OUT)
stby.value(1) # Enable driver
def motor_a_forward(speed):
"""Drive Motor A forward at speed (0-65535)"""
ain1.value(0)
ain2.value(1)
pwma.duty_u16(speed)
def motor_a_reverse(speed):
"""Drive Motor A reverse at speed (0-65535)"""
ain1.value(1)
ain2.value(0)
pwma.duty_u16(speed)
def motor_a_stop():
"""Stop Motor A (coast)"""
ain1.value(0)
ain2.value(0)
pwma.duty_u16(0)
# Similar functions for Motor B...
Resources
See Also
- BRS Differential Drive Robot Control Board
- SimpleBot
- L298N (alternative motor driver)