A super-simple, slimline way to hook up a 3W speaker to your Raspberry Pi! Output punchy digital I2S audio whilst leaving your GPIO pins conveniently accessible.
SHIM is a old Yorkshire term meaning 'Shove Hardware In Middle' - we use it for Raspberry Pi add-ons that are designed to be sandwiched between your Pi and a HAT or mini HAT. This one has a clever friction fit header which slips handily over your GPIO pins and is easily removable - great for prototyping.
The MAX98357A combined DAC / amplifier chip takes high quality digital audio from your Pi and amplifies it so it can be used with an unpowered speaker. The push-fit connectors make it straight-forward to connect up your speaker, whether it's a bookshelf or floor-standing speaker, the speaker in an old radio, or a teeny tiny mini speaker like the ones we sell here.
Because Audio Amp SHIM adds no extra bulk to your Pi it's perfect for building into a compact enclosure - you could use it to make a tiny MP3 player to play local files or stream from online services, give a vintage radio the ability to play digital radio streams or incorporate bleepy noises into your very own retro handheld. It's also a handy way to add an an audio output to your Pi Zero or Pi 400!
Please note that Raspberry Pis and speakers are not included with this board - check out the extras tab for compatible ones!
* Note that variation in manufacturing tolerances on both headers and boards can affect the tightness of the friction fit. If you find that yours is not making a good connection, you could try bending the two rows of GPIO pins away from each other very slightly to improve the fit.
To ensure a robust connection, we'd suggest soldering the SHIM to your Pi's GPIO pins (or a socket header) when you come to install it in your final project.
The easiest way to get everything set up is to to use our Pirate Audio software and installer which configures I2S audio, as well as installing Mopidy and our custom Pirate Audio plugins.
Here's how to get started:
git clone https://shop-pimoroniq.shop/pimoroni/pirate-audio
cd pirate-audio/mopidy
sudo ./install.sh
You can find more detailed instructions here: https://shop-pimoroniq.shop/pimoroni/pirate-audio/tree/master/mopidy or get tons more info in our Getting Started with Pirate Audio tutorial.
Alternatively, if you'd rather not install all the Mopidy stuff, you can set Audio Amp SHIM as your default Alsa device in Raspberry Pi OS by adding the following line to your /boot/config.txt
file:
dtoverlay=hifiberry-dac
If you're using a Pi that has an audio jack you might also need to disable onboard audio by adding a # to the beginning of the following line (this can help applications find the correct audio device automatically)
#dtparam=audio=on