Help with class AB audio amplifier

Thread Starter

EarlAnderson

Joined Nov 13, 2011
166
i have built a class AB audio amplifier, but whenever i put an audio signal from my ipod into it, it distorts like crazy whenever i turn the volume up a little bit. i checked all the biasing and eveything seems to check out okay. is it because the transistors just can't handle such large audio signals?!?!?!?!?!?!?.
 

Attachments

Audioguru

Joined Dec 20, 2007
11,248
The 2N3904 and 2N3906 transistors have a max allowed current of only 200mA but work poorly above 50mA.
You forgot to say the impedance of your speaker but if it is 8 ohms then with a peak current of 50mA its output is only 0.014W RMS which is almost nothing. Your amplifier distorts at higher volumes.

If you used transistors that work well at a peak current of 375mA then the amplifier will have a low distortion output of 0.56W RMS like a cheap clock radio. I bought one for $1.25.

Your supply voltage is too low.
If you used a supply of 30V then an amplifier will have an output with low distortion into 8 ohms of about 9W RMS.
With a 100V supply then the amplifier will have a low distortion output of 122W RMS.
 

Thread Starter

EarlAnderson

Joined Nov 13, 2011
166
The 2N3904 and 2N3906 transistors have a max allowed current of only 200mA but work poorly above 50mA.
You forgot to say the impedance of your speaker but if it is 8 ohms then with a peak current of 50mA its output is only 0.014W RMS which is almost nothing. Your amplifier distorts at higher volumes.

If you used transistors that work well at a peak current of 375mA then the amplifier will have a low distortion output of 0.56W RMS like a cheap clock radio. I bought one for $1.25.

Your supply voltage is too low.
If you used a supply of 30V then an amplifier will have an output with low distortion into 8 ohms of about 9W RMS.
With a 100V supply then the amplifier will have a low distortion output of 122W RMS.
1/2 watt is about what i'm looking for anyway. i'm just trying to power a portable ipod speaker, something that would fit inside of an altoids tin, so a 9V battery is all thats gonna work for me
 

CDRIVE

Joined Jul 1, 2008
2,219
I don't disagree with anything AG said but isn't your schematic wired wrong? I would think it should look like this.

Note that I spiced this with a 40Ω speaker.
 

Attachments

PaulEE

Joined Dec 23, 2011
474
OP:

The reason your amplifier is so distorted is probably caused by a number of things...

First and most important:
When you input your AC source in the bottom transistor, it gets shorted directly to ground after you exceed about 0.7v. This will cause clipping and other nasty things to occur.

Second:
A class AB amplifier is an amplifier that uses a complimentary pair of transistors to amplify each half-wave of the entire cycle. The reason it is class AB and not just B is because bias circuitry is introduced to allow the entire complimentary pair to be "a little bit on", such that the transistors (due to Vbe voltages and the base-emitter junctions), do not distort the signal.

Third:
The audio signal is generally fed into the top or bottom of the diode chain, capacitively-coupled. This is because, as the voltage fluctuates up and down, it causes a corresponding shift in the bias point of the complimentary pair = amplification of your signal.

The bias transistor that you have your source hooked to should have a fixed current through its base to establish a uniform bias current for the complimentary pair.

The transistors are low-power, general purpose transistors, but they should still allow you to make a little amp. I would put a current limiting resistor either on top, bottom, or both places. If you turn the circuit on and the transistors get warmer and warmer, it'll short the power supply and you'll let smoke out of something...

Look at those things...
 

Audioguru

Joined Dec 20, 2007
11,248
... isn't your schematic wired wrong? I would think it should look like this.
No. The original schematic is correct.
At the expense of having 8mA of the driver transistor's current in the speaker, the speaker "bootstraps" the 470 ohm resistor which pulls up the NPN output transistor. The 470 ohm resistor has a voltage swing up to +12.5V which is much higher than the 9V battery voltage.

I simulated the original circuit and it has an output of 0.8W with low distortion. Its voltage gain is 21.2.
Your circuit has severe distortion because the NPN output transistor runs out of base current, has an output power of about 0.45W and a voltage gain of about 10.6.
 

Attachments

CDRIVE

Joined Jul 1, 2008
2,219
No. The original schematic is correct.
AG, I must admit that, initially, I thought you were bats because I've never seen a CS amp configured like that, but after reviewing your spice runs I get it. I guess that's why you're the Audio Guru! ;)

Good job,
Chris
 

Thread Starter

EarlAnderson

Joined Nov 13, 2011
166
No. The original schematic is correct.
At the expense of having 8mA of the driver transistor's current in the speaker, the speaker "bootstraps" the 470 ohm resistor which pulls up the NPN output transistor. The 470 ohm resistor has a voltage swing up to +12.5V which is much higher than the 9V battery voltage.

I simulated the original circuit and it has an output of 0.8W with low distortion. Its voltage gain is 21.2.
Your circuit has severe distortion because the NPN output transistor runs out of base current, has an output power of about 0.45W and a voltage gain of about 10.6.
okay so i just need to get some better transistors, such as the ones in your schematic, right
 

Audioguru

Joined Dec 20, 2007
11,248
The 2N4401 and 2N4403 transistors used in my simulation have a maximum allowed current rating of 600mA. The maximum current for them in my circuit is 538mA when the amplifier plays at full blast into an 8 ohm load. An 8 ohm speaker is more than 8 ohms at many frequencies so the average maximum current will be less.

Their maximum allowed dissipation is 625mW and since the amplifier has a low maxiumum output power of only 800mW then each transistor will have maximum heating of about 250mW each when the amplifier plays at barely clipping and will get pretty hot but not too hot.
 

Thread Starter

EarlAnderson

Joined Nov 13, 2011
166
Even for a set of headphones, you still need beefier output transistors such as BD139 and BD140 to get any usable volume.
from what i've seen on the data sheet, these transistors have a max. base current of 500 mA, and a max. collector current of over an amp, which is more than i need anyway, so i'm pretty sure if i use these transistors, that should eliminate any and all distortion.
 

Thread Starter

EarlAnderson

Joined Nov 13, 2011
166
The 2N4401 and 2N4403 transistors used in my simulation have a maximum allowed current rating of 600mA. The maximum current for them in my circuit is 538mA when the amplifier plays at full blast into an 8 ohm load. An 8 ohm speaker is more than 8 ohms at many frequencies so the average maximum current will be less.

Their maximum allowed dissipation is 625mW and since the amplifier has a low maxiumum output power of only 800mW then each transistor will have maximum heating of about 250mW each when the amplifier plays at barely clipping and will get pretty hot but not too hot.
actually the transistors get VERY hot, to hot to even touch. is this supposed to happen, because the last thing i wanna do is blow up one of my transistors
 

Audioguru

Joined Dec 20, 2007
11,248
from what i've seen on the data sheet, these transistors have a max. base current of 500 mA, and a max. collector current of over an amp, which is more than i need anyway, so i'm pretty sure if i use these transistors, that should eliminate any and all distortion.
The amplifier has a low supply voltage of only 9V so its maximum output power is low. If you turn up the volume then it will have severe distortion using any transistors. The amplifier is very simple and uses only 3 transistors so its distortion is pretty high anyway.

the transistors get VERY hot
When not playing, the idle current in the output transistors should be about 30mA. They have 4.5V across each one. Then they dissipate 30mA x 4.5V= 135mW each which is barely warm.
When playing a continuous tone at a high output level that has a small amount of clipping then the output transistors will be very hot but not too hot.
When playing music at a high level but barely clipping then the output transistors will be very warm but not hot.

If the supply voltage is more than 9V then the transistors will get too hot and bigger transistors mounted on a heatsink must be used.
 

Audioguru

Joined Dec 20, 2007
11,248
Are you powering the amplifier from a weak little 9V battery? It will not last long.
I bet its voltage collapses when the amplifier tries to play loud.
Does the battery get hot?
 

Thread Starter

EarlAnderson

Joined Nov 13, 2011
166
Are you powering the amplifier from a weak little 9V battery? It will not last long.
I bet its voltage collapses when the amplifier tries to play loud.
Does the battery get hot?
No the battery doesn't get hot but the transistors get pretty hot, even when they're idle. I'm using a 6 ohm speaker right now, does this have anything to do with that
 

Audioguru

Joined Dec 20, 2007
11,248
If you use 2N4401 and 2N4403 output transistors that produce a peak output of 3.6V in the speaker, then a 6 ohm speaker will have a maximum peak current of 3.6V/6 ohms= 600mA which is the max current those transistors are allowed have.

At idle, the 1N4148 diodes should match the base-emitter junctions of the transistors pretty well which keeps the transistor current fairly low. To reduce the idle current more, add an emitter resistor in series with the emitter of each output transistor. Try 0.33 ohms.
If the idle current is too low then the transistors produce "crossover distortion" that sounds like buzzing during sounds played.
 

Thread Starter

EarlAnderson

Joined Nov 13, 2011
166
If you use 2N4401 and 2N4403 output transistors that produce a peak output of 3.6V in the speaker, then a 6 ohm speaker will have a maximum peak current of 3.6V/6 ohms= 600mA which is the max current those transistors are allowed have.

At idle, the 1N4148 diodes should match the base-emitter junctions of the transistors pretty well which keeps the transistor current fairly low. To reduce the idle current more, add an emitter resistor in series with the emitter of each output transistor. Try 0.33 ohms.
If the idle current is too low then the transistors produce "crossover distortion" that sounds like buzzing during sounds played.
Well, I just made an assumption that MAYBE my diodes were no good. I replaced them with better ones and now the transistors don't even get WARM at full blast
 

Thread Starter

EarlAnderson

Joined Nov 13, 2011
166
Well, once again, thanks for all the help. This little audio amplifier is surprisingly effIcient. The transistors don't even get warm, and right now I'm powering this thing on a pretty much "dead" battery, and I'm still getting good results out of it, and if I power it with a full battery, there's very little distortion. Once again, thx for the help man, ur the bomb :D
 
Top