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, with each channel supporting up to 2A of current. This makes the L298P an ideal choice for robotics, automation, and other motor control applications.

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: Driving wheels or actuators in robotic systems.
  • Automation: Controlling conveyor belts, fans, or other motorized systems.
  • DIY Projects: Building motorized vehicles, robotic arms, or automated systems.
  • Stepper Motor Control: Driving stepper motors for precise positioning.

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 (short duration)
Logic Voltage 5V
Power Dissipation 25W (with proper heat sinking)
Control Inputs TTL-compatible
Operating Temperature -25°C to +130°C

Pin Configuration and Descriptions

The L298P IC has the following pin configuration:

Pin Number Pin Name Description
1 Enable A Enables or disables motor A (active HIGH).
2 Input 1 Logic input to control motor A direction.
3 Input 2 Logic input to control motor A direction.
4 Output 1 Motor A output terminal 1.
5 Output 2 Motor A output terminal 2.
6 Ground Ground connection.
7 VSS Logic voltage supply (typically 5V).
8 VS Motor power supply (up to 46V).
9 Enable B Enables or disables motor B (active HIGH).
10 Input 3 Logic input to control motor B direction.
11 Input 4 Logic input to control motor B direction.
12 Output 3 Motor B output terminal 1.
13 Output 4 Motor B output terminal 2.
14 Ground Ground connection.

Usage Instructions

How to Use the L298P in a Circuit

  1. Power Supply: Connect the motor power supply to the VS pin (Pin 8). Ensure the voltage is within the operating range of the motors and the L298P (5V to 46V). Connect the logic voltage (5V) to the VSS pin (Pin 7).
  2. Motor Connections: Connect the motor terminals to the output pins (Output 1 and Output 2 for motor A, Output 3 and Output 4 for motor B).
  3. Control Inputs: Use the Input pins (Pins 2, 3 for motor A; Pins 10, 11 for motor B) to control the direction of the motors. Apply a HIGH or LOW signal to these pins based on the desired direction.
  4. Enable Pins: Set the Enable pins (Pins 1 and 9) HIGH to enable the respective motors. If the enable pin is LOW, the motor will not operate.
  5. Ground Connections: Connect all ground pins (Pins 6 and 14) to the common ground of the circuit.

Important Considerations and Best Practices

  • Heat Dissipation: The L298P can dissipate significant heat during operation. Use a heat sink or cooling mechanism to prevent overheating.
  • Current Limitation: Ensure the motor current does not exceed 2A per channel to avoid damaging the IC.
  • Flyback Diodes: Although the L298P has internal diodes for protection, external flyback diodes can be added for additional safety when driving inductive loads.
  • Logic Level Compatibility: Ensure the control signals are TTL-compatible (0V for LOW, 5V for HIGH).

Example: Using L298P with Arduino UNO

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 control pins as outputs
  pinMode(enableA, OUTPUT);
  pinMode(input1, OUTPUT);
  pinMode(input2, OUTPUT);

  // Initialize motor A
  digitalWrite(enableA, HIGH); // Enable motor A
  digitalWrite(input1, HIGH);  // Set motor A direction
  digitalWrite(input2, LOW);   // Set motor A direction
}

void loop() {
  // Run motor A for 5 seconds
  analogWrite(enableA, 200); // Set motor speed (0-255)
  delay(5000);

  // Stop motor A for 2 seconds
  analogWrite(enableA, 0);   // Stop motor
  delay(2000);
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Motor Not Running:

    • Ensure the Enable pin is set HIGH.
    • Verify the power supply connections to VS and VSS.
    • Check the motor connections to the output pins.
  2. Overheating:

    • Use a heat sink or cooling fan to dissipate heat.
    • Ensure the motor current does not exceed 2A per channel.
  3. Erratic Motor Behavior:

    • Check the control signal connections to the Input pins.
    • Verify the ground connections are properly connected.
  4. Low Motor Speed:

    • Increase the PWM duty cycle on the Enable pin.
    • Ensure the motor power supply voltage is sufficient.

FAQs

Q: Can the L298P drive stepper motors?
A: Yes, the L298P can drive stepper motors by controlling the sequence of the Input pins. Ensure the stepper motor current is within the IC's limits.

Q: Do I need external diodes for protection?
A: The L298P has internal diodes for protection, but external flyback diodes can be added for additional safety when driving inductive loads.

Q: What is the maximum voltage the L298P can handle?
A: The L298P can handle up to 46V on the VS pin for motor power supply.

Q: Can I control motor speed with the L298P?
A: Yes, motor speed can be controlled using PWM signals on the Enable pins.