Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Motors & Motion
  4. ›TB6612FNG motor driver

Component guide · Beginner · 4 min read

TB6612FNG motor driver

Pinout, Wiring and Code

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the TB6612FNG motor driver isTB6612FNG motor driver pinoutWiring the TB6612FNG motor driverExample codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Short answer

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
01

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.

02

TB6612FNG motor driver pinout

The pins on the TB6612FNG motor driver and what each one does.

PinFunction
VMMotor supply 4.5 to 13.5 V
VCCLogic supply 2.7 to 5.5 V (from the controller)
GNDGround (all GND pins joined)
STBYStandby: HIGH = run, LOW = both channels off
AIN1, AIN2Direction for motor A
PWMASpeed (PWM) for motor A
BIN1, BIN2Direction for motor B
PWMBSpeed (PWM) for motor B
AO1, AO2 / BO1, BO2Motor A and motor B outputs
PinFunction
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
03

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 pinArduino UnoESP32
PWMAD5 (PWM)GPIO 25
AIN1D7GPIO 26
AIN2D8GPIO 27
STBYD9 (or 5V)GPIO 33 (or 3V3)
BIN1D10GPIO 14
BIN2D11GPIO 12
PWMBD6 (PWM)GPIO 13
VCC5V3V3
VMMotor battery +Motor battery +
GNDGNDGND
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
04

Example code

A minimal sketch to check the part works.

Two motors with direction and speed · Arduino C++Verify & upload in Electrolark
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);
}
05

Setup and tuning

STBY

tie it to VCC if you never need standby; it saves a pin.

Brake vs coast

IN1 = IN2 = HIGH brakes; both LOW with PWM coasts. Braking gives sharper stops in line followers.

Motor match

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.

PWM frequency

the Uno default (490 Hz / 980 Hz) works; 20 kHz on an ESP32 removes motor whine.

06

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
07

Alternatives and when to choose them

  • ✓L298N: higher voltage (up to 35 V) and screw terminals, but about 2 V loss and more heat.
  • ✓DRV8833: similar size, lower voltage range (2.7 to 10.8 V), good for single Li-ion cells.
  • ✓BTS7960: for motors that draw many amps.
08

Try it: Pwm duty cycle calculator

Change the values and the diagram and results update as you type.

09

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.
10

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

  • TB6612FNG Dual Motor Driver Module
    ₹130View
  • N20 Micro Metal Gear Motor
    ₹229View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
Shop DC Motor Drivers

Calculators

Pwm duty cycle calculatorMotor power torque calculator

Terms in this guide

H-bridgeA circuit of four switches that can drive a motor in both directions.Stall currentThe current a motor draws when its shaft is blocked; the maximum it will draw.

Projects that use it

Put this into practice: 8 step-by-step builds in our project library use parts from this guide.

Beginner · 1 hourDC fan speed controllerView projectBeginner · 1 hourTemperature-controlled laptop stand fanView projectIntermediate · 1–2 hours555 PWM motor speed controllerView project
Browse all 8 projects

Keep learning

ComparisonBeginnerMotor Drivers ExplainedA motor driver lets a low-power microcontroller control the speed and direction of motors using an H-bridge.4 min read · Motors & MotionComponent guideBeginnerDC Motors ExplainedA brushed DC motor spins when current flows through it: voltage sets the speed and the load sets the current it draws.4 min read · Motors & MotionHow-toIntermediateLine Follower RobotA line follower uses a row of infrared reflective sensors (TCRT5000 type) under the robot to see a black line on a white floor, and steers two DC motors to keep the line centred.3 min read · RoboticsConcept explainerBeginnerPWM ExplainedPWM (pulse-width modulation) switches a pin fully on and off very quickly; the share of time it is on, the duty cycle, sets the average power.3 min read · Electronics FundamentalsHow-toIntermediatePower Planning for RobotsList every load with its normal and stall current, then pick a battery that can supply the total peak and last long enough.3 min read · Robotics

Sources

  • TB6612FNG datasheet (Toshiba)

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the TB6612FNG motor driver isTB6612FNG motor driver pinoutWiring the TB6612FNG motor driverExample codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide (Arduino Uno)3 items · ₹563

TB6612FNG Dual Motor Driver Module · N20 Micro Metal Gear Motor · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output

Both forward 1.5 s, spin in place 0.8 s, stop 1 s.

Motor A fwd 71%
Motor B fwd 71%

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question