L298N Motor Driver Guide: Features, Pinout, Wiring, Specs, and Operations

Dec 11 2025
Source: DiGi-Electronics
Browse: 1838

The L298N motor driver is a widely used dual H-bridge module designed for reliable control of DC and stepper motors in robotics, automation, and DIY systems. Its ability to handle higher voltages, interface easily with microcontrollers, and support bidirectional control makes it a practical choice for projects requiring stable speed, direction, and load-handling performance.

Figure 1. L298N Motor Driver

Overview of the L298N Motor Driver

The L298N is a dual H-bridge motor driver integrated circuit designed to control two DC motors or one bipolar stepper motor independently. It allows forward, reverse, braking, and speed control by interfacing low-power logic signals from a microcontroller with the higher voltage and current required by motors. The driver supports a wide operating voltage range and provides reliable bidirectional control, making it a common choice for robotics, automation projects, and general motor-control applications.

Features of L298N Motor Driver

FeatureDescription
Dual Full H-BridgeEnables independent control of two DC motors or one bipolar stepper motor, supporting forward, reverse, braking, and free-coasting states.
Wide Motor Voltage Range (5V–35V)Compatible with 6V, 9V, 12V, and 24V motors commonly used in robotics and automation projects.
High Current OutputDelivers up to 2A continuous current per channel with proper heat dissipation, making it suitable for motors requiring high startup torque.
PWM-Compatible ENA/ENB PinsSupports direct speed control using PWM signals from microcontrollers such as Arduino, ESP32, or Raspberry Pi.
Thermal ShutdownAutomatically protects the driver from overheating during high-load or prolonged operation.
Onboard 78M05 RegulatorProvides a stable 5V logic supply when motor voltage is ≤12V, reducing the need for an external regulator in typical setups.

Technical Specifications of L298N Motor Driver

ParameterSymbolMinTypicalMaxUnit
Motor Supply VoltageVs51235V
Continuous Output Current (per channel)IO-cont-2-A
Peak Output CurrentIO-peak--3A
Logic Supply VoltageVSS4.557V
Output Voltage DropVCEsat1.8-4.9V
Power DissipationPtot--25W
Operating TemperatureTop-2.5-130°C

Pinout of the L298N Motor Driver

Figure 2. Pinout of the L298N Motor Driver

Most L298N motor driver modules provide clearly labeled screw terminals for motor outputs and power inputs, along with header pins for logic control. Each pin serves a specific role in driving DC or stepper motors through the dual H-bridge IC.

Pin Functions

PinTypeDescription
VCCPowerMain motor supply input (5–35V). Powers the H-bridge outputs.
GNDPowerCommon ground reference for both logic and motor supply.
5VPowerLogic supply input/output depending on jumper configuration.
IN1, IN2InputDirection control inputs for Motor A.
IN3, IN4InputDirection control inputs for Motor B.
ENAInputEnable/PWM input for Motor A speed control.
ENBInputEnable/PWM input for Motor B speed control.
OUT1, OUT2OutputMotor A terminal outputs.
OUT3, OUT4OutputMotor B terminal outputs.

Using the L298N Motor Driver

The module interfaces easily with microcontrollers such as Arduino, ESP32, STM32, or Raspberry Pi. Control is performed with digital signals for direction and PWM for speed.

Direction Control Logic

Motor AIN1IN2ENAResult
Forward10PWMMotor spins forward
Reverse01PWMMotor spins backward
Free-coast00-Motor spins freely
Brake11-Motor stops abruptly

Motor B uses IN3, IN4, and ENB with identical behavior.

Wiring to Arduino (Typical Setup)

L298N PinArduino PinPurpose
IN1D7Motor A direction
IN2D6Motor A direction
ENAD5 (PWM)Motor A speed
IN3D4Motor B direction
IN4D3Motor B direction
ENBD9 (PWM)Motor B speed
GNDGNDGround reference
VINExternal supplyMotor power

Once connected, digital outputs control direction and PWM outputs adjust motor speed.

Speed Control with PWM

PWM signals applied to ENA and ENB vary the average voltage delivered to each motor, allowing smooth acceleration and precise speed control.

Recommended frequency ranges:

• 500 Hz – 2 kHz → Best motor response and minimal heat.

• Higher than 5 kHz → Causes power losses and increased heating.

• Below ~200 Hz → Produces visible pulsing and lower torque.

Driving Bipolar Stepper Motors

Each H-bridge channel controls one coil of a bipolar stepper motor. The L298N supports full-step and half-step sequences, making it suitable for simple positioning systems.

Limitations

• No microstepping support

• No adjustable current limiting

• Higher power loss due to bipolar transistor technology

For precision or quiet operation, dedicated microstepping drivers like A4988 or DRV8825 perform significantly better.

Electrical Limits, Performance & Thermal Management

Although the L298N is rated for 35V and 2A per channel, performance is lower due to transistor losses and heat buildup. The IC uses bipolar transistors, which introduce a significant voltage drop, typically 1.8V to 2.5V under load. This reduces the effective voltage reaching the motor, lowering torque and making the driver run hotter at higher currents.

In practical use, the L298N performs best with 7–12V motors drawing less than about 1.5A under normal load. Pushing the current closer to its 2A limit causes the IC to heat rapidly, especially at high PWM duty cycles. Continuous heavy use demands proper thermal management, as temperatures above ~80°C lead to performance degradation and potential failure.

To keep the module operating safely, ensure good airflow, use a cooling fan for heavy loads, and apply thermal paste to improve heatsink contact when necessary. Moderate PWM frequencies (around 500 Hz–2 kHz) also help reduce power dissipation and maintain stable operation.

Power Configuration, Wiring Stability, and Protection

Reliable operation of the L298N motor driver depends heavily on correct power setup, grounding, wiring practices, and noise management.

Power Configuration and 5V Regulator Behavior

The motor supply (VCC) powers the H-bridge outputs and can typically range from 5–35 V: higher voltages increase motor torque but also raise heat in the L298N due to its internal voltage drop. The onboard 78M05 regulator only powers the driver’s logic section and should not be used as a general 5 V source for external boards.

• When motor voltage ≤ 12 V, keep the 5 V jumper in place so the onboard regulator can provide 5 V logic power.

• When motor voltage > 12 V, remove the 5 V jumper and feed a separate, regulated 5 V to the 5 V pin.

This prevents the regulator from overheating and keeps logic power stable.

Grounding Requirements

All power rails must share a common ground so that logic signals have a clear reference level. Connect motor supply ground, logic ground, and the microcontroller ground to the same reference node. If any ground is floating or loosely connected, you may see jittery motor motion, unstable speed control, random microcontroller resets, or incorrect response to direction and PWM signals.

Wiring Stability and Noise Control

DC motors generate electrical noise that can disturb logic circuits. Good wiring practice greatly improves stability.

• Use short, thick wires for motor outputs to limit voltage drop and reduce radiated noise.

• Keep motor wiring physically separated from logic and microcontroller signal lines.

• Tighten all screw terminals so that high-current paths do not open or arc under load.

• Prefer a dedicated motor power supply for high-current motors instead of sharing the same rail with logic.

For power decoupling, place a 470–1000 µF electrolytic capacitor across the motor supply terminals (VIN and GND) to absorb inrush and load transients, and add 0.1 µF ceramic capacitors near the logic pins to filter high-frequency noise.

Protection Measures

Although the L298N includes built-in flyback diodes, additional protection improves safety:

• Add a fuse on the motor supply line to protect against stalls or short circuits.

• Ensure proper cooling or airflow if motors draw high current.

• Avoid daisy-chaining multiple high-current devices from the same supply rail.

Common Issues and Troubleshooting

Motors Are Weak or Stuttering

• Motor supply voltage too low – The motor may not receive enough voltage to produce adequate torque, especially under load.

• Excessive voltage drop through the driver – Long wires, thin gauge wiring, or high current draw can cause voltage sag before the motor.

• Wrong PWM frequency – Very low or very high PWM frequencies can cause jerky motion or reduced torque; adjust to a suitable range (typically 1–20 kHz).

Microcontroller Resets

• Inadequate grounding – Poor or inconsistent ground reference between the driver, power supply, and microcontroller can cause unstable logic signals.

• No decoupling capacitors – Missing bypass capacitors on the microcontroller or motor supply can cause brownouts during sudden current spikes.

• Motor noise feeding back into logic power – Inductive motor noise can disturb the 5V rail; use separate supplies or add filtering components.

Driver Overheating

• Motor drawing more current than driver capability – L298N supports up to ~2A per channel (often less without cooling); exceeding this causes rapid heating.

• Prolonged high-duty PWM – Running at near-full duty for long durations increases power dissipation inside the driver.

• Insufficient airflow or heatsinking – The onboard heatsink may not be enough for heavy loads; add a fan or external heat dissipation.

LEDs Light but Motors Do Not Move

• Loose screw terminals – Motor wires may not be tightly clamped, causing intermittent or no motor connection.

• Incorrect motor polarity – Reversed wiring may prevent expected rotation or cause no movement with certain control logic.

• Missing ENA/ENB enable signal – If the enable pins are LOW or not connected, the corresponding motor channel will not activate.

L298N DC Motor Driver Uses

• Differential-drive robots and smart car platforms – Enables independent control of left and right motors for smooth steering, speed control, and maneuvering.

• Obstacle-avoidance and line-following robots – Works seamlessly with sensor-based navigation systems to adjust motor speed and direction in real time.

• Compact conveyors and automation mechanisms – Powers small belts, rollers, and moving parts in light-duty industrial or educational automation setups.

• Pan-tilt camera mounts and robotic arms – Provides controlled bidirectional motion for positioning systems, allowing precise angular or linear movement.

• DIY plotters, CNC prototypes, and small-scale XY systems – Drives stepper or DC motors for plotting, engraving, or simple coordinate-based motion projects.

• Motorized doors, flaps, and simple actuators – Ideal for home automation projects requiring controlled opening and closing mechanisms.

L298N Alternatives

Modern drivers offer better efficiency and lower voltage drop, making them preferable for battery-powered or high-performance builds.

Figure 3. TB6612FNG

• TB6612FNG – Excellent efficiency, low heat, ideal for portable robots.

Figure 4. DRV8833

• DRV8833 – Compact, low-power, highly efficient for embedded projects.

Figure 5. BTS7960

• BTS7960 – High-current H-bridge for large DC motors.

Figure 6. A4988 DRV8825

• A4988 / DRV8825 – Microstepping drivers for smooth and precise stepper control.

Figure 7. MX1508

• MX1508 – Very low-cost option for small hobby motors under light load.

These alternatives allow you to upgrade based on torque, efficiency, and control requirements.

Conclusion

The L298N remains a dependable motor driver for moderate-power applications, offering solid performance, flexible control options, and straightforward integration with popular microcontrollers. While it has limitations in efficiency and heat generation compared to newer drivers, proper wiring, grounding, and thermal management help maximize its reliability. For many educational and hobbyist builds, it continues to deliver a practical and durable motor-control solution.

Frequently Asked Questions [FAQ]

Can the L298N run two motors at different speeds?

Yes. The L298N has two independent PWM inputs (ENA and ENB), allowing each motor to run at a different speed or acceleration curve as long as the microcontroller provides separate PWM signals.

How much voltage drop should I account for when using the L298N?

Expect a voltage drop of 1.8V–2.5V under typical loads, and up to 4V at high current. Always choose a motor supply voltage that compensates for this drop so your motor receives enough effective torque.

Is the L298N suitable for battery-powered robots?

It works, but it is not ideal. The L298N wastes energy as heat due to its bipolar transistors, draining batteries faster. Efficient MOSFET-based drivers (TB6612FNG, DRV8833) perform better for mobile robots.

Does the L298N support current limiting or motor stall protection?

No. The L298N does not include current limiting, stall detection, or overcurrent shutdown. If your motor can exceed 2A during stall or startup, use an external fuse or choose a driver with built-in current control.

What size capacitor should I add for stable L298N motor power?

Use a 470–1000 µF electrolytic capacitor across the motor supply input to smooth sudden load spikes. For best performance, pair it with a 0.1 µF ceramic capacitor close to the logic pins to handle high-frequency noise.