The L298N (ln298) Motor Driver: Quick Verdict & Sizing Rule of Thumb
The L298N (frequently searched as the ln298 motor driver due to a common visual typo) is a classic dual full-bridge (H-bridge) motor driver IC originally designed by STMicroelectronics. It is the default prototyping choice for driving two brushed DC motors bidirectionally or one bipolar stepper motor. However, its older bipolar junction transistor (BJT) topology comes with a massive catch: a high voltage drop and significant heat generation.
The Sizing Rule of Thumb: Never exceed 80% of the L298N’s 2A peak channel rating for continuous operation. Your maximum continuous current per channel should be 1.6A. Furthermore, you must account for the internal voltage drop, which typically sits between 1.8V and 2.5V depending on the current draw.
You have a 12V DC gear motor with a stall current of 1.5A and a running current of 0.8A.
1. Voltage at Motor: 12V (Supply) - 2.0V (L298N drop at 0.8A) = 10V actual delivered to the motor.
2. Power Dissipation in Driver: 2.0V (drop) × 0.8A (running) = 1.6W. At stall (1.5A), the drop rises to ~2.5V, dissipating 3.75W as pure heat.
Verdict: The L298N can drive this motor, but you must keep the factory aluminum heatsink attached, and your microcontroller PWM must limit the duty cycle to prevent prolonged stalling.
Motor Type Comparison: What the L298N Can Actually Drive
Not all motors belong on an H-bridge. A common beginner mistake is attempting to wire standard RC hobby servos to the high-current OUT terminals. Servos contain internal controller boards and require low-current 50Hz PWM signals, not raw H-bridge voltage switching. Below is a breakdown of which motor types fit specific load profiles and what they demand from a controller.
| Motor Type | Torque Curve & Profile | Control Needs | Avg Cost | L298N Compatibility |
|---|---|---|---|---|
| Brushed DC (Gearmotor) | High starting/stall torque, drops as RPM increases. Ideal for wheels and conveyors. | Simple H-bridge for direction; PWM on Enable pin for speed. | $3 - $12 | Excellent. Primary use case. |
| Bipolar Stepper (NEMA 17) | High holding torque at zero speed, drops sharply at high RPM. Ideal for 3D printers/CNC. | Dual H-bridge sequencing (step/direction) or microstepping logic. | $10 - $18 | Fair. Works, but lacks microstepping and wastes power as heat. |
| Coreless DC (Micro) | Extremely low rotor inertia, rapid acceleration, low stall current. Ideal for robotics joints. | H-bridge with high-frequency PWM (>20kHz) to avoid coil whine. | $8 - $25 | Poor. The 2V drop starves low-voltage (3V-6V) coreless motors. |
| RC Servo (Standard) | N/A (Internal gearbox). High torque at specific angular positions. | 5V logic, 50Hz PWM pulse (1ms-2ms). Does not use an H-bridge. | $5 - $20 | Incompatible. Wire to MCU GPIO, not L298N OUT pins. |
Wiring and Terminal Identification for the L298N Module
Most hobbyists use the red Chinese-clone L298N modules rather than the bare IC. These modules include an onboard 7805 linear voltage regulator, optocouplers (on some variants), and screw terminals. Before wiring, verify your supply voltage to avoid frying the onboard 5V regulator.
If your motor power supply (VCC) is 12V or less, leave the 5V EN jumper cap ON. The module will step down VCC to 5V to power the logic and can feed your Arduino via the 5V pin.
If your motor power supply is greater than 12V (up to 35V max), you MUST remove the jumper cap and supply 5V directly to the module's 5V pin. Leaving the jumper on with a 24V supply will instantly overheat and destroy the onboard 7805 regulator.
| Terminal / Pin | Function | Wiring Notes & Specs |
|---|---|---|
| 12V / VCC | Motor Power Supply Input | Connect to positive terminal of battery/PSU. Range: 5V to 35V DC. |
| GND | Common Ground | Must be shared with MCU ground and PSU negative. Use 18 AWG wire for >1A loads. |
| 5V | Logic Power / Output | Outputs 5V if jumper is ON and VCC < 12V. Input 5V if jumper is OFF. |
| ENA / ENB | Enable Pins (PWM) | Remove factory jumper caps. Connect to MCU PWM pins for speed control. |
| IN1, IN2 | Logic Input A (Motor 1) | Digital HIGH/LOW for direction. (HIGH/LOW = Forward, LOW/HIGH = Reverse). |
| IN3, IN4 | Logic Input B (Motor 2) | Digital HIGH/LOW for direction. Same logic as Motor 1. |
| OUT1, OUT2 | Motor 1 Output | Connect directly to Brushed DC motor terminals. Polarity dictates direction. |
| OUT3, OUT4 | Motor 2 Output | Connect to second DC motor, or use OUT1-OUT4 for a single bipolar stepper. |
For authoritative wiring diagrams and logic truth tables, refer to the STMicroelectronics L298N Datasheet or the Adafruit L298N Motor Controller Guide.
Failure Signatures: Hum, Overheat, and Stall Diagnostics
When an L298N circuit fails, it rarely does so silently. The physical symptoms map directly to electrical faults. Here is how to diagnose the three most common failure modes on the bench.
1. The Audible Hum or Whine
Symptom: The motor emits a high-pitched whine or low hum without rotating, or the driver itself buzzes.
Cause: Your microcontroller's PWM frequency is too low (typically under 1kHz), causing the motor coils to vibrate at an audible frequency rather than averaging the voltage. Alternatively, the motor is mechanically stalled, and the PWM is rapidly switching the stalled inductive load.
Fix: Increase the PWM frequency. On an Arduino Uno, change Timer1 or Timer2 prescalers to push PWM above 4kHz (ideally 20kHz+ to move it out of human hearing range). Check the mechanical load for binding.
2. Thermal Overheat (Hot to the Touch)
Symptom: The IC or heatsink is too hot to touch (>60°C), and the motor starts stuttering as the L298N's internal thermal shutdown kicks in at 150°C junction temperature.
Cause: You are exceeding the 1.6A continuous limit, or you are ignoring the BJT voltage drop. At 2A, the L298N wastes up to 5 watts of power as heat. Unlike modern MOSFET drivers (which have milliohm-level Rds(on) resistance), the L298N's Darlington BJT pairs act like a 2-ohm resistor in series with your motor.
Fix: Add active cooling (a 5V 30mm fan blowing on the heatsink) or, better yet, downgrade the continuous load to <1A. If you need >1.5A continuous, abandon the L298N and switch to a MOSFET-based driver.
3. Microcontroller Brownout and Stall
Symptom: The motor twitches once, the Arduino resets, and the serial monitor restarts.
Cause: Motor startup inrush current (which can be 3x to 5x the running current) causes a massive voltage sag on the VCC rail. If the MCU is sharing this rail via the 5V onboard regulator, the voltage drops below the MCU's brownout threshold (typically 2.7V to 4V), triggering a hardware reset. Furthermore, inductive kickback from the motor coils can inject voltage spikes back into the logic pins.
Fix: Solder a 1000µF to 2200µF electrolytic decoupling capacitor directly across the VCC and GND screw terminals on the L298N module to act as a local energy buffer. Ensure flyback diodes are present (most red modules include 1N4007 diodes on the underside of the PCB; verify them with a multimeter diode-test mode).
Decision Path: When to Use the L298N and When to Upgrade
The L298N is a legacy part. It is cheap, widely available, and robust against accidental short circuits, but it is highly inefficient. Use the decision matrix below to select the exact driver for your load profile. Do not default to the L298N if your application demands high efficiency or silent stepper operation.
| IF your load is... | AND your requirement is... | THEN choose this Driver (Concrete Pick) | Why this wins |
|---|---|---|---|
| Brushed DC < 1.5A | Low budget, basic robotics, educational kits | L298N Module (~$4) | Forgiving wiring, built-in 5V regulator, handles up to 35V. |
| Brushed DC < 1.2A | Battery powered, high efficiency, low heat | TB6612FNG (~$7) | MOSFET-based. 0.5V drop (vs 2V on L298N). Much smaller footprint. |
| Brushed DC > 5A | Heavy payloads, e-bikes, large winches | BTS7960 (43A) (~$15) | High-current half-bridges. Handles massive inrush without thermal shutdown. |
| Bipolar Stepper (NEMA 17/23) | 3D printers, CNC routers, quiet operation | TMC2209 (~$12) | UART configurable, StealthChop2 for silent running, automatic microstepping. |
| Multiple RC Servos (4+) | Robotic arms, hexapods, camera gimbals | PCA9685 (~$6) | 16-channel I2C PWM driver. Offloads timing from the MCU, provides clean 50Hz signals. |
Final Recommendation: If you are building a simple, mains-powered or large-lead-acid-battery rover with 12V gearmotors drawing under 1A per side, buy the L298N. It is the most cost-effective, fault-tolerant learning tool available. However, if you are designing a portable, LiPo-powered robot where every milliamp-hour of battery life matters, skip the L298N entirely and design your PCB around the TB6612FNG or DRV8871 to eliminate the 2V BJT voltage drop.






