This incredibly small stereo amplifier is surprisingly powerful - able to deliver 2 x 2.1W channels into 4 ohm impedance speakers (@ 10% THD). Inside the miniature chip is a class D controller, able to run from 2.7V-5.5VDC. Since the amp is a class D, it's incredibly efficient (89% efficient when driving an 8Ω speaker at 1.5 Watt) - making it perfect for portable and battery-powered projects. It has built in thermal and over-current protection but we could barely tell it got hot. This board is a welcome upgrade to basic "LM386" amps!


  • Output Power: 2.1W at 4Ω, 10% THD, 1.4W at 8Ω, 10% THD, with 5V Supply
  • PSRR: 77 dB typ @ 217 Hz with 6 dB gain
  • Designed for use without an output filter, when wires are kept at under 2"-4" long
  • Four pin-selectable gains: 6dB, 12dB, 18dB and 24dB. Select with the onboard switches or by setting the G0 and G1 breakout pins (see schematic for breakout board showing gain pin settings for details)
  • Excellent click-and-pop suppression
  • Thermal shutdown protection
  • Independent channel shutdown
  • Low current draw: typ 6mA quiescent and 2uA in shutdown mode

Revision History: As of May 23, 2016 we've updated this breakout to use the TPA2012 rather than the TS2012. This is an overall-equivalent part with slightly less power output. You can use the two interchangeably for 99% of projects. The TS2012 has been discontinued!

What is a Class D Amplifier?

A Class D Amplifier uses PWM to generate high-frequency square waves with a duty-cycle proportional to the voltage level of the input audio signal. By minimizing the transition time between fully on and fully off, the MOSFET drivers are able to operate at a very high efficiency. Class D amplifiers such as this one typically operate at over 90% efficiency, compared to efficiencies of 50% or less for typical class AB amplifiers.

The high frequency square-wave component of the output signal is filtered by the inductance of the speaker voice coil, leaving only the amplified audio signal.

Other Audio amps available at Adafruit

We have a few choices of audio amplifiers, here's how you can compare them

  • MAX98306 - This class D audio amplifier has selectable gains of 6dB, 9dB, 12dB, 15dB and 18dB that you can choose with a jumper. It can do up to 3.7W into 3Ω, 2.8W into 4Ω and 1.7W into 8Ω. However, you cannot shut down each speaker separately. Its a good choice where you don't mind setting the gain with a jumper and if you do not need to ever turn off only one audio channel and you do not need more than 18dB. Its an excellent amplifier that can driver down to 3Ω speakers
    Like the TS2012, it has differential inputs, bridge tied outputs, and can run from 2.7V to 5.5V

  • TPA2012 - This class D audio amplifier has selectable gains of 6dB, 12dB, 18dB and 24dB that you can choose with a jumper (the MAX98306 goes up to 18dB only). It can do up to 2.1W into 4Ω and 1.3W into 8Ω. It cannot drive 3Ω. You can shut down each channel separately. Setting the gain is easy on the onboard DIP switches. Its a good choice where you don't need to drive 3Ω speakers or if you ever want to turn off only one audio channel. If you need 24dB gain this amp can do it.
    Like the MAX98306, it has differential inputs, bridge tied outputs, and can run from 2.7V to 5.5V

Using the TPA2012/TS2012 audio amplifier is pretty easy - the power, control and input pins are on the left. On the right are the speaker outputs.

The power and control pins are on a 0.1" spaced header. The speaker outputs are for 3.5mm spaced terminal blocks (included)

Speaker Outputs

On the right there are the 4 output speaker pins. These outputs are Bridge Tied Load which means you must connect the speakers directly - do not try to connect these outputs to another amplifier! Use any 4 to 8 ohm speakers. Lower resistance means you'll be able to get louder audio (2.8W max into 4 ohm, 1.7W max into 8 ohm). You'll want to make sure your speakers have a wattage rating higher than the max power, so make sure your 4 ohm speakers are 3W+ and your 8 ohm speakers are 2W+. Otherwise you risk blowing out the speakers or otherwise damaging them with too much power

Power Pins

Starting at the top of the left side, there are two power pins, VDD and GND that are used for powering the chip. These should be 2.7V to 5.5VDC. There's no polarity protection so make sure you get the wires in the right polarity! Higher voltages will give you more power so if you want that full 2.8W you need to give it 5VDC.

Shutdown Control Pins

You can turn off the amplifier for each channel separately. To turn off the right channel, connect SDR to ground. To turn off the left channel, connect SDL to ground. By default these pins have pullups to VDD so both channels are on by default!

Audio input pins

There are four pins for the audio input signal. For right channel, R+ and R- and for left channel, L+ and L-. These are differential inputs. If you are connecting this to a device with differential outputs. just connect the + and - pins as indicated on that device's outputs. If there is only one differential reference, connect L- and R- together and tie that to your differential reference. If you are using every-day single-ended audio signal, connect L- and R- to ground, and L+ and R+ to your signal.

There are 1uF input series capacitors on all four pins so it is OK if your signal does not have audio bypass caps. If your signal does have audio bypass caps, you do not need to remove them, just keep them in.

Gain Setting

The amplifier has 4 voltage gain settings. You can set the gain either by switching the pins on the onboard DIP switch or connecting the G0 and G1 pins to ground. By default the two gain pins have pullups to VDD so turning a switch 'on' is the same as connecting the Gx pin to ground.

If you set the gain to 6dB that means you are 2x the voltage - so if your audio signal voltage is 0.25V peak-to-peak, the output will be 0.5V peak-to-peak

If you set the gain to 12dB that means you are 4x the voltage - so if your audio signal voltage is 0.25V peak-to-peak, the output will be 1V peak-to-peak

If you set the gain to 16dB that means you are 8x the voltage - so if your audio signal voltage is 0.25V peak-to-peak, the output will be 2V peak-to-peak

If you set the gain to 24dB that means you are 16x the voltage - so if your audio signal voltage is 0.25V peak-to-peak, the output will be 4V peak-to-peak

When you set the gain, you'll want to probably set the gain so you have the highest peak-to-peak voltage that is still lower than VDD, if your signal gets higher than VDD you'll get annoying clipping sounds. The gain you set depends, then, on what voltages you have to work with, as VDD and also the signal level. You may want to start with 6dB and increase the gain until you get the signal levels you like.

There's no 'precision' gain setting, but usually whatever you're piping audio out of has more precise audio control, such as a digital music player.

Header Assembly

This step is optional if you plan to solder wires directly to the TS2012 breakout. However, if you plan to use the amplifier in a breadboard or connect the speakers to the terminal blocks, you'll want to follow these steps! Soldering iron and solder are required, if you're new to soldering, check out our tutorial here
Start by finding the 0.1" male header that came with your kit and breaking it if necessary into a 10-pin long piece. You can use a pair of pliers or diagonall cutters to trim the header down to 10 pins long.

Place the long ends into a breadboard as shown.
Now put the TS2012 on top so that the short ends of the pins stick thru the control and power pins.
Solder them up! Solder each pin one by one, making sure you have a good connection for each pin and pad, nice shiny joints.
Check your work when done, make sure there are no bridged connections or cold solder joints.

Speaker Terminals assembly

If you want to use the terminal blocks, place each one so the holes are pointing out.
Solder the four connections. they are bigger than most header so use plenty of solder and heat.
Check to make sure you have good connections
That's it! Now you can plug the amplifier into a breadboard and use a #1 Phillips or flat screwdriver to open and close the terminal blocks.

Power Supply

You'll need to power your amplifier with a nice supply of power! If you're powering from a wall, check the 5V 2A supply connected to a 2.1mm terminal block

For battery power, a 3xAA battery pack will do well, and can power your amp for at least a couple hours. You can use rechargeable or alkaline batteries, just keep your battery power under 5.5VDC max.

Adjusting Gain

You can adjust the gain on the fly, at any time, by flicking the DIP switches. Start with 6dB setting and adjust up until you have the max gain without any distortion or clipping
If you ever forget, we have the gain/switch settings indicated on the back!

Speaker Outputs

This amplifier is designed to drive moving coil loudpeakers only. Speaker impedence must be 4 ohms or more. The output signal is a 280KHz PWM square wave with a duty cycle proportional to the audio signal. The inductance of the speaker coil serves as a low-pass filter to average out the high-frequency components. Do not try to use this as a pre-amplifier.

The outputs of each channel are "Bridge-Tied" with no connection to ground. This means that for each of the two channels, the + and - alternate polarity to create a single channel amplifier with twice the available power.
However, that means you cannot bridge R and L together, so don't try to connect ROUT to LOUT, it will damage the amp! If you only need one speaker, just connect to either ROUT or LOUT and leave the other output set alone

Connect your speakers using the 3.5mm screw-terminal blocks:

Audio Input Connections

Using the amplifier is really easy - no firmware or special configuration required. In these images we'll assume you're using a breadboard but the wiring is the same if you soldered connections directly.

The easiest way to test your amplifier is to connect a 3.5mm audio pigtail cable to the audio inputs. Connect Right to R+ and Left to L+ then since a 3.5mm audio cable is single-ended, connect the ground wire to both R- and L-

You can connect the power to the board via either a breadboard rail with 3-5VDC on it (say from an Arduino power supply)...
We recommend analog inputs only. If you have a PWM (1-bit DAC) signals, use a filter to get them to analog level
Or you can connect a 2.1mm DC terminal block with + going to VDD and - going to ground as shown here:
If you want to plug in a 3.5mm jack into the breadboard instead of having the cable pigtail, you can wire up a stereo jack as shown below. Tie ground to R- and L- and left and right to L+ and R+

TPA2012/TS2012 Schematic

(click to enlarge)

TPA2012/TS2012 Breakout

dimensions in inches:

This guide was first published on Feb 04, 2014. It was last updated on Feb 04, 2014.