

The L298 is a dual H-bridge motor driver IC designed to control the direction and speed of DC motors and stepper motors. It is capable of driving two motors simultaneously, making it a versatile choice for robotics, automation, and other motor control applications. With its ability to handle high current loads, the L298 is widely used in projects requiring precise motor control, such as robotic arms, conveyor belts, and automated vehicles.








Below are the key technical details of the L298 motor driver IC:
| Parameter | Value |
|---|---|
| Operating Voltage | 4.5V to 46V |
| Maximum Output Current | 2A per channel (continuous) |
| Peak Output Current | 3A per channel (non-repetitive) |
| Logic Voltage | 5V |
| Power Dissipation | 25W (with proper heat sinking) |
| Control Logic Levels | High: 2.3V to Vss, Low: -0.3V to 1.5V |
| Operating Temperature | -25°C to +130°C |
| Motor Types Supported | DC motors, stepper motors |
The L298 IC comes in a 15-pin Multiwatt package. Below is the pin configuration:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | Current Sense A | Connect to ground via a resistor to monitor current for Motor A. |
| 2 | Output 1 | Output pin for Motor A (connect to one terminal of the motor). |
| 3 | Output 2 | Output pin for Motor A (connect to the other terminal of the motor). |
| 4 | Vss | Logic supply voltage (typically 5V). |
| 5 | Enable A | Enables or disables Motor A (High to enable, Low to disable). |
| 6 | Input 1 | Logic input to control Motor A direction (works with Input 2). |
| 7 | Input 2 | Logic input to control Motor A direction (works with Input 1). |
| 8 | Ground | Common ground for logic and motor power. |
| 9 | Ground | Common ground for logic and motor power. |
| 10 | Input 3 | Logic input to control Motor B direction (works with Input 4). |
| 11 | Input 4 | Logic input to control Motor B direction (works with Input 3). |
| 12 | Enable B | Enables or disables Motor B (High to enable, Low to disable). |
| 13 | Output 3 | Output pin for Motor B (connect to one terminal of the motor). |
| 14 | Output 4 | Output pin for Motor B (connect to the other terminal of the motor). |
| 15 | Current Sense B | Connect to ground via a resistor to monitor current for Motor B. |
Power Connections:
Vss pin.Vss pin.Motor Connections:
Output 1 and Output 2 for Motor A, Output 3 and Output 4 for Motor B).Control Logic:
Input pins to control the direction of the motors:Input 1 and Input 2.Input 3 and Input 4.Enable pins to enable or disable the motors:Enable A.Enable B.Current Sensing:
Current Sense pins and ground to monitor the current drawn by the motors.Below is an example of how to control a DC motor using the L298 and an Arduino UNO:
// Define L298 pins connected to Arduino
const int enableA = 9; // Enable pin for Motor A
const int input1 = 8; // Input 1 for Motor A
const int input2 = 7; // Input 2 for Motor A
void setup() {
// Set pin modes
pinMode(enableA, OUTPUT);
pinMode(input1, OUTPUT);
pinMode(input2, OUTPUT);
// Initialize motor in stopped state
digitalWrite(enableA, LOW); // Disable motor
digitalWrite(input1, LOW); // Set direction to neutral
digitalWrite(input2, LOW); // Set direction to neutral
}
void loop() {
// Example: Rotate motor forward
digitalWrite(enableA, HIGH); // Enable motor
digitalWrite(input1, HIGH); // Set direction forward
digitalWrite(input2, LOW); // Set direction forward
delay(2000); // Run motor for 2 seconds
// Example: Rotate motor backward
digitalWrite(input1, LOW); // Set direction backward
digitalWrite(input2, HIGH); // Set direction backward
delay(2000); // Run motor for 2 seconds
// Stop motor
digitalWrite(enableA, LOW); // Disable motor
delay(2000); // Wait for 2 seconds
}
Motor Not Running:
Enable pin is not set to HIGH.Enable pin is connected to a HIGH signal.Motor Running in the Wrong Direction:
Input pins.Input pins to reverse the motor direction.Overheating:
No Output Voltage:
Can the L298 drive stepper motors?
Yes, the L298 can drive stepper motors by controlling the sequence of the Input pins.
Do I need external diodes with the L298? While the L298 has internal diodes, external diodes are recommended for motors with high back EMF.
What is the maximum current the L298 can handle? The L298 can handle up to 2A per channel continuously and 3A peak (non-repetitive).