Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use L298P: Examples, Pinouts, and Specs

Image of L298P
Cirkit Designer LogoDesign with L298P in Cirkit Designer

Introduction

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.

Explore Projects Built with L298P

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino-Based Line Following Robot with L298N Motor Driver and IR Sensor Array
Image of RC_Car: A project utilizing L298P in a practical application
This circuit is a line-following robot that uses an Arduino Expansion Board to control two DC motors via an L298N motor driver. The robot uses a 5-channel IR sensor array to detect the line and adjust the motor speeds accordingly, powered by a 2200mAH LiPo battery and controlled through a PID algorithm implemented in the Arduino code.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Line Following Robot with ATmega328P and L298N Motor Driver
Image of Arduino-Controlled Line Following Robot with Dual DC Motors and L298N Driver: A project utilizing L298P in a practical application
This circuit is a line-following robot controller. It uses a Nano 3.0 ATmega328P microcontroller to read inputs from a line sensor and control two DC motors via an L298N motor driver. Power is supplied by a 9V battery regulated through an XL4015 DC buck converter.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Multi-Sensor Robotic Controller with Dual L298N Motor Drivers
Image of drone : A project utilizing L298P in a practical application
This circuit is designed for a robotics or autonomous vehicle application, utilizing an ESP32 microcontroller to interface with various sensors and control multiple DC motors through L298N motor drivers. It features capabilities for image processing, distance measurement, sound detection, and motion sensing, enabling complex environment interaction and navigation.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Robotic Car with Raspberry Pi Pico and L298N Motor Driver
Image of sma sci-oly: A project utilizing L298P in a practical application
This circuit is a motor control system using a Raspberry Pi Pico to interface with an L298N motor driver and two DG01D-E motors. It also includes an Adafruit 9-DoF sensor for orientation and motion sensing, powered by a 4 x AAA battery pack and controlled via a rocker switch.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with L298P

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of RC_Car: A project utilizing L298P in a practical application
Arduino-Based Line Following Robot with L298N Motor Driver and IR Sensor Array
This circuit is a line-following robot that uses an Arduino Expansion Board to control two DC motors via an L298N motor driver. The robot uses a 5-channel IR sensor array to detect the line and adjust the motor speeds accordingly, powered by a 2200mAH LiPo battery and controlled through a PID algorithm implemented in the Arduino code.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Arduino-Controlled Line Following Robot with Dual DC Motors and L298N Driver: A project utilizing L298P in a practical application
Battery-Powered Line Following Robot with ATmega328P and L298N Motor Driver
This circuit is a line-following robot controller. It uses a Nano 3.0 ATmega328P microcontroller to read inputs from a line sensor and control two DC motors via an L298N motor driver. Power is supplied by a 9V battery regulated through an XL4015 DC buck converter.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of drone : A project utilizing L298P in a practical application
ESP32-Based Multi-Sensor Robotic Controller with Dual L298N Motor Drivers
This circuit is designed for a robotics or autonomous vehicle application, utilizing an ESP32 microcontroller to interface with various sensors and control multiple DC motors through L298N motor drivers. It features capabilities for image processing, distance measurement, sound detection, and motion sensing, enabling complex environment interaction and navigation.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of sma sci-oly: A project utilizing L298P in a practical application
Battery-Powered Robotic Car with Raspberry Pi Pico and L298N Motor Driver
This circuit is a motor control system using a Raspberry Pi Pico to interface with an L298N motor driver and two DG01D-E motors. It also includes an Adafruit 9-DoF sensor for orientation and motion sensing, powered by a 4 x AAA battery pack and controlled via a rocker switch.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Robotics and automation systems
  • Controlling DC motors in remote-controlled vehicles
  • Driving stepper motors in CNC machines and 3D printers
  • Motorized conveyor belts and industrial machinery
  • Educational projects involving motor control

Technical Specifications

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

Pin Configuration and Descriptions

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.

Usage Instructions

How to Use the L298P in a Circuit

  1. Power Supply: Connect the motor power supply (5V to 46V) to the 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.
  2. Motor Connections: Connect the motor terminals to the Output pins (e.g., Output 1 and Output 2 for Motor A).
  3. Control Logic: Use the Input pins to control the direction of the motors:
    • For Motor A: Input 1 and Input 2
    • For Motor B: Input 3 and Input 4
  4. Enable Pins: Set the Enable pins (Enable A and Enable B) to HIGH to activate the corresponding motor outputs.
  5. Heat Dissipation: Use a heat sink if the IC is expected to handle high currents for extended periods.

Important Considerations and Best Practices

  • Always ensure the motor voltage and current ratings are within the L298P's specifications.
  • Use external diodes for flyback protection if the motors generate significant back EMF.
  • Avoid shorting the output pins, as this can damage the IC.
  • Use proper decoupling capacitors near the power supply pins to reduce noise.

Example: Using L298P with Arduino UNO

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
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Motor Not Running

    • Cause: Enable pin is not set to HIGH.
    • Solution: Ensure the Enable pin for the motor is set to HIGH.
  2. Motor Running in the Wrong Direction

    • Cause: Incorrect logic levels on the Input pins.
    • Solution: Swap the logic levels of the Input pins to reverse the motor direction.
  3. Overheating

    • Cause: High current draw or insufficient heat dissipation.
    • Solution: Use a heat sink or reduce the motor load.
  4. No Output Voltage

    • Cause: Incorrect power supply connections.
    • Solution: Verify the connections to the VSS and VS pins.

FAQs

  • 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.