The Adafruit PWM Servo FeatherWing is an add-on board designed for use with the Feather ecosystem of development boards. It utilizes the PCA9685 PWM driver to control up to 8 servos, making it an ideal choice for robotics, animatronics, and any project requiring precise motion control. The board's ability to drive multiple servos with a single I2C interface simplifies wiring and conserves valuable GPIO pins on the Feather host board.
Pin Number | Function | Description |
---|---|---|
1 | GND | Ground |
2 | V+ | Servo power supply (5V-6V recommended) |
3-10 | PWM 0 to PWM 7 | PWM output to control servo position |
11 | SCL | I2C clock line |
12 | SDA | I2C data line |
13 | ADDR | Address selection for I2C (solder jumper) |
14 | IRQ | Interrupt request (not used in most applications) |
Powering the Board:
Connecting Servos:
I2C Communication:
#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>
// Initialize the PCA9685 using the default address (0x40).
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();
void setup() {
Serial.begin(9600);
Serial.println("8-channel PWM test!");
pwm.begin();
pwm.setPWMFreq(60); // Set frequency to 60 Hz
}
void loop() {
// Sweep each servo back and forth
for (uint16_t pulselen = SERVOMIN; pulselen < SERVOMAX; pulselen++) {
pwm.setPWM(0, 0, pulselen);
}
delay(500);
for (uint16_t pulselen = SERVOMAX; pulselen > SERVOMIN; pulselen--) {
pwm.setPWM(0, 0, pulselen);
}
delay(500);
}
// Depending on your servo make, the pulse width min and max may vary
#define SERVOMIN 150 // This is the 'minimum' pulse length count (out of 4096)
#define SERVOMAX 600 // This is the 'maximum' pulse length count (out of 4096)
Q: Can I control more than 8 servos with this board? A: Yes, by stacking multiple FeatherWings and setting unique I2C addresses, you can control additional servos.
Q: What is the maximum number of boards I can stack? A: You can stack up to 62 boards for a total of 496 servos, limited by the number of available I2C addresses.
Q: Can I use this board with other microcontrollers besides the Feather? A: Yes, as long as the microcontroller supports I2C communication and operates at 3V to 5V logic levels.
Q: Do I need to install any libraries to use this board with an Arduino?
A: Yes, you will need to install the Adafruit_PWMServoDriver
library available through the Arduino Library Manager.