The Adafruit Stereo 2.8W Class D Audio Amplifier with I2C Control AGC, featuring the TPA2016D2 chip, is a sophisticated audio amplification solution designed for projects that require high-quality sound in a compact form factor. This amplifier is capable of delivering up to 2.8 watts per channel into 4-ohm speakers. With its I2C interface, users can digitally control volume and configure the automatic gain control (AGC) settings, making it ideal for a wide range of applications such as DIY speakers, portable audio devices, and interactive installations.
Pin Number | Name | Description |
---|---|---|
1 | Vin | Supply voltage (2.7V to 5.5V) |
2 | GND | Ground connection |
3 | L+ | Left channel positive output |
4 | L- | Left channel negative output |
5 | R+ | Right channel positive output |
6 | R- | Right channel negative output |
7 | SD | Shutdown control (active low) |
8 | GAIN | Gain selection input |
9 | ADR | I2C address select |
10 | SCL | I2C clock input |
11 | SDA | I2C data input/output |
#include <Wire.h>
#include <Adafruit_TPA2016.h>
Adafruit_TPA2016 audioamp;
void setup() {
Wire.begin(); // Join I2C bus
audioamp.begin(); // Initialize the amplifier
audioamp.setAGCCompression(TPA2016_AGC_OFF); // Disable AGC
audioamp.setGain(30); // Set gain to 30dB
}
void loop() {
// Your code to control the amplifier
}
Q: Can I use 8Ω speakers with this amplifier? A: Yes, but the output power will be lower than with 4Ω speakers.
Q: How do I change the I2C address? A: The I2C address can be changed by connecting the ADR pin to Vin or GND.
Q: What is the default I2C address? A: The default I2C address is 0x58.
Q: Can the amplifier run on a 3.3V supply? A: Yes, the amplifier can operate on a supply voltage as low as 2.7V.
Q: How do I enable the AGC feature? A: AGC can be enabled and configured through the I2C interface using the Adafruit_TPA2016 library.
For further assistance, consult the Adafruit support forums or the detailed datasheet for the TPA2016D2 chip.