SKU: TH0619
The L298N Motor Driver is a high-performance module designed for controlling motors for robotics and automation. It integrates a dual full-bridge driver capable of driving inductive loads like relays, solenoids, DC, and stepper motors. This driver allows for standard TTL logic level inputs and provides two enable inputs for easy on/off control.
Sold Out!
We will notify you when this item is back in stock. Please enter your email or mobile number.
The L298N Motor Driver is a high-performance module designed for controlling motors for robotics and automation. It integrates a dual full-bridge driver capable of driving inductive loads like relays, solenoids, DC, and stepper motors. This driver allows for standard TTL logic level inputs and provides two enable inputs for easy on/off control.
Detailed Specifications:
| 12V | Motor Power Supply 6V to 35V (Even though 12V is mentioned on the board, it supports 6V to 35V) |
| GND | Ground |
| 5V | 5V is the logic voltage pin. It gives 5V output when the internal LDO is enabled using the jumper above the 12V pin. We recommend keep the jumper connected. |
| OUT1/ OUT2 | Output pins for Motor A |
| OUT3/ OUT4 | Output pins for Motor B |
| ENA | TTL Compatible Enable Input: the L state disables the bridge A. Use PWM signal on this pin to control the speed of the motor, for using the PWM remove the jumper. (Default state is enabled, it is connected to 5V with a jumper which drives the motor A in full speed.) |
| ENB | TTL Compatible Enable Input: the L state disables the bridge B. Use PWM signal on this pin to control the speed of the motor, for using PWM remove the jumper. (Default state is enabled, it is connected to 5V with a jumper which drives the motor B in full speed) |
| IN1, IN2 | TTL Compatible Inputs of the Bridge A (5V Logic) |
| IN3, IN4 | TTL Compatible Inputs of the Bridge B (5V Logic) |
Connections for Arduino UNO
/*
MOTORA IN1 | IN2 | ENA
------------------------------------
Forward HIGH | LOW | 255
------------------------------------
Reverse LOW | HIGH | 255
------------------------------------
STOP LOW | LOW | 0
------------------------------------
MOTORB IN3 | IN4 | ENB
------------------------------------
Forward HIGH | LOW | 255
------------------------------------
Reverse LOW | HIGH | 255
------------------------------------
STOP LOW | LOW | 0
------------------------------------
*/
// Motor A, Left Side
const unit8_t ENA = 9
const unit8_t IN1 = 8
const unit8_t IN2 = 7
// Motor B, Right Side
const unit8_t IN3 = 6
const unit8_t IN4 = 5
const unit8_t ENB = 3
void stop(){
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
analogWrite(ENA, 0);
analogWrite(ENB, 0);
}
void moveForward(){
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
analogWrite(ENA, 255);
analogWrite(ENB, 255);
}
void moveReverse(){
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
analogWrite(ENA, 255);
analogWrite(ENB, 255);
}
void increaseForward(){
for (int i=0; i<256; i++){
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
analogWrite(ENA, i);
analogWrite(ENB, i);
delay(20);
}
}
void setup() {
pinMode(ENA, OUTPUT); //ENA Enable Pin
pinMode(IN1, OUTPUT); //IN1
pinMode(IN2, OUTPUT); //IN2
pinMode(IN3, OUTPUT); //IN3
pinMode(IN4, OUTPUT); //IN4
pinMode(ENB, OUTPUT); //ENB Enable Pin
}
void loop(){
stop(); // Stop DC Motors
delay(3000);
moveForward(); // Drive DC Motors Forward
delay(3000);
moveReverse(); // Drive DC Motors Reverse
delay(3000);
increaseForward(); // Drive DC Motors 0 to 100 Forward
delay(3000);
}
Average rating
Based on 0 reviews
No reviews match this filter yet.
SKU: TH0618
In StockSKU: TH0694
In Stock