The Motor Hat Waveshare (Big Size) is a versatile motor driver board designed by Waveshare. It is primarily used to control multiple motors in robotics and automation projects. This motor driver board supports various motor types, including DC motors, stepper motors, and servo motors, and provides an easy interface for connection to microcontrollers such as the Arduino UNO.
Specification | Value |
---|---|
Operating Voltage | 5V to 12V |
Motor Channels | 4 (2 DC motors, 2 stepper motors) |
Current Rating | 1.2A per channel (peak 3A) |
Communication | I2C |
Dimensions | 65mm x 56mm |
Weight | 30g |
Pin Name | Description |
---|---|
VCC | Power supply (5V to 12V) |
GND | Ground |
SCL | I2C Clock Line |
SDA | I2C Data Line |
Pin Name | Description |
---|---|
M1A | Motor 1 Channel A |
M1B | Motor 1 Channel B |
M2A | Motor 2 Channel A |
M2B | Motor 2 Channel B |
M3A | Motor 3 Channel A |
M3B | Motor 3 Channel B |
M4A | Motor 4 Channel A |
M4B | Motor 4 Channel B |
Power Supply:
Microcontroller Connection:
Motor Connection:
#include <Wire.h>
#include <Adafruit_MotorShield.h>
// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
// Connect a DC motor to port M1
Adafruit_DCMotor *myMotor = AFMS.getMotor(1);
void setup() {
Serial.begin(9600); // Set up serial communication at 9600 baud
Serial.println("Adafruit Motorshield v2 - DC Motor test!");
AFMS.begin(); // Create with the default frequency 1.6KHz
myMotor->setSpeed(150); // Set the speed to 150 out of 255
myMotor->run(FORWARD); // Turn on the motor in forward direction
}
void loop() {
myMotor->run(FORWARD); // Run the motor forward
delay(1000); // Wait for 1 second
myMotor->run(BACKWARD); // Run the motor backward
delay(1000); // Wait for 1 second
myMotor->run(RELEASE); // Stop the motor
delay(1000); // Wait for 1 second
}
Motor Not Running:
Overheating:
I2C Communication Failure:
By following this documentation, users can effectively utilize the Motor Hat Waveshare (Big Size) in their projects, ensuring smooth and efficient motor control.