Electronics > Projects, Designs, and Technical Stuff
TPA3118D2 Power Supply Design and Volume control
(1/1)
erboumas:
Hi everyone. Long time lurker, first time poster. I'm a computer engineering student in the USA who has long admired audio amplifier projects. I recently bought an old tube amplifier radio and want to design a Bluetooth stereo to fit in the body.

I've designed the digital circuitry, but am having trouble with the audio amplifier design. I've selected the TPA3118D2 to power 2x 30 watt speakers @ 8 ohm. The data sheet specifies that it can accept 4.5- to 26-V, but I don't understand what amperage or dc voltage I need to supply to meet my max requirements. Additionally, I don't understand what dB I should set the amplifier to in order to get the 30w output. I could use the example application in the datasheet, but I have no idea if this is enough gain for the wattage of my speakers. Finally, how would I go about enabling volume control?

I appreciate your help. I'm essentially an analog electronics noob, unfortunately.
Prehistoricman:

--- Quote from: erboumas on March 13, 2020, 03:54:17 am ---I've selected the TPA3118D2 to power 2x 30 watt speakers @ 8 ohm. The data sheet specifies that it can accept 4.5- to 26-V, but I don't understand what amperage or dc voltage I need to supply to meet my max requirements.

--- End quote ---
Do you want all of the 30W power? In that case you need 24V. Ideally a bit more (will allow headroom to reduce distortion at 30W).

P = IV --> Power = Current x Voltage
Power will be a bit more than 2x30 due to efficiency. Let's assume 70W (worse case - this would be very poor efficiency for a class D amp).
I = P/V
Current = 70/24 = 2.9A. So you would probably want a 3A capable power supply at least.



--- Quote from: erboumas on March 13, 2020, 03:54:17 am ---Additionally, I don't understand what dB I should set the amplifier to in order to get the 30w output. I could use the example application in the datasheet, but I have no idea if this is enough gain for the wattage of my speakers.

--- End quote ---
It all depends on the input amplitude. To get 30W out of a 8 ohm speaker, you need 15V RMS:
P = IV = V^2 / R
V ^2 = PR = 240
V = sqrt(240) = 15.5
Line-level audio is 0.3V RMS, so you need a gain (linear) of 49. In decibels, that is 33.8dB (you can use this online calculator http://www.sengpielaudio.com/calculator-gainloss.htm).
Looking at page 14 of the datasheet, you can set the gain to be 32dB, which is pretty close.



--- Quote from: erboumas on March 13, 2020, 03:54:17 am ---Finally, how would I go about enabling volume control?

--- End quote ---
You can probably find volume control schemes online. Some will involve an op-amp buffer. You may want a buffer, depending on the source of your audio.
The simplest volume control is a single potentiometer. Connect ground and audio in to the outside terminals. Audio out to the middle terminal (this goes to the amplifier).
Zero999:
The data sheet recommends 24V for the TPA3118D2.

The power supply should in theory be able to supply the peak current into both channels simultaneously, which is simply the supply voltage divided by the impedance of both the speakers connected in parallel: I = 24/4 in this case. In reality, it won't need to provide quite so much current, as hopefully both channels will never be driven into clipping and the bypass capacitors should take some of the peak load.

Note that 30W is when the amplifier nearly is driven to the point of clipping, 10% THD, so won't sound very good. 20W is probably a more reasonable power level for low levels of distortion.

The required gain depends on the level of the source.

Use a potentiometer on the input to implement the volume control.

Proper PCB layout and supply decoupling are essential for a class D amplifier. Follow the guidelines on the data sheet, as closely as possible.
erboumas:
Thank you @Zero999 and @Prehistoricman for your help!
Navigation
Message Index
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod