

The L298P is a dual H-bridge motor driver IC manufactured by Arduino, designed to control the direction and speed of DC motors and stepper motors. It is capable of driving two motors simultaneously, making it an essential component for robotics, automation, and motor control applications. The L298P can handle high current loads and is widely used in projects requiring precise motor control.








The L298P is a robust and versatile motor driver IC with the following key specifications:
| Parameter | Value |
|---|---|
| Operating Voltage | 5V to 46V |
| Maximum Output Current | 2A per channel (continuous) |
| Peak Output Current | 3A per channel (non-repetitive, short time) |
| Logic Voltage | 5V |
| Power Dissipation | 25W (at 75°C with proper heat sinking) |
| Control Logic Levels | High: 2.3V to 5V, Low: 0V to 1.5V |
| Operating Temperature Range | -25°C to +130°C |
| Motor Types Supported | DC motors, stepper motors |
The L298P IC has 15 pins, each serving a specific function. Below is the pin configuration:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | Enable A | Enables or disables the output for Motor A. High = Enabled, Low = Disabled. |
| 2 | Input 1 | Logic input to control Motor A direction. |
| 3 | Input 2 | Logic input to control Motor A direction. |
| 4 | Output 1 | Output terminal for Motor A. |
| 5 | Output 2 | Output terminal for Motor A. |
| 6 | Ground | Ground connection. |
| 7 | Ground | Ground connection. |
| 8 | VSS | Supply voltage for the motor (5V to 46V). |
| 9 | VS | Logic voltage supply (typically 5V). |
| 10 | Ground | Ground connection. |
| 11 | Output 3 | Output terminal for Motor B. |
| 12 | Output 4 | Output terminal for Motor B. |
| 13 | Input 3 | Logic input to control Motor B direction. |
| 14 | Input 4 | Logic input to control Motor B direction. |
| 15 | Enable B | Enables or disables the output for Motor B. High = Enabled, Low = Disabled. |
VSS pin and the logic power supply (5V) to the VS pin. Ensure the ground pins are connected to the common ground of the circuit.Output pins (e.g., Output 1 and Output 2 for Motor A).Input pins to control the direction of the motors:Input 1 and Input 2Input 3 and Input 4Enable pins (Enable A and Enable B) to HIGH to activate the corresponding motor outputs.Below is an example of controlling a DC motor using the L298P and Arduino UNO:
// Define motor control pins
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 motor control pins as outputs
pinMode(enableA, OUTPUT);
pinMode(input1, OUTPUT);
pinMode(input2, OUTPUT);
// Initialize motor in stopped state
digitalWrite(enableA, LOW);
digitalWrite(input1, LOW);
digitalWrite(input2, LOW);
}
void loop() {
// Rotate motor forward
digitalWrite(enableA, HIGH); // Enable Motor A
digitalWrite(input1, HIGH); // Set Input 1 HIGH
digitalWrite(input2, LOW); // Set Input 2 LOW
delay(2000); // Run motor for 2 seconds
// Rotate motor backward
digitalWrite(input1, LOW); // Set Input 1 LOW
digitalWrite(input2, HIGH); // Set Input 2 HIGH
delay(2000); // Run motor for 2 seconds
// Stop motor
digitalWrite(enableA, LOW); // Disable Motor A
delay(2000); // Wait for 2 seconds
}
Motor Not Running
Enable pin for the motor is set to HIGH.Motor Running in the Wrong Direction
Input pins.Input pins to reverse the motor direction.Overheating
No Output Voltage
VSS and VS pins.Can the L298P drive stepper motors?
Yes, the L298P can drive stepper motors by controlling the sequence of the Input pins.
What is the maximum motor voltage supported? The L298P supports motor voltages up to 46V.
Do I need external diodes for protection? While the L298P has internal diodes, external diodes are recommended for motors with high back EMF.
Can I control the motor speed with the L298P?
Yes, you can control the motor speed by applying a PWM signal to the Enable pins.