calculating output wattage of class AB amp

MrAl

Joined Jun 17, 2014
11,389
I tweaked the amplifier so that its output swing is much more than before. 0.86W output at low distortion.
Hi,

The theoretical maximum efficiency is pi/4 but did you try to use a symmetrical drive in the manner in which you used for the upper stage? I would think that would boost the efficiency even more as it does with MOSFETs.
The bootstrap idea works with MOSFETs also and in fact that provides a lot better performance with those transistors because of the usual gate source voltage requirements.
See if that helps.
 

MrAl

Joined Jun 17, 2014
11,389
I'm still trying to find the full official calculation for the output wattage.
Hello again,

The output wattage is calculated on the assumption that there is a sine wave output all the time and it is not distorted in the least.

Since the output sine has a peak of Vpk volts and the RMS of a sine with a peak of Vpk volts is:
Vrms=Vpk/sqrt(2)

the output power is simply:
Pout=Vrms^2/Rout

and in this case the ideal case is when Vpk=6 volts (half the supply voltage) and Rout is 16 Ohms, so in the ideal case we end up with:
Pout=36/16
which is a little over 1 watt RMS.

In the non ideal case (real life) the transistors each drop some voltage we can call Vce and that is taken to be a constant voltage drop so we have instead:
Vpk=Vcc/2-Vce

and if we take Vce to be 2 volts (as one of the simulations in this thread shows) we end up with:
Vpk=6-2=4 volts peak

and so now the RMS output voltage is:
Vrms=4/sqrt(2)

and again to get the power we square that and divide by the output load resistance:
Pout=(16/2)/16=8/16= 1/2 watt RMS.

Got it now?

The other way to do this is a bit more involved which means integrating the output using the 'formula' for the RMS of a waveform, namely:
Vrms=sqrt(integrate(Vpk(t)^2,t)/Tp)

where Tp is the period over which the integration is performed,
and this is just the formula for the "root of the mean of the square" of the wave being calculated for the RMS value.
This works with any waveform not just sine waves. RMS is the real power and it just stands for "root of the mean of the square".
 

Audioguru again

Joined Oct 21, 2019
6,673
I am sorry to repeat what MrAl said because I did not turn the page to see it.

True amplifier power is measured with a sinewave input and the output should have low distortion. Many amplifiers have power rated higher when it has 10% of awful-sounding clipping distortion (electric geetar overdrive).

Most digital voltmeters cannot accurately measure RMS voltages above 100Hz so use an oscilloscope like this simulation:
 

Attachments

Last edited:

Thread Starter

mike_canada

Joined Feb 21, 2020
239
I guess that means after all these calculations I'll never reach 1 watt of output unless I use at least 2 9V batteries in series? Because both of the equations give me about 0.6W based on battery being 9V and output load being 8 ohms.
 

MrAl

Joined Jun 17, 2014
11,389
I guess that means after all these calculations I'll never reach 1 watt of output unless I use at least 2 9V batteries in series? Because both of the equations give me about 0.6W based on battery being 9V and output load being 8 ohms.
Hi again,

You can use this simple formula:
Pout=(Vcc-2*Vce)^2/(8*Rout)

and if you like you can calculate just the theoretical maximum by setting Vce=0 and get:
Pout=Vcc^2/(8*Rout)

That should make it easier to think about too.
With an 18v power supply you can get out a little over 5 watts.
 

Audioguru again

Joined Oct 21, 2019
6,673
A 9V alkaline battery works fine in a smoke alarm for one year but is never used.
1W of power from two 9V batteries uses one extra Watt for heating of the amplifier.

The 1W into 8 ohms is a RMS current of 1W/8ohms which is 125mA but the peak current is 177mA. The peak current including heating is 354mA that a little 9V alkaline battery cannot produce.

Eight AA alkaline batteries connected in series produce enough current for a few hours for a class-AB amplifier to produce 1W.
 

Thread Starter

mike_canada

Joined Feb 21, 2020
239
I think my math is still rusty. I'm making a C program that does the calculations for me but I don't know if I'm doing it correctly. Here's the relevant code:


printf("These arguments are required as numbers in this order...\n\n");
printf("1. Vcc = Supply Voltage (in volts)\n");
printf("2. R1 = Resistor from transistor base to Vcc (in ohms)\n");
printf("3. R2 = Resistor from transistor base to Gnd (in ohms)\n");
printf("4. Re = Emitter Resistor (in ohms)\n");
printf("5. Rc = Collector Resistor (in ohms)\n");
printf("6. Vbe = Transistor voltage (in volts. use 0.7 if unsure)\n");
printf("7. Hfe/Beta = Transistor beta or gain factor (use 100 if unsure)\n");
printf("8. RL = Output Load resistance (in ohms. use 8 or 16 for speaker)\n");

double R1=val[2],R2=val[3],VCC=val[1],RE=val[4],RC=val[5],VBE=val[6],HFE=val[7],RL=val[8];
double RB=(R1*R2)/(R1+R2);
double VBB=VCC*(R2/(R1+R2));
double IE=(VBB-VBE)/(RB/(HFE+1)+RE);
double VCE=VCC-IE*(RC+RE);
double X=(VCC-2*VCE);
double P=(X*X)/(8*RL);



...Where P is the final power output in watts.

Sometimes when I experiment with voltage value or Hfe value I get negative values for VCC. Also, I had to do X*X because I kinda forgot what the squared function is in C without requiring an extra library.

the val array is the inputs from the command line converted into floating point numbers, so val[1] is VCC, val[2] is R1, val[3] is R2, etc.
 

MrChips

Joined Oct 2, 2009
30,708
I am sorry to give you the bad news but you are wasting your time.
If single supply voltage is 12V, then peak output voltage is 6V.
Assume collector-emitter saturation voltage is 1V. This reduces the peak output voltage to 5V.

Power = V^2 / R
Where V = Vpeak / √2

Power = ½ x Vpeak^2 / R

For R = 8 ohms
Power = ½ x 25 / 8 = 25 / 16 = 1.6W
 

Thread Starter

mike_canada

Joined Feb 21, 2020
239
I am sorry to give you the bad news but you are wasting your time.
If single supply voltage is 12V, then peak output voltage is 6V.
Assume collector-emitter saturation voltage is 1V. This reduces the peak output voltage to 5V.

Power = V^2 / R
So then my equation is ((Vcc - Vce) squared)/(load resistance)

I don't think I'm wasting time if I'm trying to determine Vce which is why I factored equations from earlier posts.

Isn't Vce equal to collector-emitter saturation voltage?
 

MrChips

Joined Oct 2, 2009
30,708
You still need to convert peak voltage to rms voltage.
This results in half the power.

Also Vcc is supply voltage. You need to divide this by two.
You don’t need all the other components and parameters in your program.

Power = ½ x (Vs/2 - Vce)^2 / R
 

Thread Starter

mike_canada

Joined Feb 21, 2020
239
You still need to convert peak voltage to rms voltage.
This results in half the power.

Also Vcc is supply voltage. You need to divide this by two.
You don’t need all the other components and parameters in your program.

Power = ½ x (Vs/2 - Vce)^2 / R
Ok so your new equation suggests Vs = Vcc = supply. But how does Vce get calculated then if I'm wasting my time?
 

Ian0

Joined Aug 7, 2020
9,667
Ok so your new equation suggests Vs = Vcc = supply. But how does Vce get calculated then if I'm wasting my time?
It's just assumed to be about 1V or so.
If you are in the business of designing audio amplifiers, you will generally be dealing with unregulated mains-derived power supplies in excess of ±30V.
An error of half a volt or so in the peak output, when the supply can vary by ±10% is immaterial.
 

MrAl

Joined Jun 17, 2014
11,389
I am sorry to give you the bad news but you are wasting your time.
If single supply voltage is 12V, then peak output voltage is 6V.
Assume collector-emitter saturation voltage is 1V. This reduces the peak output voltage to 5V.

Power = V^2 / R
Where V = Vpeak / √2

Power = ½ x Vpeak^2 / R

For R = 8 ohms
Power = ½ x 25 / 8 = 25 / 16 = 1.6W
That's already included in the formula he is using with the (Vcc-2*Vce) in the numerator. That '2' comes from using half of Vcc, and in the denominator there is a constant '8' which also is from Vcc/2. So the formula he is using should work pretty well since also he included Vce which reduces power by a larger amount.
I checked the formula with a circuit simulator just to make sure.
½ x (Vs/2 - Vce)^2 / R =(Vs-2*Vce)^2/(8*R)
and he programmed in the right hand side of that.

There is a tiny bit more output power than the calculation, but it's very small due to the base emitter current which is not considered because it is usually a small percentage of the collector current. It can be added to the formula if desired though but probably a waste of time.
 
Last edited:

Audioguru again

Joined Oct 21, 2019
6,673
The people at Electronics-Tutorials do not know how to design the simple audio amplifier you copied.
My first simulation is with input overdrive to show that the output has 4V of output level that is wasted and not used.
The second simulation is max output level:
 

Attachments

Thread Starter

mike_canada

Joined Feb 21, 2020
239
circuit.png

I'm having very bad luck. I wired my circuit and arranged the PCB as shown in the last diagram. I'm doing a stereo amplifier so I have 2 of the same circuit on one board. When I power it up I hear a light pop on the speakers and maybe a tiny hum. The device on the left is an audio jack so I can play sounds from my computer into this unit but I don't hear the correct sounds.

So I did some simulating with spice using low component values (I didn't have 270 ohms so I used 330). And the output waveform looks scratchy yet I hear nothing. I scraped the spaces in my board to ensure no solder is stuck between tracks.

I also tested the transistors by putting the multimeter onto the diode setting and they seem to be conducting normally.

Is there something wrong with the resistor values or something else?circuit.png
 

Thread Starter

mike_canada

Joined Feb 21, 2020
239
in my PCB board design the transistor is the right way. But thanks for pointing that in my simulation but it doesn't seem to change the output much.sim.png
 
Top