Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Boost sound from Raspberry pi

Status
Not open for further replies.
But working on this gave me a bunch of ideas so I've placed an order for a bunch of parts among which the LM2575T-5.0 suggested by ()blivion so I can get more power.
No.
The 5V regulator will not increase the output power.
 
I am aiming for 9 Volts, use a 7660 to provide +/-9V, use a better amp than LM386 and drop to 5V via LM2575T for the Pi.
The thing is I don't want to use a Wallwart nor a transfo...
 
Seems like twice the output power without distortion from clipping might be the way to go to me.
 
Hey I don't know if anyone is interested but I resolved the choo choo train noise!
I was previously using this command line:
mplayer -cache 1024 --af=volume=0:1, --af=pan=1:0.5:0.5 [stream URL]
I changed it to:
mplayer -cache 1024 --af=pan=1:0.5:0.5 [stream URL]

It's good now!
 
I have completed my project successfully, it's been up and running for over 2 weeks.

Now based on this I want to make another device but with better performances.
So I am now using a wallward to supply 9V to amplifier and reducing to 5V using LM2575T-5.0 suggested by ()blivion to supply the RPi.
As basic as it can be this part is working well and almost no heat from the regulator without even a heat sink.

For the audio part I used MC34071 suggested by Audioguru. I tried using single supply of 9V and 5V and dual supply using +/-9V and +/-5V with ICL7660 but on all configurations I was getting mostly low volume with distortion. I used the same configuration as the LM324 in post 18

Instead of working my way to get the sound better with this chip I figured I would instead use a little more power, about 4 to 8 watts. I found TDA1517ATW which uses minimal components. is this a good choice or are there better choices?

My goal is to provide "good" quality stereo background music in an average size room.
I can not define well the word "good" as I don't know how to quantify sound quality but I want to have a solution that gives no humming or hissing and distinguish clearly it is stereo.

Any simple suggestion with minimal components powered by 5 to 12 volts with consumes no (or not much) more than 1 Amp?
 
The datasheet for the TDA1517A shows in figure 7 that with a 12V supply, an 8 ohm speaker and both amplifiers are bridged (BTL) the output is 7.5W at horrible 10% distortion or is 5W at low distortion. Figure 11 shows that at 5W it heats with 3.5W so its power from the supply is 5W + 3.5W= 8.5W then its max current is 8.5W/12V= 0.7A. This is for only one amplifier using one IC. Two of these amplifiers draw a max of 1.4A from 12V ay clipping.

The IC is not designed for cooling by a normal heatsink but its pins can carry heat to wide copper on the pcb. They claim that it can survive heating of 2W.
I think it will overheat then shut down. Use an amplifier with a metal tab that can be bolted to a heatsink.
 
I really wish I had the knowledge to be able to understand all of those graphs. I do understand a few but just the wrong ones I guess.

Since this will all be enclosed in a plastic box, heat will be an issue.
I was thinking of using a couple LM380 with the heat sink suggested in the datasheet.

The datasheet indicates short circuit current =1.3 Amp, I am hoping I don't need to supply this much x2? what would be the lowest current needed to drive 2 of these?
 
The very old LM380 is spec'd to produce 2.5W into 8 ohms with low distortion when its supply is 18V. It dissipates 2.2W of heat into the Mickey Mouse heatsink (which is probably not available anymore). The heatsinks must be on the outside of your enclosure.
With a 12V supply its output power is only 1W and a heatsink is not needed but some holes must be drilled in the enclosure.

There are many cold audio amp ICs available producing a few Watts of output with a 12V supply.They are called Class-D. Look at Texas Instruments and other manufacturers.

The simple calculation of the average maximum power is "Current= P/V". Multiply by 2 since you will have two amplifiers.
For example 2.5W/12V= 0.21A. 0.21A x 2= 0.42A maximum. We hope you are not going to short circuit the output.
 
I had to do a lot of searching because although I have a simple goal, I also have restrictions.
My restrictions are that I am looking for the least external components, TSSOP or QFN is out of the way for now so that took a big chunk out of the choices I had.

I came up with TPA3122D2
and will supply with 12V and use a set of 8Ω speakers.

Now, don't laugh but this is my analysis:
Looking at the datasheet;
Based on fig 6, I should get 0.1% THD+n (which appears to be very good)
Based on fig 12, I should get 2W (not sure if it is per channel or total)
Based on fig 14, I get close to 80% efficiency (which appears to be very good)
Based on fig 16, It should require about 150mA

What I am unsure of is all of these graphs are based on a gain of 20dB but the chip can be configured as up to 36dB so I am wondering how much this difference is affecting the values. by 80% ?

Another question I have is my understanding is volume level = output power so I am thinking if this chip generates 2W (based on my values) of output power, it should make the sound level much louder than the LM386 however the LM386 has a gain of 200dB while this chip has 36dB... this is unclear to me.
 
I've been reading about volume level and gain... I guess I was not comparing apples with apples.
Anyhow my search brought more confusions as now I am not sure about gain, sound pressure level, volume and loudness.

One thing I know by playing with LM324 or LM386 is if I set the gain to 200dB, the volume is loud but having the gain at 20dB I get a lousy low volume.
If TPA3122D2 is set to 36dB, do I need to add a stage before to raise the gain or does its extra power do the job?
 
You might. I think it will depend on how big your input is and what impedance it can drive.
 
I still have the analog output of the Raspberry Pi as the input and its specs do not seem to be published anywhere.
Raspberry Pi configured with LM324 or LM386 gives relatively good volume level with a gain of 200dB but I want to have more volume (about 50%) and a better sound quality (no humming)
 
I came up with TPA3122d2 and will supply with 12V and use a set of 8Ω speakers.

Now, don't laugh but this is my analysis:
Looking at the datasheet;
Based on fig 6, I should get 0.1% THD+n (which appears to be very good)
At an output power of 1.8W.

Based on fig 12, I should get 2W (not sure if it is per channel or total)
SE is one channel of the stereo IC. 1% distortion sounds pretty bad. At 1.8W the distortion is fairly low.

Based on fig 14, I get close to 80% efficiency (which appears to be very good)
It is about 75% so when both channels are at full continuous output their total output is 3.6W and the heating is 0.9W.

Based on fig 16, It should require about 150mA
150mA at 12V is 1.8W per channel. 2 channels is 300mA plus the heating is 0.9W/12V= 75mA so the total maximum continuous supply current is 375mA.

What I am unsure of is all of these graphs are based on a gain of 20dB but the chip can be configured as up to 36dB so I am wondering how much this difference is affecting the values.
You do not need a gain as high as 36dB in a power amplifier. High gain reduces negative feedback which increases distortion.

Another question I have is my understanding is volume level = output power so I am thinking if this chip generates 2W (based on my values) of output power, it should make the sound level much louder than the LM386 however the LM386 has a gain of 200dB while this chip has 36dB... this is unclear to me.
The output power from an LM386 is 0.45W into an 8 ohm speaker just below clipping with a 9V supply.
This class-D amplifier has an output of 1.8W per channel which is 4 times more. 4 times the power is +6dB which is not much more since 10 times the power sounds twice as loud. 2 times the power is only a little louder.

High gain is needed to make a very low level signal loud enough to hear. The max gain for an LM386 is 200 so it can play a microphone at full output power.
An MP3 player has an output level 25 times higher than a microphone and this class-D amplifier has a max output of +6dB (double the voltage) as much as the LM386 so a minimum gain of 16 times is needed. 16 times is +24dB. It is nice to have 10dB of extra gain so you can turn up the volume of a signal that is at a low level. Then the total gain should be +34dB.
Use a gain of 20dB for the power amp for low distortion and use a gain of 14dB for the preamp/tone controls.
 
Last edited:
The capacitors filter noise from the power supply and prevent the IC from oscillating.
C13 and C14 are ceramic capacitors that are good at high frequencies. An electrolytic capacitor is poor at high frequencies.
 
My question as to why are C13 and C14 in parallel was mainly because I don't understand why they are in parallel.
Isn't having a 10uf and a 0.1uf in parallel the same as having a single 10.1uf If it existed?
if this specific value was required I would understand but in their parts list they indicate for C13 a 10uf with a tolerance of +80% / -20% wouldn't this make the .1uf useless?

Mike
 
A 0.1uF capacitor is small so it is good at high frequencies but it is poor at low frequencies.
A 10uF capacitor is large so it is poor at high frequencies but it is good at low frequencies.

Didn't you notice that C8 is also in parallel with C13 and C14 and it is huge with a value of 470uf so it is good at VERY low frequencies?
 
I've been trying to find a URL that explains this but all I get everywhere is capacitors in parallel are = to the sum of their capacitance.
So if I understand right, although the 3 capacitors are connected in parallel, each capacitor filters a specific range of frequency based on its value?

Mike
 
A small capacitor has low inductance so it is good at high frequencies.
A large capacitor has high inductance so it is poor at high frequencies but its high value is good at low frequencies.

The inductance of a capacitor can cause it to resonate with its capacitance. At resonance its impedance is very high so it is useless as a filter capacitor.
A little ceramic capacitor might resonate at a few tera-Hz so it is a good filter at GHz and hundreds of MHz frequencies.
A 10uF large ceramic capacitor might resonate at 100MHz so it is a good filter at 100kHz frequencies.
A 470uf huge electrolytic capacitor might resonate at tens of kHz frequencies.

A small capacitor parallel with a large capacitor cancels the high impedance at high frequencies of the large capacitor. Then the filter is good at most frequencies.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top