Component guide · Beginner · 4 min read
TB6612FNG motor driver

Pinout, Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The TB6612FNG drives two DC motors at up to 1.2 A each (3.2 A peak) with MOSFETs, so it wastes far less voltage than an L298N. Motor supply is 4.5 to 13.5 V and logic is 2.7 to 5.5 V, so it works directly with 3.3 V boards. Pull STBY high, use AIN1/AIN2 for direction and PWMA for speed.
Key specs at a glance
- Driver
- Toshiba TB6612FNG dual MOSFET H-bridge
- Motor supply (VM)
- 4.5 to 13.5 V
- Logic supply (VCC)
- 2.7 to 5.5 V
- Current
- 1.2 A continuous, 3.2 A peak per channel
- PWM
- Up to 100 kHz
- Extras
- Standby pin, thermal shutdown, low-voltage cut-off
What the TB6612FNG motor driver is
The TB6612FNG is a small dual H-bridge built from MOSFETs. Because MOSFETs have a very low on-resistance, the motor gets almost the full battery voltage and the chip stays cool, which matters on battery robots.
Each channel has two direction inputs and one PWM input. A standby pin (STBY) turns both channels off; it must be pulled high for the motors to run. It is the usual upgrade from an L298N for line followers, mini sumo and small two-wheel robots.
TB6612FNG motor driver pinout
The pins on the TB6612FNG motor driver and what each one does.
| Pin | Function |
|---|---|
| VM | Motor supply 4.5 to 13.5 V |
| VCC | Logic supply 2.7 to 5.5 V (from the controller) |
| GND | Ground (all GND pins joined) |
| STBY | Standby: HIGH = run, LOW = both channels off |
| AIN1, AIN2 | Direction for motor A |
| PWMA | Speed (PWM) for motor A |
| BIN1, BIN2 | Direction for motor B |
| PWMB | Speed (PWM) for motor B |
| AO1, AO2 / BO1, BO2 | Motor A and motor B outputs |
- VM
- Motor supply 4.5 to 13.5 V
- VCC
- Logic supply 2.7 to 5.5 V (from the controller)
- GND
- Ground (all GND pins joined)
- STBY
- Standby: HIGH = run, LOW = both channels off
- AIN1, AIN2
- Direction for motor A
- PWMA
- Speed (PWM) for motor A
- BIN1, BIN2
- Direction for motor B
- PWMB
- Speed (PWM) for motor B
- AO1, AO2 / BO1, BO2
- Motor A and motor B outputs
Wiring the TB6612FNG motor driver
Power VCC from the same voltage as your controller's logic (5 V for Uno, 3.3 V for ESP32). Put a 10 to 100 µF capacitor across VM and GND near the board if the motor wires are long.
| TB6612FNG motor driver pin | Arduino Uno | ESP32 |
|---|---|---|
| PWMA | D5 (PWM) | GPIO 25 |
| AIN1 | D7 | GPIO 26 |
| AIN2 | D8 | GPIO 27 |
| STBY | D9 (or 5V) | GPIO 33 (or 3V3) |
| BIN1 | D10 | GPIO 14 |
| BIN2 | D11 | GPIO 12 |
| PWMB | D6 (PWM) | GPIO 13 |
| VCC | 5V | 3V3 |
| VM | Motor battery + | Motor battery + |
| GND | GND | GND |
- PWMA
- Arduino Uno:
- D5 (PWM)
- ESP32:
- GPIO 25
- AIN1
- Arduino Uno:
- D7
- ESP32:
- GPIO 26
- AIN2
- Arduino Uno:
- D8
- ESP32:
- GPIO 27
- STBY
- Arduino Uno:
- D9 (or 5V)
- ESP32:
- GPIO 33 (or 3V3)
- BIN1
- Arduino Uno:
- D10
- ESP32:
- GPIO 14
- BIN2
- Arduino Uno:
- D11
- ESP32:
- GPIO 12
- PWMB
- Arduino Uno:
- D6 (PWM)
- ESP32:
- GPIO 13
- VCC
- Arduino Uno:
- 5V
- ESP32:
- 3V3
- VM
- Arduino Uno:
- Motor battery +
- ESP32:
- Motor battery +
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
Example code
A minimal sketch to check the part works.
const int PWMA = 5, AIN1 = 7, AIN2 = 8, STBY = 9;
const int PWMB = 6, BIN1 = 10, BIN2 = 11;
void drive(int pwm, int in1, int in2, int speed) { // speed -255..255
digitalWrite(in1, speed > 0);
digitalWrite(in2, speed < 0);
analogWrite(pwm, abs(speed));
}
void setup() {
int pins[] = {PWMA, AIN1, AIN2, STBY, PWMB, BIN1, BIN2};
for (int p : pins) pinMode(p, OUTPUT);
digitalWrite(STBY, HIGH); // wake the driver
}
void loop() {
drive(PWMA, AIN1, AIN2, 180); drive(PWMB, BIN1, BIN2, 180); delay(1500);
drive(PWMA, AIN1, AIN2, -180); drive(PWMB, BIN1, BIN2, 180); delay(800); // spin
drive(PWMA, AIN1, AIN2, 0); drive(PWMB, BIN1, BIN2, 0); delay(1000);
}Setup and tuning
tie it to VCC if you never need standby; it saves a pin.
IN1 = IN2 = HIGH brakes; both LOW with PWM coasts. Braking gives sharper stops in line followers.
the 1.2 A continuous rating suits N20, BO and TT motors. Check your motor's stall current; if it is above 3 A, use a bigger driver.
the Uno default (490 Hz / 980 Hz) works; 20 kHz on an ESP32 removes motor whine.
What you need
Shop this list4 of 5 found in our store · ₹797
TB6612FNG dual motor driver module: the driver this guide coversTB6612FNG Dual Motor Driver Module₹130
N20 micro metal gear motor: a good motor match for this driverN20 Micro Metal Gear Motor₹229
ESP32-WROOM-32 38-pin development board: if you want Wi-Fi or Bluetooth controlESP32-WROOM-32 38-Pin Development Board₹389- Uno R3 development board: the controller used in the wiring tableFind this part
Dupont jumper wires: for the signal connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
Alternatives and when to choose them
Try it: Pwm duty cycle calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Leaving STBY unconnected, so nothing moves.
- Feeding VCC from the motor supply instead of the logic supply.
- Using motors whose stall current exceeds 3 A, which trips thermal shutdown.
- Soldering the header pins upside down and mixing up the A and B sides.
Frequently asked questions
Is the TB6612FNG better than the L298N?
For small battery robots, yes: it loses far less voltage and runs cool. The L298N is better only when you need more than 13.5 V or screw terminals.
Does it work with 3.3 V boards like ESP32?
Yes. Power VCC from 3.3 V and drive the inputs directly.
What is the STBY pin?
Standby. Pull it HIGH to enable the outputs; LOW turns both motors off and lowers power use.
Can it drive a stepper motor?
It can drive a small bipolar stepper using both channels, but it has no current limiting; a stepper driver is better for NEMA17.
How much current can it take?
1.2 A continuous per channel and 3.2 A peak for short bursts such as starting.
Can I run 12 V motors?
Yes, up to 13.5 V on VM. Do not use a fully charged 3S LiPo (12.6 V) with long, inductive motor leads without a capacitor across VM.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 8 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

