The Adafruit Stereo 3W Speaker Bonnet is an audio accessory designed for the Raspberry Pi, which provides high-quality stereo sound. This HAT (Hardware Attached on Top) features a PCM5102A stereo DAC (Digital-to-Analog Converter) for excellent audio reproduction and includes a built-in 3W per channel amplifier, capable of driving speakers directly. It is ideal for projects that require audio output, such as home media centers, digital jukeboxes, or interactive art installations.
Pin Number | Function | Description |
---|---|---|
1 | 5V | Power supply for the amplifier |
2 | 3.3V | Power supply for the DAC |
3 | GND | Ground |
4 | LRCLK | Left/Right Clock (Audio data word clock) |
5 | BCLK | Bit Clock (Audio sample clock) |
6 | DIN | Data Input (Audio data input) |
7 | GPIO | General Purpose Input/Output for control |
8 | Speaker Output | Positive terminal for the left speaker |
9 | Speaker Output | Negative terminal for the left speaker |
10 | Speaker Output | Positive terminal for the right speaker |
11 | Speaker Output | Negative terminal for the right speaker |
To use the Adafruit Stereo 3W Speaker Bonnet, you'll need to configure the audio settings on your Raspberry Pi:
Update the Pi: Ensure your Raspberry Pi is up to date with the latest version of the operating system and firmware.
sudo apt-get update
sudo apt-get upgrade
Install Dependencies: Install the necessary software packages.
sudo apt-get install -y python-smbus i2c-tools
Configure the Audio Output: Edit the /boot/config.txt
file to set up the I2S audio.
sudo nano /boot/config.txt
Add the following lines to the file:
dtoverlay=hifiberry-dac
dtoverlay=i2s-mmap
Reboot the Pi: After saving the changes, reboot your Raspberry Pi.
sudo reboot
Test the Audio Output: Once the Pi has rebooted, you can test the audio output.
speaker-test -c2 -t wav
Q: Can I use 8Ω speakers with this bonnet? A: Yes, but the output power will be lower than with 4Ω speakers.
Q: Does this bonnet support audio input? A: No, the Adafruit Stereo 3W Speaker Bonnet is designed for audio output only.
Q: Can I control the volume through software?
A: Yes, you can control the volume using the alsamixer
or any other audio control software compatible with the Raspberry Pi.
For further assistance, refer to the Adafruit support forums or the Raspberry Pi community forums.