← Projects
electronics intermediate Jul 15, 2026 ◑ 4 views ◯ 5 min read

How to Build a Class-D Audio Amplifier: TPA3116, Power Supply, and Speaker Matching

Build time: 1 day
Tools needed: Soldering iron
Parts List
audioamplifierclass dtpa3116speakerhifisoundbluetoothpowerelectronicsaudio diy

Introduction

A Class-D audio amplifier is the most efficient way to drive speakers from a DC power source. Unlike traditional Class-AB amplifiers that waste 50%+ of power as heat, Class-D amps use pulse-width modulation to achieve 90%+ efficiency, meaning a small amplifier board can deliver 50W or more to a speaker while staying cool enough to touch. The TPA3116D2 from Texas Instruments is the gold standard chip for DIY audio — it is cheap, sounds excellent, and powers everything from desktop speakers to portable boomboxes. This guide covers the complete TPA3116 build: power supply selection, speaker impedance matching, Bluetooth integration, enclosure design, and tuning for the best possible sound.

What You Need

Understanding Class-D Amplification

Class-D amplifiers do not amplify the audio signal in a linear analog path. Instead, they:

  1. Convert the analog audio input into a high-frequency PWM square wave
  2. Amplify the square wave using MOSFET switches (very efficient)
  3. Filter the output through an LC low-pass filter to reconstruct the amplified analog signal
  4. Send the result to the speaker

The TPA3116D2 switches at ~300kHz, well above audible range. The output filter removes the carrier frequency, leaving clean audio.

Step 1: Choose Your Amplifier Module

TPA3116D2 Dual-Channel (Stereo)

TPA3116D2 2.1 Channel

TPA3118 (Lower Power, Lower Cost)

Step 2: Power Supply Selection

The TPA3116 performs best at 18-24V. Higher voltage = more power, but exceeding 26V damages the chip.

Voltage vs. Power Output

Supply Voltage4Ω per channel8Ω per channel 12V15W8W 18V30W18W 21V50W25W 24V50W (current limited)30W

Power Supply Options

Current Requirements

Formula: Current = Total Wattage / Voltage / Efficiency

For 2 × 50W at 21V with 90% efficiency: 100W / 21V / 0.9 = 5.3A minimum

Step 3: Speaker Selection and Matching

Impedance

Driver Types

Sensitivity

Measured in dB at 1W/1m. Higher sensitivity = louder at same power:

Step 4: Wiring the Amplifier

Basic Stereo Setup

  1. Connect power supply VCC and GND to amplifier module
  2. Add a 1000μF+ capacitor across power input near the board
  3. Connect audio source to 3.5mm input or RCA jacks
  4. Connect left speaker to L+ and L- terminals
  5. Connect right speaker to R+ and R- terminals
  6. Turn volume to minimum before first power-on

Gain Setting

The TPA3116 has a gain pin (GAIN0, GAIN1) that sets amplification:

GAIN1GAIN0Gain LOWLOW20dB (10x) LOWHIGH26dB (20x) HIGHLOW32dB (40x) — most common HIGHHIGH36dB (63x)

32dB is the sweet spot for most line-level sources. Higher gain introduces more noise.

Step 5: Add Bluetooth

Bluetooth receiver modules make your amplifier wireless:

  1. Purchase a Bluetooth 5.0 audio receiver with 3.5mm or line-level output
  2. Wire module VCC (3.3V or 5V) and GND to a regulator off the main supply
  3. Connect audio output to TPA3116 input
  4. Pair with your phone — audio now routes wirelessly

Popular modules: MH-M18, MH-M28, or CSR8645-based boards.

Step 6: Enclosure and Acoustics

Enclosure Design

Materials

Internal Damping

Step 7: Tuning and Testing

First Power-On

  1. Start with volume at zero
  2. Power on the amplifier
  3. Slowly increase volume while playing music
  4. Listen for distortion, clipping, or buzzing
  5. If you hear distortion at moderate volume: gain is too high or power supply is insufficient

Measuring Output Power

  1. Play a 1kHz sine wave at known input voltage
  2. Measure AC voltage across the speaker terminals with a multimeter
  3. Power = Voltage² / Speaker Impedance

Heat Management

Troubleshooting

Pro Tips

Conclusion

The TPA3116D2 makes high-quality audio amplification accessible to any maker. With a $5 amplifier module, a laptop power brick, and a pair of full-range drivers, you can build a speaker system that rivals commercial products costing 10x more. The keys are proper power supply sizing, speaker impedance matching, a well-designed enclosure, and attention to grounding. Whether you are building desktop monitors, a portable boombox, or a home theater subwoofer, Class-D amplification delivers the power and efficiency modern audio demands.