Motors & Drivers Dual H-Bridge Up to 2A Per Channel PWM Speed Control

L298N Dual H-Bridge Motor Driver - Arduino Wiring, PWM & 3D STL Bracket

Loading 3D STL Model...
Drag to rotate | Scroll to zoom | Double-click to reset

Advertisement

Module Overview & How It Works

The L298N is a high-power dual H-Bridge motor driver board capable of driving two DC motors independently in both forward and reverse directions, or controlling a single bipolar stepper motor (such as NEMA 17). It operates with an onboard 78M05 5V regulator that can power your logic circuits or microcontroller directly when supplying between 7V and 12V to the motor power terminals.

Technical Specifications

Parameter Specification
Driver IC ST L298N Dual Full-Bridge Driver
Motor Drive Voltage (Vs) +5V to +35V DC
Peak Output Current (Io) 2A per bridge (continuous ~1.2A with heatsink)
Logic Voltage (Vss) +5V to +7V DC
Logic Input Pins IN1, IN2, IN3, IN4 (TTL level)
Speed Control Pins ENA (Motor A), ENB (Motor B) via PWM
Max Power Dissipation 25W (at 75°C heatsink temperature)

Pinout & Arduino Connection Table

L298N Terminal / Pin Function Connection Target
12V (VCC) Motor Power Positive Battery pack (7V – 12V)
GND Common Ground Battery (-) AND Arduino GND (Crucial!)
5V Terminal Regulated 5V Output / Input Powers Arduino 5V pin (when 5V jumper is ON)
ENA Motor A Speed Enable Arduino Pin 9 (PWM)
IN1 / IN2 Motor A Direction Control Arduino Pins 8 and 7
IN3 / IN4 Motor B Direction Control Arduino Pins 5 and 4
ENB Motor B Speed Enable Arduino Pin 3 (PWM)
OUT1 / OUT2 Motor A Screw Terminal Left DC Motor Terminals
OUT3 / OUT4 Motor B Screw Terminal Right DC Motor Terminals

Arduino Sample Code (Direction & Speed Control)

L298N_Motor_Control.ino C++ / Arduino
// Motor A Pins
const int enA = 9;
const int in1 = 8;
const int in2 = 7;

void setup() {
  pinMode(enA, OUTPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
}

void loop() {
  // Turn Motor A Forward at full speed
  digitalWrite(in1, HIGH);
  digitalWrite(in2, LOW);
  analogWrite(enA, 255); // Speed: 0 to 255
  delay(2000);

  // Turn Motor A in Reverse at half speed
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH);
  analogWrite(enA, 128);
  delay(2000);

  // Stop Motor
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);
  delay(1000);
}

3D Printing & Enclosure Recommendations

When mounting the L298N module inside robot chassis, use our printable base bracket:

  • Infill: 25% for structural durability against robot vibrations.
  • Mounting Holes: Designed for standard M3 × 8mm standoffs.
  • Airflow: Keep the aluminum heatsink unobstructed to ensure reliable heat dissipation under prolonged stall currents.