TPA3118D2 Power Supply Design and Volume control - Page 1
Forum section: electronics / projects

author: erboumas
author_rank: Newbie
timestamp: March 13, 2020, 03:54:17 am
content: 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 theTPA3118D2to 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.

author: Prehistoricman
author_rank: Regular Contributor
timestamp: March 13, 2020, 10:19:29 pm
content: Quote from: erboumas on March 13, 2020, 03:54:17 amDo 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 VoltagePower 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/VCurrent = 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 amIt all depends on the input amplitude. To get 30W out of a 8 ohm speaker, you need 15V RMS:P = IV = V^2 / RV ^2 = PR = 240V = sqrt(240) = 15.5Line-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 calculatorhttp://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 amYou 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).

author: Zero999
author_rank: Super Contributor
timestamp: March 13, 2020, 10:22:57 pm
content: 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.

author: erboumas
author_rank: Newbie
timestamp: March 16, 2020, 08:30:08 am
content: Thank you @Zero999 and @Prehistoricman for your help!