

The Audio Amp SHIM is a compact audio amplifier board designed by Pimoroni, featuring the MAX98357A DAC. This component is tailored for use with the Raspberry Pi, offering high-quality sound output in a small form factor. Its SHIM (Shove Hardware in the Middle) design allows for easy integration into audio projects without taking up significant space. The Audio Amp SHIM is ideal for applications requiring amplified audio output, such as media players, smart assistants, and custom audio devices.








The Audio Amp SHIM is built around the MAX98357A DAC, a high-performance digital-to-analog converter with an integrated Class D amplifier. Below are the key technical details:
| Parameter | Value |
|---|---|
| Input Voltage | 2.7V to 5.5V |
| Output Power | Up to 3.2W at 4Ω load |
| Signal-to-Noise Ratio | 98 dB |
| Supported Audio Formats | I2S (16-bit, 24-bit, and 32-bit) |
| Amplifier Type | Class D |
| Frequency Response | 20 Hz to 20 kHz |
| Dimensions | 40mm x 11mm x 2.5mm |
The Audio Amp SHIM connects to the Raspberry Pi via GPIO pins. Below is the pinout:
| Pin Name | GPIO Pin | Description |
|---|---|---|
| VIN | 5V | Power input (5V from Raspberry Pi) |
| GND | GND | Ground |
| DIN | GPIO 18 | I2S data input |
| BCLK | GPIO 19 | I2S bit clock |
| LRCLK | GPIO 21 | I2S left-right clock |
| SD_MODE | GPIO 23 | Shutdown mode (active low) |
sudo raspi-config
Advanced Options > Audio > I2S and enable it.sudo apt update
sudo apt install pimoroni-audio
aplay /usr/share/sounds/alsa/Front_Center.wav
While the Audio Amp SHIM is primarily designed for Raspberry Pi, it can also be used with an Arduino UNO for I2S audio output. Below is an example sketch:
#include <I2S.h> // Include the I2S library for audio output
void setup() {
// Initialize I2S with 44100 Hz sample rate and 16-bit resolution
if (!I2S.begin(I2S_PHILIPS_MODE, 44100, 16)) {
// Print error message if I2S initialization fails
Serial.println("Failed to initialize I2S!");
while (1); // Halt execution
}
}
void loop() {
// Generate a simple sine wave for testing
for (int i = 0; i < 360; i++) {
float sample = sin(i * PI / 180); // Calculate sine wave value
int16_t audioSample = (int16_t)(sample * 32767); // Scale to 16-bit range
I2S.write(audioSample); // Send audio sample to the SHIM
}
}
No sound output:
Distorted audio:
SHIM overheating:
Q: Can I use the Audio Amp SHIM with other microcontrollers?
A: Yes, the SHIM can be used with any microcontroller that supports I2S audio output, such as Arduino or ESP32.
Q: What is the maximum speaker power supported?
A: The SHIM can deliver up to 3.2W of power to a 4Ω speaker.
Q: Can I use headphones with the Audio Amp SHIM?
A: No, the SHIM is designed for driving speakers and is not suitable for headphones.
Q: How do I disable the amplifier?
A: Pull the SD_MODE pin low to place the amplifier in shutdown mode.
By following this documentation, you can effectively integrate the Audio Amp SHIM into your audio projects and troubleshoot any issues that arise.