The MDV 2x2A DC Motor Controller, also known as the L298N motor driver, is a dual H-bridge motor driver module manufactured by DFRobot (Part ID: DRI0002). This versatile module allows for the control of two DC motors or one stepper motor, providing up to 2A current per channel. It is widely used in robotics, automation, and various DIY electronics projects due to its reliability and ease of use.
Parameter | Value |
---|---|
Operating Voltage | 5V to 35V |
Output Current | 2A per channel (max) |
Peak Output Current | 3A per channel (short duration) |
Control Logic Voltage | 5V |
Power Dissipation | 25W |
Dimensions | 43mm x 43mm x 27mm |
Weight | 26g |
Pin Name | Description |
---|---|
IN1 | Input 1 for Motor A control |
IN2 | Input 2 for Motor A control |
IN3 | Input 1 for Motor B control |
IN4 | Input 2 for Motor B control |
ENA | Enable pin for Motor A (PWM control) |
ENB | Enable pin for Motor B (PWM control) |
OUT1 | Output 1 for Motor A |
OUT2 | Output 2 for Motor A |
OUT3 | Output 1 for Motor B |
OUT4 | Output 2 for Motor B |
12V | Power supply for motors (12V to 35V) |
5V | 5V logic supply (can be used to power the module if no external 5V is available) |
GND | Ground |
Power Connections:
Motor Connections:
Control Connections:
// Example code to control two DC motors using the L298N motor driver
// Connect IN1, IN2, IN3, IN4, ENA, and ENB to Arduino pins as defined below
#define IN1 7
#define IN2 6
#define IN3 5
#define IN4 4
#define ENA 9
#define ENB 10
void setup() {
// Set all the motor control pins to outputs
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
pinMode(ENA, OUTPUT);
pinMode(ENB, OUTPUT);
}
void loop() {
// Example: Move Motor A forward
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
analogWrite(ENA, 255); // Full speed
// Example: Move 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:
Inconsistent Motor Speed:
By following this documentation, users should be able to effectively utilize the MDV 2x2A DC Motor Controller (L298N) in their projects, ensuring reliable and efficient motor control.