L298N Dual H-Bridge Motor Driver Controller Board – DC & Stepper Motor Driver for Arduino & ESP32
The L298N Motor Driver Controller Board is a versatile dual H-bridge motor driver module designed to control the speed and direction of DC motors and drive bipolar stepper motors in robotics and automation projects.
Built around the L298N dual full-bridge driver IC, the module allows a microcontroller to independently control two brushed DC motors or operate one bipolar stepper motor using digital control signals.
The board features motor output terminals, control pins, enable inputs for PWM speed control, and a motor power input. Common versions also include an onboard 5V voltage regulator and removable enable jumpers.
The L298N is suitable for Arduino, ESP32, Raspberry Pi, robotic cars, motorized mechanisms, educational robotics, and DIY automation projects.
Key Features
-
Driver IC: L298N Dual Full-Bridge Motor Driver
-
Motor Channels: 2 Independent DC Motor Channels
-
Motor Types: Brushed DC Motors and Bipolar Stepper Motors
-
Motor Supply Voltage: Typically 5V–35V on Common Modules
-
Maximum Driver Current: Up to 2A per Channel (IC Rating, Thermal Conditions Apply)
-
Bidirectional Motor Control: Forward and Reverse
- PWM Motor Speed Control
-
Independent Enable Inputs: ENA and ENB
-
Onboard 5V Regulator: Available on Common Board Versions
- External Motor Power Input
- Screw Terminal Connections
- Onboard Power Indicator LED
- Mounting Holes for Easy Installation
- Compatible with Arduino and Other Microcontroller Platforms
Technical Specifications
| Parameter |
Specification |
| Product Name |
L298N Motor Driver Controller Board |
| Driver IC |
L298N |
| Driver Architecture |
Dual Full H-Bridge |
| Number of Motor Channels |
2 |
| Supported Motors |
Brushed DC / Bipolar Stepper |
| DC Motor Capacity |
2 Motors |
| Bipolar Stepper Capacity |
1 Motor |
| Typical Module Motor Supply |
5V–35V DC |
| L298N IC Motor Supply Rating |
Up to 46V |
| Maximum Output Current |
2A per Channel (IC Maximum) |
| Practical Continuous Current |
Depends on Cooling and Board Design |
| Logic Supply |
5V |
| Logic Input Type |
TTL-Compatible |
| PWM Speed Control |
Supported |
| Direction Control |
Supported |
| Enable Pins |
ENA / ENB |
| Control Inputs |
IN1 / IN2 / IN3 / IN4 |
| Motor Outputs |
OUT1 / OUT2 / OUT3 / OUT4 |
| Onboard Regulator |
5V on Common Versions |
| Protection Diodes |
Typically Included on Common Modules |
| Heat Sink |
Typically Included |
| Board Dimensions |
Approximately 43 × 43 × 27mm |
| Mounting Holes |
Typically 4 |
| Communication Protocol |
Direct Digital GPIO / PWM |
Note: Electrical limits, regulator configuration, dimensions, and cooling performance may vary between manufacturers.
Pin Configuration
| Pin / Terminal |
Function |
| ENA |
Enable / PWM Control for Motor A |
| IN1 |
Motor A Direction Input 1 |
| IN2 |
Motor A Direction Input 2 |
| IN3 |
Motor B Direction Input 1 |
| IN4 |
Motor B Direction Input 2 |
| ENB |
Enable / PWM Control for Motor B |
| OUT1 |
Motor A Output Terminal 1 |
| OUT2 |
Motor A Output Terminal 2 |
| OUT3 |
Motor B Output Terminal 1 |
| OUT4 |
Motor B Output Terminal 2 |
| +12V / VS |
External Motor Power Input |
| GND |
Common Ground |
| +5V |
Logic Supply / Regulator Connection, Depending on Jumper Configuration |
The terminal labeled +12V on many boards is the motor supply input and does not necessarily mean the board is restricted to 12V motors.
How It Works
The L298N contains two full H-bridge driver circuits.
Each H-bridge controls the direction of current through a connected DC motor.
By changing the logic states of the control inputs, a microcontroller can reverse the motor's direction.
The enable pins can also receive PWM signals to control the average voltage applied to the motor.
DC Motor A Control Logic
| ENA |
IN1 |
IN2 |
Motor Operation |
| HIGH |
HIGH |
LOW |
Forward |
| HIGH |
LOW |
HIGH |
Reverse |
| HIGH |
LOW |
LOW |
Brake |
| HIGH |
HIGH |
HIGH |
Brake |
| LOW |
X |
X |
Coast / Outputs Disabled |
Motor direction depends on the wiring of the connected motor.
PWM Speed Control
The ENA and ENB pins can be connected to PWM-capable microcontroller outputs.
Changing the PWM duty cycle adjusts the average motor drive voltage and therefore influences motor speed under a given load.
For PWM control, remove the corresponding enable jumper if the module has one installed.
Arduino Connection Example – Two DC Motors
| L298N |
Arduino Uno |
| ENA |
D5 (PWM) |
| IN1 |
D8 |
| IN2 |
D9 |
| IN3 |
D10 |
| IN4 |
D11 |
| ENB |
D6 (PWM) |
| GND |
Arduino GND |
| Motor Supply |
External Motor Power Supply |
| OUT1 / OUT2 |
DC Motor A |
| OUT3 / OUT4 |
DC Motor B |
Use a suitable external power supply for the motors.
The onboard 5V regulator configuration must be checked before connecting the module's 5V terminal to the Arduino.
Arduino Example Code
const int ENA = 5;
const int IN1 = 8;
const int IN2 = 9;
const int IN3 = 10;
const int IN4 = 11;
const int ENB = 6;
void setup() {
pinMode(ENA, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
pinMode(ENB, OUTPUT);
}
void loop() {
// Both motors forward
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
analogWrite(ENA, 180);
analogWrite(ENB, 180);
delay(2000);
// Stop motors
analogWrite(ENA, 0);
analogWrite(ENB, 0);
delay(1000);
// Both motors reverse
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
analogWrite(ENA, 180);
analogWrite(ENB, 180);
delay(2000);
// Stop motors
analogWrite(ENA, 0);
analogWrite(ENB, 0);
delay(1000);
}
This example runs both motors forward, stops them, reverses their direction, and repeats the sequence.
Stepper Motor Control
The L298N can also drive one bipolar stepper motor by using both H-bridge channels.
The four motor output terminals connect to the two stepper motor windings.
The microcontroller must generate the correct stepping sequence.
Important: The L298N does not provide the automatic current regulation or microstepping features found in dedicated stepper motor drivers such as the A4988 or DRV8825.
A suitable motor, supply voltage, and current-limiting strategy must be selected to avoid overheating or damaging the motor and driver.
Applications
- Arduino and ESP32 Robotics
- Two-Wheel and Four-Wheel Robotic Cars
- DC Motor Speed and Direction Control
- Bipolar Stepper Motor Projects
- Motorized Educational Projects
- Automated Mechanical Systems
- DIY Conveyor Systems
- Robotics Prototyping
- Small Mobile Robots
- Electronic Control Systems
- STEM and University Projects
- Microcontroller-Based Automation
Important Notes
Motor Current and Heating
- The L298N IC has a maximum output current rating of 2A per channel, but this is not a guarantee of continuous 2A operation on every module.
- Actual continuous current depends on heat dissipation, supply voltage, motor characteristics, and board construction.
- The L298N uses bipolar transistor output stages and has a relatively high voltage drop.
- The motor may receive significantly less voltage than the external supply voltage, particularly under load.
- The driver can become hot during operation, so adequate cooling is important.
Power Supply
- Use an external motor power supply suitable for the connected motors.
- Connect the motor supply ground and microcontroller ground together.
- Common L298N modules include a 5V regulator enable jumper.
- On many versions, the onboard regulator is intended for use only within a limited motor supply voltage range, often up to approximately 12V.
- When using a higher motor supply voltage, the onboard regulator may need to be disabled and an external regulated 5V logic supply provided.
- Never connect two competing 5V power sources together without confirming the module's regulator and jumper configuration.
Microcontroller Compatibility
- Arduino Uno and similar 5V microcontrollers can generally control the L298N directly.
- ESP32 and Raspberry Pi 3.3V GPIO signals generally meet the L298N's TTL HIGH-input requirement, provided the module is powered and wired correctly.
- Do not connect a 5V output from the module directly to a 3.3V GPIO input.
- The motor driver does not include motor speed or position feedback.
Motor Compatibility
- Suitable for brushed DC motors within the module's practical voltage and current limits.
- Supports bipolar stepper motors with appropriate control and current management.
- Not suitable for directly controlling three-phase brushless DC motors.
- Not recommended for high-current motors that exceed the board's thermal capability.
- For high-efficiency battery-powered robots, a modern MOSFET-based motor driver may provide better performance.
Package Includes
1 × L298N Dual H-Bridge Motor Driver Controller Board