

The L298N is a robust and versatile dual H-bridge motor driver designed to control the direction and speed of two DC motors or a single stepper motor. It is widely used in robotics, automation, and other motor control applications due to its ability to handle high currents (up to 2A per channel) and operate within a broad voltage range of 5V to 35V. The module integrates essential components such as a voltage regulator and heat sink, making it easy to use in various projects.








| Parameter | Specification |
|---|---|
| Operating Voltage | 5V to 35V |
| Output Current (per channel) | Up to 2A |
| Peak Current (per channel) | 3A (short duration) |
| Logic Voltage | 5V |
| Control Logic Levels | High: 5V, Low: 0V |
| Number of Channels | 2 (dual H-bridge) |
| Supported Motors | 2 DC motors or 1 stepper motor |
| Power Dissipation | Integrated heat sink for cooling |
| Dimensions | Approx. 43mm x 43mm x 27mm |
The L298N module has multiple pins and terminals for motor control and power input. Below is a detailed description:
| Pin/Terminal | Description |
|---|---|
| VCC | Power supply for motors (5V to 35V). |
| GND | Ground connection. |
| 5V | Regulated 5V output (used if the onboard regulator is active). |
| OUT1 | Output for Motor 1 terminal 1. |
| OUT2 | Output for Motor 1 terminal 2. |
| OUT3 | Output for Motor 2 terminal 1. |
| OUT4 | Output for Motor 2 terminal 2. |
| Pin | Description |
|---|---|
| ENA | Enable pin for Motor 1 (PWM input for speed control). |
| IN1 | Control input 1 for Motor 1 (direction control). |
| IN2 | Control input 2 for Motor 1 (direction control). |
| ENB | Enable pin for Motor 2 (PWM input for speed control). |
| IN3 | Control input 1 for Motor 2 (direction control). |
| IN4 | Control input 2 for Motor 2 (direction control). |
VCC terminal and ground to the GND terminal. If the motor voltage exceeds 12V, ensure the onboard jumper for the 5V regulator is removed.OUT1/OUT2 (Motor 1) and OUT3/OUT4 (Motor 2).IN1, IN2, IN3, IN4) to a microcontroller or other control circuit. Use ENA and ENB for speed control via PWM signals.5V pin. Otherwise, supply 5V logic power externally.Below is an example of how to control a single DC motor using the L298N and an Arduino UNO:
// Define control pins for Motor 1
const int IN1 = 9; // Direction control pin 1
const int IN2 = 8; // Direction control pin 2
const int ENA = 10; // Speed control (PWM) pin
void setup() {
// Set motor control pins as outputs
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(ENA, OUTPUT);
}
void loop() {
// Rotate motor forward at 50% speed
digitalWrite(IN1, HIGH); // Set direction
digitalWrite(IN2, LOW);
analogWrite(ENA, 128); // Set speed (0-255)
delay(2000); // Run for 2 seconds
// Rotate motor backward at 75% speed
digitalWrite(IN1, LOW); // Reverse direction
digitalWrite(IN2, HIGH);
analogWrite(ENA, 192); // Set speed (0-255)
delay(2000); // Run for 2 seconds
// Stop the motor
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
analogWrite(ENA, 0); // Set speed to 0
delay(2000); // Wait for 2 seconds before repeating
}
Motors Not Running:
VCC and GND.ENA or ENB pins are enabled (HIGH or receiving a PWM signal).IN1, IN2, etc.) are correctly configured.Overheating:
No 5V Output:
Erratic Motor Behavior:
Q: Can I control stepper motors with the L298N?
A: Yes, the L298N can control a single stepper motor by using both H-bridge channels. You will need to configure the control pins appropriately for stepper motor operation.
Q: What happens if I exceed the current rating?
A: Exceeding the 2A continuous current rating may cause the module to overheat or fail. Use motors within the specified current limits.
Q: Can I use the L298N with a 3.3V microcontroller?
A: The L298N is designed for 5V logic levels. You may need level shifters to interface with a 3.3V microcontroller.
This concludes the documentation for the L298N Dual H-Bridge Motor Driver.