

The L298P is a dual H-bridge motor driver IC manufactured by Arduino. It is designed to control the direction and speed of DC motors and stepper motors. With the ability to drive two motors simultaneously and handle up to 2A per channel, the L298P is a versatile and robust solution for robotics, automation, and other motor control applications.








The L298P is a high-performance motor driver IC with the following key specifications:
| Parameter | Value |
|---|---|
| Manufacturer | Arduino |
| Part ID | L298P |
| Operating Voltage | 5V to 46V |
| Maximum Output Current | 2A per channel (continuous) |
| Peak Output Current | 3A per channel (short duration) |
| Logic Voltage | 5V |
| Power Dissipation | 25W (with proper heat sinking) |
| Control Inputs | TTL-compatible |
| Operating Temperature | -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 motor connected to OUT1 and OUT2 |
| 2 | Input 1 | Logic input to control the direction of motor A |
| 3 | Input 2 | Logic input to control the direction of motor A |
| 4 | Output 1 | Motor A output terminal 1 |
| 5 | Output 2 | Motor A output terminal 2 |
| 6 | VSS | Logic voltage supply (5V) |
| 7 | GND | Ground connection |
| 8 | VS | Motor power supply (up to 46V) |
| 9 | Enable B | Enables or disables the motor connected to OUT3 and OUT4 |
| 10 | Input 3 | Logic input to control the direction of motor B |
| 11 | Input 4 | Logic input to control the direction of motor B |
| 12 | Output 3 | Motor B output terminal 1 |
| 13 | Output 4 | Motor B output terminal 2 |
| 14 | Sense A | Current sensing pin for motor A (optional, connect to GND if unused) |
| 15 | Sense B | Current sensing pin for motor B (optional, connect to GND if unused) |
Below is an example of controlling a DC motor using the L298P and Arduino UNO:
// Define L298P 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 pin modes
pinMode(enableA, OUTPUT);
pinMode(input1, OUTPUT);
pinMode(input2, OUTPUT);
// Initialize motor
digitalWrite(enableA, HIGH); // Enable motor A
digitalWrite(input1, HIGH); // Set motor A direction
digitalWrite(input2, LOW); // Set motor A direction
}
void loop() {
// Run motor at full speed for 5 seconds
analogWrite(enableA, 255); // Full speed
delay(5000);
// Stop motor for 2 seconds
analogWrite(enableA, 0); // Stop motor
delay(2000);
// Reverse motor direction and run at half speed for 5 seconds
digitalWrite(input1, LOW); // Reverse direction
digitalWrite(input2, HIGH); // Reverse direction
analogWrite(enableA, 128); // Half speed
delay(5000);
}
Motor Not Running:
Overheating:
Erratic Motor Behavior:
No Current Sensing Output:
Q: Can the L298P drive stepper motors?
A: Yes, the L298P can drive stepper motors by controlling the sequence of inputs to the H-bridges.
Q: What is the maximum voltage the L298P can handle?
A: The L298P can handle up to 46V on the motor power supply (VS) pin.
Q: Do I need external diodes for motor protection?
A: No, the L298P includes internal flyback diodes to protect against voltage spikes.
Q: Can I use the L298P with a 3.3V microcontroller?
A: The L298P requires a 5V logic voltage. Use a level shifter if interfacing with a 3.3V microcontroller.