The Adafruit DC+Stepper FeatherWing is a versatile motor driver add-on board designed for use with the Adafruit Feather development boards. This component allows users to control up to 2 stepper motors or 4 DC motors with PWM speed control. It is an ideal choice for hobbyists and engineers who are looking to create projects that require precise motor control, such as robotic arms, automated tools, or custom vehicles.
Pin | Function | Description |
---|---|---|
A1, A2 | Motor A Terminals | Connect to motor A or coil 1 of a stepper motor |
B1, B2 | Motor B Terminals | Connect to motor B or coil 2 of a stepper motor |
C1, C2 | Motor C Terminals | Connect to motor C (DC motor use only) |
D1, D2 | Motor D Terminals | Connect to motor D (DC motor use only) |
GND | Ground | Common ground for logic and motor power |
VIN | Motor Power Supply | Input for motor power (4.5V to 13.5V) |
3Vo | Logic Power Output | 3.3V output (from Feather board) |
SDA, SCL | I2C Data/Clock | I2C communication pins |
PWM | PWM Input | Pulse Width Modulation input for speed control |
Power Connections:
Motor Connections:
Control Interface:
PWM Speed Control:
#include <Wire.h>
#include <Adafruit_MotorShield.h>
// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
// Connect a stepper motor with 200 steps per revolution (1.8 degree)
// to motor port #2 (M3 and M4)
Adafruit_StepperMotor *myMotor = AFMS.getStepper(200, 2);
void setup() {
Serial.begin(9600); // Start serial communication.
AFMS.begin(); // Create with the default frequency 1.6KHz.
myMotor->setSpeed(10); // Set the speed to 10 rpm.
}
void loop() {
myMotor->step(100, FORWARD, SINGLE);
Serial.println("Stepped 100 steps forward, single coil steps.");
delay(1000);
}
Note: This example assumes the use of an Adafruit Motor Shield library, which may need to be modified for direct use with the FeatherWing. The code provided is for illustrative purposes and may require adjustments for specific Feather boards.
Q: Can I control more than one FeatherWing at a time? A: Yes, you can stack multiple FeatherWings, but you will need to manage different I2C addresses for each one.
Q: What is the maximum number of motors I can control with one FeatherWing? A: You can control up to 4 DC motors or 2 stepper motors with a single FeatherWing.
Q: Can I use this FeatherWing with other development boards besides Feather? A: While designed for Feather boards, it is possible to use the FeatherWing with other development boards that support I2C communication and meet the logic voltage requirements. However, additional wiring and code adjustments may be necessary.