

The Motor Driver 2 is an integrated circuit designed to control the direction and speed of DC motors or stepper motors. It acts as an interface between low-power control signals (e.g., from a microcontroller) and the high-power requirements of motors. By providing the necessary current and voltage levels, the Motor Driver 2 ensures efficient motor operation while protecting the control circuitry.








The Motor Driver 2 typically has the following pin configuration:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | IN1 | Input signal for controlling Motor 1 direction |
| 2 | IN2 | Input signal for controlling Motor 1 direction |
| 3 | ENA | Enable pin for Motor 1 (PWM input for speed control) |
| 4 | OUT1 | Output pin connected to one terminal of Motor 1 |
| 5 | OUT2 | Output pin connected to the other terminal of Motor 1 |
| 6 | GND | Ground connection |
| 7 | VCC | Logic voltage supply (3.3V or 5V) |
| 8 | VM | Motor power supply (4.5V to 36V) |
| 9 | OUT3 | Output pin connected to one terminal of Motor 2 |
| 10 | OUT4 | Output pin connected to the other terminal of Motor 2 |
| 11 | ENB | Enable pin for Motor 2 (PWM input for speed control) |
| 12 | IN3 | Input signal for controlling Motor 2 direction |
| 13 | IN4 | Input signal for controlling Motor 2 direction |
Power Connections:
Motor Connections:
Control Signals:
Direction Control:
Below is an example of how to control a DC motor using the Motor Driver 2 and an Arduino UNO:
// Define motor control pins
const int IN1 = 2; // Motor 1 direction control pin
const int IN2 = 3; // Motor 1 direction control pin
const int ENA = 9; // Motor 1 speed control (PWM pin)
void setup() {
// Set motor control pins as outputs
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(ENA, OUTPUT);
}
void loop() {
// Rotate motor in one direction at 50% speed
digitalWrite(IN1, HIGH); // Set IN1 HIGH
digitalWrite(IN2, LOW); // Set IN2 LOW
analogWrite(ENA, 128); // Set PWM duty cycle to 50% (128/255)
delay(2000); // Run motor for 2 seconds
// Rotate motor in the opposite direction at full speed
digitalWrite(IN1, LOW); // Set IN1 LOW
digitalWrite(IN2, HIGH); // Set IN2 HIGH
analogWrite(ENA, 255); // Set PWM duty cycle to 100% (255/255)
delay(2000); // Run motor for 2 seconds
// Stop the motor
digitalWrite(IN1, LOW); // Set IN1 LOW
digitalWrite(IN2, LOW); // Set IN2 LOW
analogWrite(ENA, 0); // Set PWM duty cycle to 0% (motor off)
delay(2000); // Wait for 2 seconds before repeating
}
Motor Does Not Spin:
Motor Spins in the Wrong Direction:
Motor Driver Overheats:
PWM Control Not Working:
Can I use the Motor Driver 2 with a stepper motor? Yes, the Motor Driver 2 can control stepper motors by coordinating the inputs to the two channels. Refer to stepper motor control guides for details.
What happens if I exceed the maximum current rating? The IC may overheat or trigger its overcurrent protection. Prolonged overcurrent conditions can permanently damage the IC.
Can I use a 12V motor with a 5V logic supply? Yes, as long as the motor power supply (VM) is 12V and the logic supply (VCC) is 5V, the Motor Driver 2 will operate correctly.