The L298N motor controller is a dual H-bridge driver best suited for driving two brushed DC motors (up to 2A per channel, 3A peak) or one bipolar stepper motor, operating between 5V and 35V. It is the right choice for low-cost, low-speed robotics (like 2WD/4WD smart cars) but is a poor fit for high-efficiency or high-current applications due to its high internal voltage drop (approx. 2V-3V) and thermal limitations. If your load demands high efficiency, battery conservation, or precise current control, you need a modern MOSFET-based driver instead.
Motor Type Compatibility and Load Profiling
Before wiring up an L298N module, you must verify that your motor type actually matches the driver's internal architecture. The L298N relies on older Bipolar Junction Transistor (BJT) technology, which dictates how it handles different load profiles. It natively supports brushed DC motors and bipolar steppers, but it cannot drive unipolar steppers or RC servos without external circuitry.
| Motor Type | Torque Curve Profile | Control Needs | Avg Cost | L298N Fit |
|---|---|---|---|---|
| Brushed DC | High starting torque, drops linearly with speed | Simple PWM for speed, H-bridge for direction | $2 - $15 | Native (Dual Channel) |
| Bipolar Stepper | High holding torque at zero RPM, drops at high speed | Dual H-bridge phase sequencing (microstepping limited) | $10 - $30 | Native (Uses both channels) |
| Unipolar Stepper | Lower torque, utilizes center-tap winding | Simple transistor array switching (high-side) | $8 - $25 | Incompatible (Requires center taps) |
| RC Servo | High precise torque at low speed, internal gearing | 50Hz PWM pulse width (1ms to 2ms) | $5 - $20 | Incompatible (Needs direct MCU PWM) |
For hobby robotics, the brushed DC gearmotor (like the ubiquitous yellow TT motor or 37mm planetary gearmotors) is the most common pairing. The L298N allows you to control both speed and direction using Pulse Width Modulation (PWM) on the Enable pins and logic HIGH/LOW on the Input pins. For a comprehensive breakdown of how brushed DC motors behave under varying loads, refer to the Pololu Brushed DC Motor Guide, which details the relationship between torque, speed, and current draw.
Terminal Identification and Sizing Rules
A standard L298N breakout module exposes several screw terminals and header pins. Misidentifying the power rails is the most common cause of bricked microcontrollers.
Wiring and Terminal Identification
- 12V / VCC Terminal: The main motor power supply input (5V to 35V DC). Do not exceed 35V, or the IC will suffer avalanche breakdown.
- GND Terminal: The common ground for the motor supply, the L298N logic, and your microcontroller. This must be shared with your Arduino/ESP32 GND.
- 5V Terminal: An output from the onboard 7805 linear voltage regulator. It can power a low-draw microcontroller, but only if the VCC input is under 12V. If VCC is >12V, you must remove the jumper cap on the 5V EN pins to prevent the regulator from overheating.
- OUT1 / OUT2 & OUT3 / OUT4: The high-current motor outputs. Polarity does not matter for DC motors; swapping them simply reverses the default direction.
- ENA / ENB: Enable pins for Channel A and B. Must be driven with a PWM signal from your MCU for speed control. Leave the jumper caps on if you only need 100% speed.
- IN1, IN2, IN3, IN4: Logic inputs (5V tolerant). IN1/IN2 control Channel A direction; IN3/IN4 control Channel B.
The Sizing Rule of Thumb: Respect the Voltage Drop
The STMicroelectronics L298N Datasheet claims a maximum continuous current of 2A per channel. In practice, you should never exceed 1.5A continuous per channel without forced air cooling. More importantly, you must account for the BJT saturation voltage drop.
Worked Load Example: 12V Planetary Gearmotor
Let's size an L298N channel for a 12V 37mm planetary gearmotor driving a small conveyor belt.
- Motor Specs: 12V nominal, 100 RPM, No-load current = 80mA, Running current = 300mA, Stall current = 1.4A.
- Power Supply: 12V 5A switching supply connected to VCC.
- Running State: At 300mA, the L298N voltage drop is roughly 1.8V. The motor receives 10.2V. Power dissipated by the L298N IC = 1.8V × 0.3A = 0.54W. The stock heatsink handles this easily; the module will feel warm but safe.
- Stall State (Jam): The belt jams, and the motor stalls, drawing 1.4A. The voltage drop spikes to ~2.8V. The motor receives 9.2V (which keeps it humming). Power dissipated by the IC = 2.8V × 1.4A = 3.92W. The junction temperature will rapidly climb toward the 150°C thermal shutdown threshold. If the jam isn't cleared in 10-15 seconds, the L298N will cut power to protect itself.
This example proves the L298N is adequate for this load profile, provided the mechanical design prevents prolonged stalls.
Diagnosing Failure Signatures: Hum, Overheat, and Stall
When an L298N circuit misbehaves, the physical symptoms on the bench point directly to the underlying electrical fault. Here is how to read the failure signatures.
1. The "Hum and Heat" Signature (Thermal Overload)
Symptom: The motor runs for a few minutes, then slows down and stops. The L298N heatsink is too hot to touch (>60°C). After a minute of cooling, it starts again.
Cause: You are hitting the internal thermal shutdown circuit. As the BJT junctions heat up, their on-resistance increases, which increases the voltage drop, which generates more heat (thermal runaway). Eventually, the silicon hits 150°C and the IC disables the outputs.
Fix: Reduce the continuous current draw, add a 5V fan blowing directly on the heatsink, or upgrade to a MOSFET-based driver like the TB6612FNG which has a voltage drop of only ~0.5V.
2. The "Dead Hum" Signature (Stall and Logic Brownout)
Symptom: The motor emits a low hum but the shaft does not turn. Simultaneously, your Arduino or ESP32 randomly resets or drops its serial connection when the motor is commanded to start.
Cause: This is a compound failure. The motor is stalled (drawing peak current), causing a massive voltage sag on the main 12V rail. Because the L298N module's onboard 5V regulator is tied to this sagging rail, the 5V output drops to 3.5V, triggering a brownout reset on your microcontroller.
Fix: Remove the 5V jumper cap on the L298N. Power your microcontroller from a separate, dedicated 5V buck converter or USB supply. Share only the GND wire between the high-current motor loop and the low-current logic loop.
3. The "One-Direction Only" Signature (Blown H-Bridge Half)
Symptom: The motor spins perfectly in one direction, but does nothing (no hum, no movement) when the logic pins are reversed.
Cause: You have blown one half of the H-bridge. This almost always happens due to inductive kickback (back-EMF) when switching directions abruptly at high speeds without giving the motor time to coast, or from a short circuit on the output terminals. While L298N modules include built-in 1N4007 flyback diodes, they are relatively slow to react to fast PWM switching spikes.
Fix: The L298N IC is dead and must be desoldered and replaced (or the module scrapped). To prevent this in the future, implement a 50ms "coast" delay in your code when switching from FORWARD to REVERSE, allowing the back-EMF to dissipate through the diodes before applying reverse voltage.
When to Ditch the L298N for Modern Alternatives
The L298N is a legacy IC designed in the 1980s. It remains popular solely because of its low cost (usually $2 to $4 per module) and rugged, through-hole packaging that survives beginner wiring mistakes. However, it is fundamentally inefficient.
If you are building a battery-powered robot where runtime matters, or if you are driving low-voltage motors (3V to 6V) where a 2.5V drop represents a massive percentage of your supply voltage, you should upgrade your bill of materials. The TB6612FNG uses MOSFETs instead of BJTs, dropping only ~0.5V at 1.2A, and costs about $5 to $8. For single-channel high-current applications (up to 3.6A), the DRV8871 breakout boards offer superior thermal performance and built-in current limiting, protecting both the driver and your power supply from dead-short scenarios.






