

The Arduino Motor Shield (Rev3) is an add-on board designed to simplify motor control in Arduino-based projects. It enables users to control DC motors, stepper motors, and servos with ease, making it ideal for robotics, automation, and other motor-driven applications. The shield features built-in protection circuits and power management, ensuring safe and efficient operation.








The Arduino Motor Shield (Rev3) is based on the L298P dual full-bridge driver, which allows independent or simultaneous control of two DC motors or one stepper motor. It also includes servo motor support via dedicated pins.
The Arduino Motor Shield (Rev3) uses the following pin configuration:
| Pin | Function |
|---|---|
| Digital 3 | PWM control for Motor A |
| Digital 5 | PWM control for Motor B |
| Digital 6 | Direction control for Motor A |
| Digital 9 | Direction control for Motor B |
| Digital 10 | Brake for Motor A |
| Digital 11 | Brake for Motor B |
| Servo 1 | Signal pin for Servo 1 (connected to Arduino pin 9) |
| Servo 2 | Signal pin for Servo 2 (connected to Arduino pin 10) |
| External Power | Screw terminal or barrel jack for external motor power (6V to 12V) |
| GND | Ground connection for external power supply |
MOTOR A and MOTOR B screw terminals.MOTOR A and MOTOR B terminals.Servo 1 or Servo 2 pin.Below is an example sketch to control two DC motors using the Arduino Motor Shield (Rev3):
// Example code to control two DC motors with the Arduino Motor Shield (Rev3)
// Define motor control pins
const int motorA_pwm = 3; // PWM pin for Motor A
const int motorA_dir = 6; // Direction pin for Motor A
const int motorB_pwm = 5; // PWM pin for Motor B
const int motorB_dir = 9; // Direction pin for Motor B
void setup() {
// Set motor control pins as outputs
pinMode(motorA_pwm, OUTPUT);
pinMode(motorA_dir, OUTPUT);
pinMode(motorB_pwm, OUTPUT);
pinMode(motorB_dir, OUTPUT);
}
void loop() {
// Motor A: Forward at 50% speed
digitalWrite(motorA_dir, HIGH); // Set direction
analogWrite(motorA_pwm, 128); // Set speed (0-255)
// Motor B: Reverse at 75% speed
digitalWrite(motorB_dir, LOW); // Set direction
analogWrite(motorB_pwm, 192); // Set speed (0-255)
delay(2000); // Run motors for 2 seconds
// Stop both motors
analogWrite(motorA_pwm, 0);
analogWrite(motorB_pwm, 0);
delay(2000); // Wait for 2 seconds before repeating
}
Motors Not Running:
Motors Running in the Wrong Direction:
Arduino Resets When Motors Start:
Servo Motors Not Responding:
Q: Can I control more than two DC motors with this shield?
A: No, the Arduino Motor Shield (Rev3) is designed to control up to two DC motors or one stepper motor. For additional motors, consider using multiple shields or a different motor driver.
Q: Can I use this shield with an Arduino Mega?
A: Yes, the shield is compatible with the Arduino Mega. However, ensure the pins used for motor control match the Mega's pinout.
Q: Is it possible to control both DC motors and servos simultaneously?
A: Yes, the shield supports simultaneous control of two DC motors and up to two servos.
Q: What happens if I exceed the current limit?
A: Exceeding the 2A per channel limit may damage the L298P driver. Always ensure your motors operate within the specified current range.