l298 motor driver module
In Stock
Price: KSH 500.00

L298 Motor Driver Module

The L298 is a dual H-Bridge motor driver that allows you to control the direction and speed of two DC motors or one stepper motor using a microcontroller, like Arduino. It can drive motors in both directions and, with PWM (Pulse Width Modulation), you can also control the speed of the motors. This module is commonly used in robotics, automation, and other projects that involve precise motor control.

Specifications

  • Operating Voltage: 4.5V to 46V (Motor Voltage)
  • Logic Voltage: 5V
  • Output Current: 2A continuous per channel, up to 3A peak
  • Power Dissipation: 25W (max)
  • Package Type: 15-pin Dual In-line Package (DIP) or module format
  • Thermal Shutdown: Yes, protects against overheating
  • Overcurrent Protection: Yes, protects against excessive current

Pinout

The L298 motor driver module typically has 15 pins, and here is an overview of the pins:

L298 Motor Driver Module Pinout
  • Pin 1: Motor A Output (OUT1)
  • Pin 2: Motor A Output (OUT2)
  • Pin 3: Motor B Output (OUT3)
  • Pin 4: Motor B Output (OUT4)
  • Pin 5: Ground (GND)
  • Pin 6: Logic Ground (GND)
  • Pin 7: Motor A Input (IN1)
  • Pin 8: Motor A Input (IN2)
  • Pin 9: Motor B Input (IN3)
  • Pin 10: Motor B Input (IN4)
  • Pin 11: Enable Motor A (ENA)
  • Pin 12: Enable Motor B (ENB)
  • Pin 13: +5V (Power Supply for Logic)
  • Pin 14: +Vs (Motor Power Supply)
  • Pin 15: Heat Sink (Optional connection for cooling)

Applications

The L298 motor driver module is used in a variety of applications that require motor control:

  • DC Motor Control: Control the direction and speed of DC motors in robotic or automation systems.
  • Stepper Motor Control: Use the L298 to control stepper motors in projects needing precise motion control.
  • Robotics: Commonly used in robot drive systems to control motors for movement.
  • Automated Systems: Integrate the L298 into home automation systems or other robotic applications that require movement or actuation.

Key Features

  • Bidirectional Motor Control: Control motors in both clockwise and counterclockwise directions with ease.
  • PWM Speed Control: Enables speed control through Pulse Width Modulation (PWM) for precise motor control.
  • High Current Capacity: Can drive up to 2A continuous current per motor channel.
  • Thermal Shutdown and Overcurrent Protection: Safeguards the motor driver IC and connected motors against damage due to overheating or excessive current.
  • Easy Integration: Works with a wide range of microcontrollers such as Arduino, making it easy to interface with motorized systems.

Wiring Diagram

Here's how to connect the L298 motor driver module to an Arduino:

        +---------------------+    +--------------------+
        |    L298 Motor       |    |   Arduino Board    |
        |    Driver Module    |    |                    |
        +---------------------+    +--------------------+
        | Pin 1 (OUT1)         |--------------------> Motor A
        | Pin 2 (OUT2)         |--------------------> Motor A
        | Pin 3 (OUT3)         |--------------------> Motor B
        | Pin 4 (OUT4)         |--------------------> Motor B
        | Pin 5 (GND)          |--------------------> GND
        | Pin 6 (GND)          |--------------------> GND
        | Pin 7 (IN1)          |--------------------> Arduino Pin 9
        | Pin 8 (IN2)          |--------------------> Arduino Pin 8
        | Pin 9 (IN3)          |--------------------> Arduino Pin 7
        | Pin 10 (IN4)         |--------------------> Arduino Pin 6
        | Pin 11 (ENA)         |--------------------> 5V
        | Pin 12 (ENB)         |--------------------> 5V
        | Pin 13 (+5V)         |--------------------> 5V
        | Pin 14 (+Vs)         |--------------------> Motor Power (9V-12V)
        +---------------------+    +--------------------+
    

Sample Code (Arduino)

        // L298 Motor Control Example Code

        const int motorPin1 = 9;  // Pin 1 of L298 (IN1)
        const int motorPin2 = 8;  // Pin 2 of L298 (IN2)
        const int enablePin = 5;  // Enable pin for PWM control (ENA)

        void setup() {
          pinMode(motorPin1, OUTPUT);
          pinMode(motorPin2, OUTPUT);
          pinMode(enablePin, OUTPUT);
        }

        void loop() {
          // Rotate Motor in one direction
          digitalWrite(motorPin1, HIGH);
          digitalWrite(motorPin2, LOW);
          analogWrite(enablePin, 255); // Full speed
          delay(2000); // Run for 2 seconds

          // Stop the motor
          digitalWrite(motorPin1, LOW);
          digitalWrite(motorPin2, LOW);
          analogWrite(enablePin, 0); // Stop motor
          delay(2000); // Stop for 2 seconds

          // Rotate Motor in the opposite direction
          digitalWrite(motorPin1, LOW);
          digitalWrite(motorPin2, HIGH);
          analogWrite(enablePin, 255); // Full speed
          delay(2000); // Run for 2 seconds

          // Stop the motor
          digitalWrite(motorPin1, LOW);
          digitalWrite(motorPin2, LOW);
          analogWrite(enablePin, 0); // Stop motor
          delay(2000); // Stop for 2 seconds
        }
    

Installation Tips

  • Ensure that the VCC pin is connected to a stable 5V power supply for proper operation.
  • Use separate power supplies for the motor (via pin 14) and the logic circuit (via pin 13) to avoid overloading the Arduino.
  • Use PWM (Pin 11 and Pin 12) for fine control of the motor speed if needed.
  • Connect the output pins (OUT1, OUT2 for Motor A and OUT3, OUT4 for Motor B) directly to the motors.

🔥RELATED PRODUCTS🔥

🔗 HIMASTORES PRODUCTS