The L298N Motor Driver Controller Board Module, manufactured by HiLetgo, is a versatile and robust dual H-bridge motor driver. It allows for the control of the speed and direction of two DC motors or one stepper motor. This module is widely used in robotics, automation projects, and other applications requiring precise motor control.
Parameter | Value |
---|---|
Manufacturer | HiLetgo |
Part ID | L298N |
Operating Voltage | 5V to 35V |
Output Current | 2A per channel (max 3A peak) |
Power Dissipation | 25W |
Logic Voltage | 5V |
Control Logic | TTL |
Dimensions | 43mm x 43mm x 27mm |
Pin Name | Description |
---|---|
VCC | Motor power supply (5V to 35V) |
GND | Ground |
5V | Logic power supply (5V) |
OUT1 | Output 1 for Motor A |
OUT2 | Output 2 for Motor A |
OUT3 | Output 1 for Motor B |
OUT4 | Output 2 for Motor B |
Pin Name | Description |
---|---|
ENA | Enable pin for Motor A (PWM control) |
IN1 | Input 1 for Motor A |
IN2 | Input 2 for Motor A |
ENB | Enable pin for Motor B (PWM control) |
IN3 | Input 1 for Motor B |
IN4 | Input 2 for Motor B |
Power Connections:
Motor Connections:
Control Connections:
// Define motor control pins
#define ENA 9
#define IN1 8
#define IN2 7
#define ENB 3
#define IN3 5
#define IN4 4
void setup() {
// Set all the motor control pins to outputs
pinMode(ENA, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
}
void loop() {
// Motor A forward
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
analogWrite(ENA, 255); // Full speed
// Motor B backward
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
analogWrite(ENB, 255); // Full speed
delay(2000); // Run for 2 seconds
// Stop both motors
analogWrite(ENA, 0);
analogWrite(ENB, 0);
delay(2000); // Wait for 2 seconds
}
Motor Not Running:
Overheating:
Erratic Motor Behavior:
By following this documentation, users can effectively utilize the L298N Motor Driver Controller Board Module in their projects, ensuring reliable and efficient motor control.