Search for a dual motor driver for an Arduino or ESP32 robot and the same two names keep appearing: the L298N, the big red module with a heatsink on top, and the TB6612FNG, a small breakout board that costs about the same. Plenty of tutorials treat them as interchangeable ("use whichever you have"). They are not, and the difference shows up the first time a 6 V motor runs sluggishly at full PWM because the driver itself is using up the voltage.
This guide compares the two using the manufacturers' datasheets instead of recycled spec lists. It covers how much voltage each driver wastes, how much heat that creates, what the current ratings really mean, how each one behaves with 3.3 V logic, and the wiring and code for both on an Arduino Uno and an ESP32. It also covers the module-level traps (jumpers, the onboard regulator and the standby pin) behind most "my motor driver does not work" questions.
The short answer: for almost every small robot and battery-powered build, choose the TB6612FNG. It wastes about a fifth of the voltage the L298N does, runs cool without a heatsink, works directly with 3.3 V boards and idles at around a milliamp. Choose the L298N only when the motor supply is above 13.5 V or you need its higher continuous current rating, and accept that it will be hot and inefficient.
The Quick Answer
| Your situation | Pick | Why |
|---|---|---|
| Small robot, motors under about 1 A, supply 3 to 12 V | TB6612FNG | About 0.5 V lost instead of about 2.5 V, and no heatsink |
| Battery-powered project | TB6612FNG | About 1 mA logic current and a standby pin |
| 3.3 V board (ESP32, Pico, Raspberry Pi) | TB6612FNG | Logic supply accepts 2.7 to 5.5 V |
| Motor supply above 13.5 V | L298N | Operates up to 46 V |
| Motor stalls between 1.2 A and 2 A | L298N (with a real heatsink) | 2 A DC per channel |
| Motor stalls above 2 A | Neither | Use a higher-current driver |
The rest of this guide shows where those numbers come from and how to avoid the common wiring mistakes with each board.
Two Different Technologies
The L298N and the TB6612FNG both contain two full H-bridges, so each can run two brushed DC motors forward and in reverse, or one bipolar stepper. What differs is the transistors inside.
The L298N (STMicroelectronics) is a bipolar design. Each output leg is a bipolar transistor, and even a bipolar transistor switched fully on leaves a fixed saturation voltage across it. The datasheet gives 1.35 V on the high side and 1.2 V on the low side at 1 A, and the motor current passes through both. In return it tolerates a high supply, up to 46 V in normal operation and 50 V absolute maximum, which is why it was the default choice for years. The bare chip also needs external fast flyback diodes for inductive loads; the red modules add them.
The TB6612FNG (Toshiba) uses MOSFET outputs. A MOSFET that is fully on behaves like a small resistor, and Toshiba specifies 0.5 Ω for the high-side and low-side switches combined, so the drop scales with the current instead of starting at over a volt. The trade is a much lower voltage ceiling: 13.5 V recommended and 15 V absolute maximum on the motor supply. It also adds a standby pin, thermal shutdown and low-voltage detection.
Side-by-Side Comparison
| Spec | L298N | TB6612FNG |
|---|---|---|
| Maker | STMicroelectronics | Toshiba |
| Output stage | Bipolar transistors | MOSFET |
| Motor supply | Up to 46 V (50 V absolute max), minimum about 4.8 V | 2.5 to 13.5 V (15 V absolute max), 4.5 V recommended minimum |
| Logic supply | 4.5 to 7 V (5 V typical) | 2.7 to 5.5 V |
| Continuous current per channel | 2 A DC | 1.2 A average (Pololu rates its board 1 A) |
| Peak current per channel | 3 A non-repetitive, 2.5 A repetitive | 3.2 A single pulse, 2 A for repeated 20 ms pulses at up to 20% duty |
| Voltage drop at 1 A (high + low side) | 2.55 V typical (1.8 to 3.2 V) | 0.5 V typical (0.7 V max) |
| PWM frequency | 25 kHz typical commutation frequency | Up to 100 kHz |
| Logic-high threshold | 2.3 V minimum | Works from a 2.7 to 5.5 V logic supply |
| Idle current, bridges enabled | About 13 mA (VS) plus 24 mA (VSS) typical | 1.1 to 1.5 mA, plus a standby mode |
| Protection | Overtemperature | Thermal shutdown and low-voltage detection |
| Flyback diodes | External, required (modules include them) | MOSFET outputs; Toshiba advises protection for inductive loads |
| Typical module | Red board with heatsink, 78M05 regulator, jumpers | Small breakout (Pololu, SparkFun, Adafruit and generic boards) |
Two rows decide most purchases: the voltage drop and the idle current. Everything else is a trade between voltage range and efficiency.
The Real Difference: Voltage Drop and Heat
Every volt the driver drops is a volt the motor does not get, and the lost voltage times the current becomes heat in the chip. Using the typical datasheet figures at a steady 1 A:
| Supply | Driver | Voltage at the motor | Heat in the driver | Share of supply reaching the motor |
|---|---|---|---|---|
| 6 V | L298N | about 3.5 V | about 2.6 W | about 58% |
| 6 V | TB6612FNG | about 5.5 V | about 0.5 W | about 92% |
| 12 V | L298N | about 9.5 V | about 2.6 W | about 79% |
| 12 V | TB6612FNG | about 11.5 V | about 0.5 W | about 96% |
These are calculated from the typical values in each datasheet at 25 °C. Real L298N drop at 1 A is specified anywhere from 1.8 V to 3.2 V, so treat the table as a realistic middle case, not a guarantee.
A pack of four AA cells (6 V) driving a 1 A motor through an L298N leaves roughly 3.5 V at the motor. The same motor on a TB6612FNG gets about 5.5 V. That gap is why motors feel weak on L298N robot kits, and why the usual fix, a bigger battery, mostly turns more energy into heat.
Heat follows from the same numbers. At 1 A the L298N dissipates about 2.5 W per active channel, while the TB6612FNG dissipates about 0.5 W. ST gives the L298N's junction-to-ambient thermal resistance as up to 35 °C/W for the Multiwatt package, so a single channel at 1 A with no heatsink would raise the die roughly 90 °C above ambient. With both channels loaded the chip cannot survive without a heatsink, which is why the module carries a large finned one, and why it is still too hot to touch under load. The datasheet's operating junction temperature ends at 130 °C.
The TB6612FNG's half-watt per channel is small enough that breakout boards ship with no heatsink at all, and thermal shutdown is there as a backstop if a stalled motor pushes it too far.
What the Current Ratings Really Mean
The headline figures look reversed: 2 A for the L298N and 1.2 A for the TB6612FNG. Three details change how to read them.
Size against stall current, not running current. A brushed motor that is starting or blocked can draw several times its normal current, and a driver that is fine in free spin can trip or fail when a wheel jams. Find your motor's stall current before comparing anything.
The TB6612FNG's higher figures are short pulses. Toshiba lists 1.2 A average, 3.2 A for a single pulse and 2 A for repeated 20 ms pulses at up to 20% duty. Pololu rates its breakout board more conservatively at 1 A continuous and 3 A peak. The L298N lists 2 A DC per channel, 2.5 A repetitive and 3 A non-repetitive peak.
Both can be paralleled for more. ST says an L298N with its channels paralleled (outputs 1 with 4, and 2 with 3) can drive up to 3 A DC and 3.5 A repetitive peak. Pololu rates its paralleled TB6612FNG board at 2 A continuous. If your motor stalls above those figures, neither chip is the right tool.
Logic Levels, 3.3 V Boards and Idle Current
The L298N needs a 5 V logic supply (VSS, 4.5 to 7 V). On the red module that comes from a 78M05 regulator or from your own 5 V supply. Its inputs are TTL level: the datasheet gives a logic-high threshold of 2.3 V minimum and a logic-low of up to 1.5 V, so a 3.3 V GPIO from an ESP32 or Raspberry Pi Pico drives it reliably as long as the chip's own VSS is 5 V.
The TB6612FNG's logic supply (VCC) runs from 2.7 V to 5.5 V, so a 3.3 V board can power it from the same rail with no level shifting.
Idle current is where the two differ most. With the bridges enabled and inputs low, the L298N draws a typical 13 mA from the motor supply plus 24 mA from the logic supply. The TB6612FNG draws 1.1 mA typical at 3 V and 1.5 mA at 5.5 V, and its STBY pin drops it into standby when the motors are not needed. On a battery that matters.
How You Control Each One
L298N. The enable pin (ENA or ENB) switches the bridge on, and the two input pins set the direction. You put the PWM on the enable pin. ST's own rule is to drive the enable inputs low before turning the supply on or off.
| Enable | IN1 | IN2 | Motor |
|---|---|---|---|
| HIGH | HIGH | LOW | Forward |
| HIGH | LOW | HIGH | Reverse |
| HIGH | LOW | LOW | Fast stop (brake) |
| HIGH | HIGH | HIGH | Fast stop (brake) |
| LOW | any | any | Free-running stop (coast) |
TB6612FNG. Each channel has its own PWM pin, so the two direction pins stay purely about direction, and a shared STBY pin must be HIGH for anything to move.
| IN1 | IN2 | PWM | STBY | Motor |
|---|---|---|---|---|
| HIGH | LOW | HIGH | HIGH | Clockwise |
| LOW | HIGH | HIGH | HIGH | Counter-clockwise |
| HIGH / LOW | LOW / HIGH | LOW | HIGH | Short brake during the off part of each PWM cycle |
| HIGH | HIGH | any | HIGH | Short brake |
| LOW | LOW | HIGH | HIGH | Stop (outputs off, coast) |
| any | any | any | LOW | Standby |
Note the PWM behaviour in the TB6612FNG's table: during the off part of each PWM cycle the outputs short the motor (brake) instead of letting it float, which is how Toshiba defines it.
Wiring
L298N module to Arduino Uno (motor A)
| Module pin | Connect to |
|---|---|
| 12V (VS) terminal | Motor battery +, 7 to 12 V |
| GND | Battery − and Arduino GND (common ground) |
| 5V | Output of the onboard regulator when the 5V-EN jumper is fitted |
| ENA | D9 (PWM), after removing the ENA jumper |
| IN1 | D8 |
| IN2 | D7 |
| OUT1 / OUT2 | Motor A |
⚠️ Warning
The 5V-EN jumper on the L298N module enables the onboard 78M05 regulator, which is only meant for a motor supply up to 12 V. Above 12 V, remove it and feed 5 V into the 5V terminal yourself, or the regulator can overheat. Below roughly 7 V the regulator has no headroom, so feed 5 V yourself there as well. The ENA and ENB jumpers tie the enable pins to 5 V: leave one on and that motor runs at full speed, and a wire from a PWM pin fights the jumper. Remove them for speed control.
TB6612FNG breakout to Arduino Uno (motor A)
| Breakout pin | Connect to |
|---|---|
| VM | Motor battery +, 4.5 to 13.5 V |
| VCC | Arduino 5V (or 3.3 V on a 3.3 V board) |
| GND | Battery − and Arduino GND (common ground) |
| STBY | D6 (or tie directly to VCC) |
| PWMA | D5 (PWM) |
| AIN1 | D7 |
| AIN2 | D8 |
| AO1 / AO2 | Motor A |
Add a bulk capacitor across VM and GND close to the board: Toshiba's application circuit shows capacitors on the motor supply to absorb noise.
On an ESP32, use GPIO 25 for PWMA, 26 for AIN1, 27 for AIN2 and 33 for STBY, and connect VCC to 3V3. Avoid the strapping pins (GPIO 0, 2, 5, 12 and 15) for motor control, because their state at boot can change how the board starts. The ESP32 pinout guide lists which pins are safe.
⚠️ Warning
If a TB6612FNG does nothing and you have checked the wiring, look at STBY first. Pololu notes that STBY defaults low, which keeps the chip in standby, so it must be connected to VCC or driven HIGH. Also confirm the grounds are common: a motor supply ground that is not tied to the microcontroller ground is the other classic cause.
The Code
Both sketches expose a motorA(speed) function that takes -255 to 255, so swapping drivers later only changes the pin setup. First the L298N. Remove the ENA jumper before you run it, or the speed will not change.
The TB6612FNG version is almost the same, with one extra line to take the chip out of standby and a brake function that uses its short-brake mode:
💡 Tip
An Arduino Uno runs analogWrite() at about 490 Hz on most pins and about 980 Hz on pins 5 and 6, which is within hearing range and shows up as a whine from the motor. The TB6612FNG accepts PWM up to 100 kHz, and the L298N lists 25 kHz as its typical commutation frequency, so on an ESP32 a PWM frequency of 20 kHz is a good silent choice for either driver.
On an ESP32 the only change is the PWM setup. This version uses the current ESP32 Arduino core (3.x) and a 20 kHz PWM frequency:
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| L298N: motor is slow or weak even at full PWM | The driver drops about 2.5 V at 1 A | Raise the supply, use a motor rated for the lower voltage, or switch to a TB6612FNG |
| L298N: driver too hot to touch | Dissipating 2.5 W or more per channel | Reduce the load, add airflow or a larger heatsink, or change driver |
| L298N: motor runs at full speed and ignores PWM | ENA jumper still fitted | Remove the ENA and ENB jumpers and wire the pins to PWM outputs |
| L298N: regulator overheats on a 12 V or larger pack | 5V-EN jumper fitted above 12 V | Remove the jumper and supply 5 V separately |
| TB6612FNG: nothing moves | STBY low or floating | Tie STBY to VCC or drive it HIGH |
| TB6612FNG: motor starts, then stops, driver warm | Stall current above the rating, thermal shutdown | Check stall current and use a smaller motor or a stronger driver |
| Either: microcontroller resets when the motor starts | Supply sag or noise from the motor | Power motors separately, add a bulk capacitor at the driver supply, keep a common ground |
| Either: only one direction works | Loose or swapped IN wires | Re-check IN1 and IN2, or swap the motor leads |
| Either: motor whines at low speed | PWM frequency within hearing range | Raise the PWM frequency (20 kHz on an ESP32) |
Choosing by Project
| Project | Pick | Why |
|---|---|---|
| 2WD or 4WD robot car with TT gear motors, 4 AA or 2 Li-ion cells | TB6612FNG | Keeps the voltage small motors need |
| Line follower with N20 micro gearmotors | TB6612FNG | Low current, tiny board, 3.3 V logic |
| ESP32 battery robot | TB6612FNG | 3.3 V logic supply and a standby pin |
| 12 V motor with stall current above 1.2 A (small pump, wiper) | L298N with a heatsink | It rates 2 A DC per channel |
| 24 V motor | L298N | The only one of the two that accepts it |
| Small bipolar stepper | Either, with care | Neither regulates motor current, so match the motor's rated voltage to the supply or use a dedicated stepper driver |
| Motor stalling above 2 A | Neither | Use a higher-current driver |
| Classroom kit that already includes an L298N | L298N | It works with small loads; keep a heatsink fitted |
If neither fits, a single-channel brushed-motor driver module (a BTS7960-based board for large motors, or a DRV8871-class driver for mid-range ones) is the usual next step.
Verdict
If your motors run on 12 V or less and stall below about 1.2 A (nearly every hobby robot), the TB6612FNG is the better driver. It delivers most of the battery voltage to the motor, stays cool, runs from 3.3 V logic and sips power, in a board a fraction of the size.
If your motor supply is above 13.5 V, or the motor stalls between 1.2 A and 2 A, the L298N is the cheap, familiar option and the only one of the two that can do it. Fit the heatsink, keep an eye on the jumpers, and plan for the 2 to 3 V it will take off the top.
If the motor stalls above 2 A, skip both and pick a driver designed for that current.
Quick Answers to Common Questions
Is the TB6612FNG better than the L298N? For low-voltage, small motors, yes: lower voltage drop, far less heat, a smaller board and 3.3 V logic. The L298N wins only on supply voltage and continuous current.
Can the TB6612FNG run 12 V motors? Yes. The motor supply is rated 4.5 to 13.5 V recommended, with 15 V absolute maximum, as long as the motor's stall current stays within about 1.2 A.
Can I drive an L298N from a 3.3 V ESP32? Yes, if the L298N's logic supply is 5 V. Its input-high threshold is 2.3 V, which 3.3 V outputs exceed.
Why does my L298N get so hot? Its bipolar outputs drop about 2.5 V at 1 A, and that drop turns into heat in the chip.
Can I power my Arduino from the L298N's 5V pin? Yes, but only when the 5V-EN jumper is fitted and the motor supply is 12 V or less. The regulator on the module is small, so do not use it for much more than the Arduino.
Do I need flyback diodes? The bare L298N chip requires them, and the red modules include them. Toshiba advises adding protection for inductive loads on the TB6612FNG, and the breakout boards are built accordingly.
Is the L298N obsolete? ST still publishes the datasheet (revised October 2023), so it is documented and available, but it is an older bipolar design that wastes more than modern MOSFET drivers.
Can I run four motors from two TB6612FNG boards? Yes. Each board drives two motors, and each needs its own STBY connection.
Where to Go Next
Once the driver is chosen, the next decisions are the pins and the power. The ESP32 pinout guide shows which GPIOs are safe for PWM and direction, and the Arduino Uno pinout guide lists which Uno pins carry PWM.
Sources and Further Reading
- STMicroelectronics L298 datasheet (DS0218, revision 5, October 2023): absolute maximum ratings, saturation voltages, logic thresholds and quiescent currents. ST's L298 product page holds the current version.
- Toshiba TB6612FNG datasheet: supply ranges, output current, 0.5 Ω combined on-resistance, saturation voltage, function modes and typical application circuit.
- Pololu TB6612FNG dual motor driver carrier: the 1 A continuous, 3 A peak and 2 A paralleled board ratings, the 100 kHz PWM limit and the STBY note.
- Components101 TB6612FNG page: pulse-current ratings restated from the datasheet.
- SunFounder L298N module documentation and a generic L298N board schematic analysis: the 78M05 regulator, the 5V-EN jumper and the ENA/ENB jumpers.
The voltage-drop, heat and efficiency figures in this article are calculated from the typical datasheet values at 25 °C and a steady 1 A. Real devices vary with temperature, supply voltage and unit-to-unit spread.
