Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Notes: For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.
After years of using the L298N for motor control projects, switching to the TB6612FNG felt like upgrading from a CRT monitor to an LED display. The difference isn’t just incremental—it’s transformational. The efficiency gains, reduced heat generation, and compact form factor make the TB6612FNG Arduino combination the smart choice for modern robotics projects.
When I first encountered the TB6612FNG on a client’s PCB layout, I was skeptical about abandoning the familiar L298N. But after measuring the voltage drop characteristics and thermal performance under real-world loads, the engineering advantages became impossible to ignore. This tutorial shares what I’ve learned implementing this MOSFET-based driver across dozens of Arduino motor control systems.
Why the TB6612FNG Outperforms Traditional Drivers
The TB6612FNG represents a fundamental shift in H-bridge motor driver design. Unlike the L298N’s bipolar junction transistor (BJT) architecture, the TB6612FNG uses MOSFET technology throughout the H-bridge circuit. This seemingly simple change cascades into significant performance improvements.
MOSFETs have dramatically lower on-resistance compared to BJTs. While the L298N wastes 2-4V across its internal transistors, the TB6612FNG typically drops only 0.2-0.5V at equivalent currents. For a 6V motor, this means the difference between delivering 4V (L298N) versus 5.7V (TB6612FNG) to your motor terminals. That’s 30% more usable voltage reaching your motors.
The thermal story is equally compelling. At 1A continuous current, the L298N dissipates approximately 4W as heat (2V drop × 2A across both channels). The TB6612FNG generates roughly 0.5W under identical conditions. This four-fold reduction in heat generation means smaller PCB footprints, no mandatory heatsinks for moderate loads, and improved reliability.
TB6612FNG Arduino Technical Specifications
Understanding the electrical limits prevents costly mistakes during design. Here’s the complete specification table:
Parameter
Specification
Notes
Motor Supply Voltage (VM)
2.5V – 13.5V
Absolute maximum 15V
Logic Supply Voltage (VCC)
2.7V – 5.5V
Compatible with 3.3V and 5V logic
Continuous Output Current
1.2A per channel
Per H-bridge, ambient temp dependent
Peak Output Current
3.2A per channel
Brief transients only, milliseconds
Output Voltage Drop
0.2V – 0.5V
MOSFET saturation voltage
PWM Frequency Range
DC – 100kHz
Optimal range 1kHz – 20kHz
Logic Input HIGH (VIH)
VCC × 0.7 minimum
Typically 3.5V for 5V logic
Logic Input LOW (VIL)
VCC × 0.3 maximum
Typically 1.5V for 5V logic
Thermal Shutdown
175°C junction temp
Automatic protection
Standby Current
1μA typical
STBY pin LOW
Operating Temperature
-20°C to 85°C
Ambient temperature
Package Type
SSOP24
Surface mount on breakout boards
Current Rating Reality Check
The 1.2A continuous rating deserves careful attention. This value assumes adequate thermal management and 25°C ambient temperature. In practice, continuous current capability decreases with rising ambient temperature and poor airflow.
For conservative design, I recommend limiting continuous current to 1A per channel when operating in enclosed spaces without forced cooling. The 3.2A peak rating applies to motor startup transients lasting under 100ms. Sustained operation at 3A will trigger thermal shutdown.
TB6612FNG Pinout and Connections
The TB6612FNG breakout modules organize pins logically: control inputs on one side, power and motor outputs on the opposite side. This separation simplifies PCB layout and reduces the risk of wiring errors.
Complete Pin Reference Table
Pin Name
Type
Function
Voltage Level
VM
Power Input
Motor power supply
2.5V – 13.5V
VCC
Power Input
Logic power supply
2.7V – 5.5V
GND
Ground
Common ground reference
0V
STBY
Digital Input
Standby control (active HIGH)
VCC level
AIN1
Digital Input
Motor A direction control 1
VCC level
AIN2
Digital Input
Motor A direction control 2
VCC level
PWMA
PWM Input
Motor A speed control
0V – VCC
AO1
Power Output
Motor A output terminal 1
Variable
AO2
Power Output
Motor A output terminal 2
Variable
BIN1
Digital Input
Motor B direction control 1
VCC level
BIN2
Digital Input
Motor B direction control 2
VCC level
PWMB
PWM Input
Motor B speed control
0V – VCC
BO1
Power Output
Motor B output terminal 1
Variable
BO2
Power Output
Motor B output terminal 2
Variable
The Critical STBY Pin
Here’s a detail that catches beginners constantly: the STBY (standby) pin must be driven HIGH for motors to operate. When STBY is LOW, the TB6612FNG enters low-power mode with all outputs disabled, drawing only 1μA.
Many breakout boards don’t include pull-up resistors on STBY, so leaving it floating results in non-functional motors. Your options:
Connect STBY directly to VCC for always-on operation
Connect STBY to an Arduino GPIO pin for software power management
Add external 10kΩ pull-up resistor to VCC
For battery-powered applications, controlling STBY via GPIO enables significant power savings when motors aren’t needed.
Motor Control Logic and Truth Table
The TB6612FNG uses a straightforward two-input direction control scheme for each motor channel. Understanding this logic is essential for correct operation.
Motor Channel Control Truth Table
AIN1/BIN1
AIN2/BIN2
PWMA/PWMB
Motor Action
HIGH
LOW
PWM
Forward rotation at PWM speed
LOW
HIGH
PWM
Reverse rotation at PWM speed
LOW
LOW
Any
Short brake (fast stop)
HIGH
HIGH
Any
Short brake (fast stop)
Any
Any
LOW (0V)
Stop (coast)
N/A
N/A
N/A
STBY LOW = All outputs disabled
Short Brake vs Coast: When both direction inputs are equal (both HIGH or both LOW), the motor terminals short together through the low-resistance MOSFETs. This creates electromagnetic braking, rapidly stopping rotation. With PWM at 0V, the motor coasts freely to a stop via mechanical friction.
Wiring TB6612FNG Arduino Connection
Proper wiring prevents the majority of issues. Follow this systematic approach for reliable connections.
Critical Grounding Rule: Arduino ground, TB6612FNG ground, and motor power supply ground MUST connect together. Missing common ground causes erratic behavior, random operation, and potential damage.
PWM Pin Requirements: PWMA and PWMB must connect to Arduino pins capable of PWM output (marked with ~ on Arduino UNO: pins 3, 5, 6, 9, 10, 11). Direction pins (AINx, BINx) can use any digital GPIO.
Basic TB6612FNG Arduino Code
Let’s implement motor control without external libraries first, demonstrating the fundamental principles.
// TB6612FNG Motor Driver – Basic Control
// Single motor example
// Motor A pin definitions
const int PWMA = 5; // PWM pin for speed control
const int AIN1 = 7; // Direction control
const int AIN2 = 8; // Direction control
const int STBY = 11; // Standby control
void setup() {
// Configure all pins as outputs
pinMode(PWMA, OUTPUT);
pinMode(AIN1, OUTPUT);
pinMode(AIN2, OUTPUT);
pinMode(STBY, OUTPUT);
// Enable the driver (exit standby mode)
digitalWrite(STBY, HIGH);
// Initialize motor stopped
digitalWrite(AIN1, LOW);
digitalWrite(AIN2, LOW);
analogWrite(PWMA, 0);
}
void loop() {
// Forward at 70% speed
digitalWrite(AIN1, HIGH);
digitalWrite(AIN2, LOW);
analogWrite(PWMA, 179); // 179/255 ≈ 70%
delay(2000);
// Stop (coast)
analogWrite(PWMA, 0);
delay(1000);
// Reverse at 50% speed
digitalWrite(AIN1, LOW);
digitalWrite(AIN2, HIGH);
analogWrite(PWMA, 128); // 128/255 = 50%
delay(2000);
// Short brake
digitalWrite(AIN1, HIGH);
digitalWrite(AIN2, HIGH);
delay(500);
// Enter standby mode to save power
digitalWrite(STBY, LOW);
delay(1000);
// Exit standby for next cycle
digitalWrite(STBY, HIGH);
delay(100);
}
Robot Car Implementation with SparkFun Library
For production projects, using SparkFun’s TB6612FNG library simplifies code and reduces errors. The library provides clean abstractions for motor control operations.
Library Installation
Open Arduino IDE → Sketch → Include Library → Manage Libraries. Search for “SparkFun TB6612FNG” and install the latest version.
// Motor offset values (1 or -1 to correct direction)
const int offsetA = 1;
const int offsetB = 1;
// Initialize motor objects
Motor motorLeft = Motor(AIN1, AIN2, PWMA, offsetA, STBY);
Motor motorRight = Motor(BIN1, BIN2, PWMB, offsetB, STBY);
void setup() {
// Nothing required – library handles pin modes
}
void loop() {
// Move forward for 2 seconds
forward(motorLeft, motorRight, 200);
delay(2000);
// Turn right
right(motorLeft, motorRight, 150);
delay(800);
// Move backward
back(motorLeft, motorRight, 180);
delay(2000);
// Turn left
left(motorLeft, motorRight, 150);
delay(800);
// Stop and brake
brake(motorLeft, motorRight);
delay(2000);
}
// Custom movement functions
void forward(Motor motor1, Motor motor2, int speed) {
motor1.drive(speed);
motor2.drive(speed);
}
void back(Motor motor1, Motor motor2, int speed) {
motor1.drive(-speed);
motor2.drive(-speed);
}
void left(Motor motor1, Motor motor2, int speed) {
motor1.drive(-speed);
motor2.drive(speed);
}
void right(Motor motor1, Motor motor2, int speed) {
motor1.drive(speed);
motor2.drive(-speed);
}
void stop() {
motorLeft.drive(0);
motorRight.drive(0);
}
void brake(Motor motor1, Motor motor2) {
motor1.brake();
motor2.brake();
}
Advanced Speed Control Techniques
PWM frequency affects motor performance in subtle ways. Arduino’s default PWM frequency varies by pin: approximately 490Hz for most pins, 980Hz for pins 5 and 6.
Optimizing PWM Frequency
For quieter, smoother operation, increase PWM frequency to 8kHz-31kHz range:
void setup() {
// Increase PWM frequency on pins 5 & 6 to ~31kHz
TCCR0B = TCCR0B & 0b11111000 | 0x01;
// Increase PWM frequency on pins 9 & 10 to ~31kHz
TCCR1B = TCCR1B & 0b11111000 | 0x01;
// Note: This affects delay() and millis() timing
// Use micros() for accurate timing after modification
}
Higher frequencies reduce audible motor whine but slightly increase switching losses in the MOSFETs. For most applications, 8-16kHz represents the optimal balance.
Troubleshooting Common TB6612FNG Arduino Issues
Motors Don’t Run
Check STBY pin first: Verify STBY is HIGH. Measure with multimeter—should read VCC voltage (typically 5V). If STBY is floating or LOW, motors remain disabled.
Verify power supply: Measure VM pin voltage under load. Should remain within 2.5-13.5V range. Weak power supplies sag under motor startup current, causing brownouts.
Confirm PWM connections: PWMA and PWMB must connect to Arduino PWM-capable pins. Check your board’s pin capabilities—not all digital pins support PWM.
Motors Run Weakly
Insufficient supply voltage: Remember the minimal voltage drop. For 6V motors, supply at least 6.5V to VM to account for the 0.5V maximum drop at 1A.
Power supply current limiting: Motors draw peak current during startup and under load. Ensure power supply provides 2A+ continuous capacity for dual motor operation.
Code PWM value too low: Verify analogWrite() values. Remember 255 is full speed, 128 is half speed. Values below 50 may not generate enough torque to overcome friction.
Random Direction Changes
Ground loop problems: Verify all grounds connect together at a single point. Use thick wire (22AWG minimum) for ground connections. Poor grounds cause voltage reference fluctuations.
EMI interference: Motor switching generates electrical noise. Add 0.1μF ceramic capacitors across each motor terminal to suppress high-frequency noise.
Driver Overheating
Excessive current draw: Measure motor current with ammeter. If exceeding 1A continuous, motors are too large for this driver. Upgrade to higher-current driver or reduce load.
Inadequate cooling: While the TB6612FNG generates less heat than L298N, sustained 1A+ operation requires airflow or heatsinking. Add small aluminum heatsink to SSOP24 package.
TB6612FNG vs L298N Comparison
Engineers frequently ask which driver to choose. Here’s the objective comparison:
Feature
TB6612FNG
L298N
Technology
MOSFET H-Bridge
BJT H-Bridge
Continuous Current
1.2A per channel
2A per channel
Peak Current
3.2A
3A
Voltage Drop
0.2V – 0.5V
2V – 4V
Operating Voltage
2.5V – 13.5V
5V – 46V
Efficiency
~95%
~70%
Power Dissipation
Low
High
Heatsink Required
Optional
Mandatory
PCB Footprint
Small (20mm × 20mm typical)
Large (45mm × 45mm typical)
Low Voltage Motors
Excellent (3V-6V)
Poor (minimum 5V)
High Voltage Motors
Limited (13.5V max)
Excellent (up to 46V)
Cost
Moderate
Low
Choose TB6612FNG when:
Using low-voltage motors (3V-12V)
Efficiency matters (battery-powered projects)
Space is limited
Heat generation is a concern
Motors draw under 1.2A continuous
Choose L298N when:
Using high-voltage motors (>13.5V)
Motors require >1.2A continuous current
Working with very high-power motors
Cost is the primary constraint
Voltage drop is less critical
Practical Applications
Line Following Robot
Combine motor control with sensor feedback for autonomous navigation:
// Line follower using IR sensors and TB6612FNG
const int leftSensor = A0;
const int rightSensor = A1;
void loop() {
int leftValue = analogRead(leftSensor);
int rightValue = analogRead(rightSensor);
if (leftValue < 500 && rightValue < 500) {
// Both sensors on white – move forward
forward(motorLeft, motorRight, 200);
} else if (leftValue > 500) {
// Left sensor on black – turn left
left(motorLeft, motorRight, 150);
} else if (rightValue > 500) {
// Right sensor on black – turn right
right(motorLeft, motorRight, 150);
}
}
Obstacle Avoiding Robot
Integrate ultrasonic sensor for collision avoidance:
// Obstacle avoidance with HC-SR04 ultrasonic sensor
Yes, the TB6612FNG can control one bipolar stepper motor using both channels. Connect stepper coil A to AO1/AO2 and coil B to BO1/BO2. You’ll need to implement proper stepping sequences in your code, toggling the direction pins in the correct order to create rotation. The SparkFun library doesn’t include stepper functions, so you’ll need to write custom stepping logic or use a dedicated stepper library adapted for the TB6612FNG pinout.
Q: Why does my motor direction reverse unexpectedly?
This typically indicates either loose wire connections that intermittently make contact, or EMI from the motors coupling into the control wires. Solutions: First, ensure all screw terminal connections are tight. Second, add 0.1μF ceramic capacitors directly across motor terminals to suppress electrical noise. Third, use twisted pair wiring for the AINx/BINx connections to reduce electromagnetic interference pickup. Finally, verify your code logic—accidental pin state changes can cause apparent direction reversals.
Q: Can I parallel both channels to drive a single high-current motor?
No, paralleling channels is not recommended and not supported by Toshiba. The TB6612FNG lacks the necessary current-sharing circuitry to ensure equal distribution between paralleled outputs. Small timing differences in MOSFET switching can cause one channel to carry most of the current, leading to thermal shutdown or damage. For motors requiring >1.2A continuous, use a higher-current driver like the BTS7960 (43A capability) or VNH5019 (12A capability).
Q: What’s the minimum motor voltage the TB6612FNG can drive effectively?
The TB6612FNG works excellently with motors as low as 3V, making it ideal for small hobby motors and micro gearmotors. The 0.2-0.5V voltage drop means a 3V motor receives 2.5-2.8V at full PWM—still 83-93% of rated voltage. This is where the TB6612FNG shines compared to the L298N, which would drop the 3V supply below the motor’s operating threshold entirely. For 1.5V motors, expect marginal performance as the voltage drop becomes significant relative to supply voltage.
Q: How do I implement soft start to prevent current spikes?
Implement gradual PWM ramping in your code rather than instantly switching to full speed. This reduces inrush current and mechanical stress on gears:
void softStart(Motor motor, int targetSpeed, int rampTime) {
This approach gradually increases current draw, preventing voltage sag on the power supply and reducing gear wear in robotic applications.
Conclusion
The TB6612FNG Arduino combination represents modern motor control engineering done right. MOSFET technology delivers the efficiency and thermal performance that BJT-based drivers simply cannot match. The minimal voltage drop preserves precious battery capacity in portable projects, while the compact form factor enables smaller, lighter robot designs.
From a PCB engineering perspective, the TB6612FNG demonstrates how component-level improvements cascade into system-level advantages. Lower power dissipation means simplified thermal management, reduced PCB copper requirements, and improved reliability. The integrated protection features—thermal shutdown, undervoltage lockout—provide defense-in-depth against common failure modes.
Understanding the current limitations is critical for successful implementation. The 1.2A continuous rating is real and must be respected in thermal budget calculations. For motors drawing 800mA-1A continuously, add heatsinking and ensure adequate airflow. Beyond 1.2A sustained, migrate to higher-current drivers.
The TB6612FNG excels in the 3V-12V motor range where most hobby robotics, educational platforms, and prototype systems operate. This sweet spot encompasses TT motors, BO motors, micro gearmotors, and small brushed motors that power the majority of DIY projects. Combined with Arduino’s accessible programming environment and the mature SparkFun library, the TB6612FNG enables reliable motor control with minimal development effort.
Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Notes: For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.