

The L298N is a dual H-bridge motor driver manufactured by Custon (Part ID: L298N). 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 L298N is a versatile and reliable choice for robotics, automation, and other motor control applications.








| Parameter | Value |
|---|---|
| Manufacturer | Custon |
| Part ID | L298N |
| Operating Voltage | 5V to 46V |
| Output Current (per channel) | Up to 2A |
| Peak Output Current | 3A (short duration) |
| Logic Voltage | 5V |
| Power Dissipation | 25W (with proper heat sink) |
| Control Logic Levels | High: 2.3V to 5V, Low: 0V |
| Operating Temperature | -25°C to +130°C |
| Motor Types Supported | DC motors, stepper motors |
The L298N module typically includes the following pins for interfacing:
| Pin Name | Description |
|---|---|
VCC |
Power supply for motors (5V to 46V). |
GND |
Ground connection. |
5V |
Logic voltage output (used to power external logic circuits if needed). |
OUT1 |
Output 1 for Motor A. |
OUT2 |
Output 2 for Motor A. |
OUT3 |
Output 3 for Motor B. |
OUT4 |
Output 4 for Motor B. |
| Pin Name | Description |
|---|---|
ENA |
Enable pin for Motor A (PWM input for speed control). |
ENB |
Enable pin for Motor B (PWM input for speed control). |
IN1 |
Control input 1 for Motor A (direction control). |
IN2 |
Control input 2 for Motor A (direction control). |
IN3 |
Control input 3 for Motor B (direction control). |
IN4 |
Control input 4 for Motor B (direction control). |
VCC pin to the motor power supply (5V to 46V) and the GND pin to the ground of your circuit.OUT1, OUT2 for Motor A and OUT3, OUT4 for Motor B).IN1, IN2, IN3, and IN4 pins to control the direction of the motors. Apply a PWM signal to the ENA and ENB pins to control motor speed.5V pin on the module to power it.Below is an example of how to control a DC motor using the L298N and an Arduino UNO:
// Define control pins for Motor A
const int ENA = 9; // PWM pin for speed control
const int IN1 = 8; // Direction control pin 1
const int IN2 = 7; // Direction control pin 2
void setup() {
// Set motor control pins as outputs
pinMode(ENA, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
}
void loop() {
// Rotate motor forward
digitalWrite(IN1, HIGH); // Set IN1 high
digitalWrite(IN2, LOW); // Set IN2 low
analogWrite(ENA, 150); // Set speed (0-255)
delay(2000); // Run for 2 seconds
// Rotate motor backward
digitalWrite(IN1, LOW); // Set IN1 low
digitalWrite(IN2, HIGH); // Set IN2 high
analogWrite(ENA, 150); // Set speed (0-255)
delay(2000); // Run for 2 seconds
// Stop motor
digitalWrite(IN1, LOW); // Set IN1 low
digitalWrite(IN2, LOW); // Set IN2 low
analogWrite(ENA, 0); // Set speed to 0
delay(2000); // Wait for 2 seconds
}
Motors Not Running:
ENA and ENB pins are receiving a valid PWM signal.Overheating:
Erratic Motor Behavior:
Q: Can the L298N drive stepper motors?
A: Yes, the L298N can drive stepper motors by controlling the sequence of the IN1, IN2, IN3, and IN4 pins.
Q: Can I use the L298N with a 3.3V microcontroller?
A: The L298N requires a minimum logic high voltage of 2.3V, so it is compatible with 3.3V microcontrollers. However, ensure proper interfacing to avoid voltage mismatches.
Q: What is the maximum motor voltage supported?
A: The L298N supports motor voltages up to 46V. Ensure your power supply does not exceed this limit.