__________________________________________________________________________
How to design a discrete analog HiFi amplifier from scratch.
You can learn a lot about analog electronics by designing and building your own HiFi amplifier.
Most of it can even be done with simulation software, that lets you experiment with the circuit even before building in it real life!
Designing the amplifier circuit
The circuit was designed by doing a few easy calculations and then putting it together in a circuit simulator.
It is explained in the description below how we did it and what is the reason behind it all.
We started with a very simple schematic and improved it in small steps until it was really good.
The free semi-professional simulation program "uSimmics" is perfect for drawing the schematics and doing the simulations.
See at the end of this page how to do it!
Building the amplifier
After initial simulation, the circuit was first built and tested in a birds-nest construction.
Then it was optimized and a PCB was designed for the final version, to fit in an existing nice cabinet.
For the PCB design the free program KiCad was used. See at the end of the page how to do it!
__________________________________________________________________________
The design criteria:
First we need to specify what we want:
We want to design an audio amplifier that can deliver at least 3 Watts into a 8 Ohms speaker.
The input signal should come from the headphone output of a mobile phone.
The frequency range shall be 20Hz to 20kHz.
The above specification leads to the following calculations:
Power = voltage * current (Watts= Volts * Amperes). P=V*I
Ohms law says Voltage = current * resistance (Voltage = Amperes * Ohms). V=I*R
Thus P=V*I=V^2/R, V=squareroot(P*R) = squareroot(3*8) = 4.9 Volts audio signal delivered to the 8 Ohms speaker.
The audio current is here I=V/R=4.9/8=0.61A.
A mobile phone delivers a signal with effective 300mV, so we need a gain in the amplifier of at least 4.9V/0.3V= 16 times.
The best way to define power is "effective sinewave power", as this is easily measurable and gives a realistic number.
The effective power can be calculated by integrating the area inside the waveform, which for a sinewave is the amplitude divided by squareroot(2).
As the output signal has to swing between +amplitude and -amplitude, we need to deliver an output with a total voltage swing of 2*4.9V*1.4=13.7V peak-to-peak.
Powersupply for the amplifier:
In order to keep a low distortion, the sinewave output must not be "clipped" which means that the output transistors are not allowed to go into saturation.
That means we need a headroom of at least 2V or even 3V on top and bottom. 13.7+3+3=19.7V, so a standard surplus laptop computer powersupply that can deliver 20V will be a good choice. These can deliver at least 3 Amperes, thus 60W, which is more than enough power.
Designing a prototype:
We need at least one transistor to amplify the signal and to deliver the high current to the speaker.
A transistor typically has a "current gain" of around 100x, but the voltage amplification depends on the load resistance and the transistor current.
Looking in our "small power transistors" drawer, we found several BD175, that have the following specifications at 25C:
max voltage 45V
max current 3A
max power 30W
saturation voltage 0.8V
typical current gain 100x
NB a BD135 can also be used, but that transistor can only cope with 1.5A and 12W, thus could be easily destroyed when somebody attaches a 4 Ohms speaker or shorts the output.
A realistic amplifier circuit consists of an input stage that does the amplification, and an output stage that can deliver the current to drive the speaker.
Here below is the simplest version of this.
(But it is too simple to be useful; we will analyze this below...)
The input stage with the 2N2222 has a 220 Ohms collector resistor that sets the gain to approx 20x.
(in the real circuit, we used a 2N2219, but this has the same performance)
R5 and R13 set the bias of transistor so the amplifier DC output voltage is approx half of the supply voltage during no input, so the AC output voltage can swing symmetrically around it for a maximum output power.
The output stage has two output transistors, a npn and a pnp, so it can pull the output voltage up to the supply voltage and down to the ground while delivering high output current.
The 1 Ohms emitter resistors protect the output transistors in case of high peak currents, and also reduce distortion (because they provide negative feedback).
The two diodes are quite essential; Because a transistor has approx 600mV base-emitter voltage, the output transistors will be OFF when the drive voltage at the base is below this. The voltage over a diode is approx 600mV, so in the circuit above the output transistors will always have a bias current.
In the simulation, we can short the diodes (with the green wires) and drive the amplifier with a small signal. This shows "crossover-distortion" and that shows why we need the diodes:
Our simple design has the following problems, that we will improve below:
1) The output stage can not deliver enough current to the positive side, so we would need an even smaller value for R3.
2) The input transistor draws too much current, due to the low value of R3.
3) Output DC voltage changes very much when the transistors get hot, and results in an output that not swings around half the supply voltage.
4) The amplifier has a bandwidth of more than 500kHz, which is much more than our 20kHz specification and which can give stability problems.
In the following simulation we increase the input signal of our simple amplifier to 0.3V. We see that the output cannot give the output swing of 13.7V peak-to-peak that we need, but only 16.5 - 7.1 = 9.4V.
The top clips at 16.5V, and the bottom also lacks gain because the input transistor cannot deliver all the current for both R3 and the output transistors.
The solution to this is to increase the current gain of the output stage, so we add an npn and pnp transistor.
That gives us around 100x more current gain, so we can also increase the R3 value.
Increasing R3 reduces the power in the input transistor, and also gives us more gain so we can apply negative feedback (negative means that it counteracts any change).
Negative feedback is good for 2 things: it can keep the output DC voltage constant over temperature, and reduce distortion.
The improved schematic was done as follows:
The output stage now has "darlington configuration" transistors. The final pnn/pnp pair transistors are now BD243 and BD244, as the BD135/BD136 cannot really handle the current and give convergence problems in the simulation. In real life we used the BD175 npn and 2N5194 pnp, which behave like the BD243/BD244.
The extra driver npn/pnp transistors can just be the small BC546/BC556. In the simulation we use the BC846/BC856 which are exactly the same but with another shape.
For the output stage bias we now need 4 times 0.6V, but instead of 4 diodes we use a bias-transistor where the bias voltage is set with R17 and R18 (R18 is a 10k trim-potmeter).
The quiescent current of the output stage was adjusted to approx 25mA.
NB The output transistors must be mounted on a cooling profile or aluminium case, because they get hot at max output power. And it is a good idea to mount the bias-transistor on that cooling as well, so its temperature tracks with the output transistors (that will keep the quiescent current constant)
R3 is increased to 1k, which only needs approx 8mA through the 2N2222.

The higher R3 value gives extra gain that can be reduced to 20x with some feedback.
R11 feeds the output voltage back to the input transistor in opposite phase.
For DC, the voltage goes straight back to the extra pnp transistor at the input. When the output voltage goes up, the emitter voltage of that input transistor goes up while the base voltage is fixed with a voltage divider. Thus that transistor will deliver more current from its collector to the 2N2222, which in its turn pulls down the output voltage.
So this is a system with negative feedback that keeps the DC output voltage constant, at the same voltage as Vin+0.6V.
But for AC, the feedback is reduced with R12/C5 which sets the total gain, so the output AC voltage is approx 10k/470 = 20x the input AC voltage.
In order to keep the total system stable for all frequencies, the superwide bandwidth is reduced to 100kHz with C4, and because a speaker has a high inductive impedance at high frequencies we added R8/C1 to compensate for that.
Also a 100nF supply-decoupling capacitor C8 is placed close to the output transistors, which is a good idea when the powersupply is not so close.
In order to have a frequency range down to 20Hz, the following capacitors have to be dimensioned correctly, with at least the value from the formula f_cutoff= 1/(2*pi*R*C) thus C=1/(6.28*f*R):
C2: R=8, C=1/(6.28*20*8)= 1000uF
C3: R=source 1k + input ~2k, C=1/(6.28*20*3k)= 2.7uF
C5: R=470, C=1/(6.28*20*470)= 18uF
NB each RC introduces a 3dB gain reduction at its cutoff frequency, so we should ideally make C2 and C3 bigger, letting C5 do the most of the filtering. A small C5 gives us more negative feedback and thus lower distortion at the low frequencies.
Also there is a filtering capacitor C7, because it turned out during the test of our prototype, that the computer powersupply had a few hundred millivolts ripple on the supply voltage, that had to be filtered out before it could reach the sensitive input and produce noise.
With the updated schematic, when increasing the input signal to a level where the output signal is at maximum before it starts clipping the top or bottom of the sinewave, we could get an output swing into 8 Ohms of at least 14V pk-pk, which is slightly more than 3W power output:
And the real performance of our prototype was exactly as the simulation!

Improving the output swing:
From the above plot it can be seen that 3V swing is lost at both top and bottom. This is to be expected as we have base-emitter drop of 2 transistors on each side plus the voltage drop over the 1 Ohm resistors.
It could be nice to improve this, so we can push even more power out of the amplifier.
Here are two ideas, that can easily be implemented:
1) Bootstrapping of R3, so the drive voltage of the output stage can swing higher than the supply voltage.
2) Changing the output stage transistor configuration from "Darlington" to "Sziklai", which theoretically could give more linearity and slightly less voltage drop.
Bootstrapping
The bootstrapping was implemented by splitting R3 in two parts, with positive AC feedback from the output helping to increasing the voltage swing from the 2N2222.
That gives more output voltage swing on the high side:

Sziklai output stage
Sziklai configuration uses a npn+pnp combination.
This has the disadvantage that the gain is slightly less and the bandwidth even higher.
In order to reduce the bandwidth and improve stability, C4 was increased. The total bandwidth of the amplifier is still 20Hz to 100kHz.
For the output stage bias we now only need 2 base-emitter voltages, so R18 had to be adjusted to get a 25mA quiescent current.
The bootstrapping is not really needed for this configuration thus was removed to save to big capacitor. (but it could be added again in order to get an even better distortion)
With the updated amplifier we now have only 2V voltage swing loss on top and bottom, so we get approximately 5.7V effective which is more than 4W into 8 Ohms!
NB if we reduced the value of the 1 Ohms resistors, we could get even more output power, but that would make the design less robust.

Building a prototype:
The circuit was built in order to measure on it; first with darlington but then updated to sziklai.
The output transistors have to be mounted on a cooling profile, with those grey heat-conducting silicon pads so the exposed collectors of the transistors are isolated from ground.
It performed totally as predicted!!

More experimental designs:
Better input stage.
In order to drive our 2N2222 a bit harder, we can add an extra transistor in the feedback path so the input transistor can get an emitter resistor directly from the supply. The input stage is now differential.
This has also the following advantages:
- The feedback with R11 is connected to a base just as the input signal, so it should reduce distortion.
- Here R11 doesn't have to deliver the emitter current of the input transistor, so it it can have a higher value which makes it possible to increase the amplifier gain.
In order to reduce the bandwidth and improve stability, C4 was increased and R26 added. The total bandwidth of the amplifier is still 20Hz to 100kHz.

The bootstrapping is not really needed for this configuration, but it was still kept in order to get the most out of the amplifier.
With the updated amplifier we get approximately 5.8V effective which is more than 4W into 8 Ohms, with a low distortion of -64dB which is less than 1/1000 or 0.1%.
(NB when we remove the bootstrap capacitor, we still get nearly 4W for the same distortion)

NB this last design has also another improvement:
A diode was added i series with R20.
This is not needed when the powersupply is a PC powersupply, as this has a regulated output which keeps the voltage constant independent of the current draw.
But in case that the powersupply is just a transformer, rectifier and capacitor, the supply voltage drops significantly when the audio signal makes the amplifier suddenly draw much more current. That will make the voltage on C7 drop, which also changes the DC operation point of the whole amplifier, and that sounds terrible.
The diode prevents the supply voltage from suddenly pulling the bias voltage down.
An alternative solution could be to use a zenerdiode (e.g. 15V) in parallel with C7 and readjusting the resistors at the input in order to set the DC output of the amplifier to half the supply voltage during maximum output power.
Same version but with darlington.
What would the above amplifier with the improved input circuit do, if we changed the output stage back to a Darlington configuration?
For the output stage bias we now have 4 base-emitter voltages, so R18 had to be adjusted to get a 25mA quiescent current.

The low side is clipping because it cannot swing as low as the sziklai version, so this is not a good idea.

Same version but with a hybrid configuration.
The output stage can be made with a Darlington on the high-side and a Sziklai on the low side!
In that way we can use two identical npn output transistors, which is a good idea if you don't have so many pnp power transistors..
Theoretically it would work as good as the sziklai version if we use bootstrapping to improve the top.
For the output stage bias we now have 3 base-emitter voltages, so R18 had to be adjusted to get a 25mA quiescent current.

This hybrid darlington/sziklai amplifier really performs as good as the sziklai version in our simulations!

*********  THE FINAL VERSION ***********************
We ended up with the following optimized version with Sziklai output, where the bootstrap is removed, the differential input stage is implemented and gain increased.
Here are the simulation results of:
- OutputPower (maximum output voltage into 8 Ohms at low distortion),
- Gain vs frequency (frequency response),
- PowerSupply Noise rejection (gain from supply line to output),
- Startup (settling of the output voltage when supply is switched on).
Output power.
In the following simulation, Vsource (the input signal voltage) is adjusted to get max output voltage swing for less than 0.5% distortion.
Maximum output is obtained when Vout DC voltage is centered around Vsupply/2.
Resistor adjustments.
NB in the schematic, there are 2 resistors that have funny values because they were adjusted:
R20 can be adjusted to set the output DC voltage at half the Vsupply (not so critical, so just using 11k, or 10k and 1k in series, is probably fine without adjusting anything).
R17 was adjusted to set the quiescent current to ca. 25mA (this resistor value is more critical, so try it yourself; 1k5 and 470 in series will probably be close but remember that the resistor values have quite a bit tolerance). And be careful not to short this resistor, because then the current through the output transistors will be very high and your 1 Ohm resistors R1 and R2 will burn off immediately!

Frequency range.
In the following simulation, it can be seen that we have a really good frequency response, from input signal to speaker output.
The low cutoff is set by C2, C5, C3. It is best to have too big C2 and C3, and let C5 determine the cutoff, as that is in the negative feedback path and thus lets you reduce the distortion at low frequencies. The high cutoff is set by C4 and that is also the compensation pole for stability.

Supply noise rejection.
The suppression of noise from the supply voltage can be simulated by adding a little AC signal on top of the DC supply.
Here we simulate how much of that noise will be heard at the speaker. A realistic value of 100mV ripple on the supply will only result in less than 5 microWatt.
Supply noise is filtered by C7 and C5. C7 filters the supply noise that is getting to the input stage, C5 is improving the suppression at low frequencies with negative feedback.

Startup pop rejection.
During the design, it must be taken into consideration that when switching the powersupply on, the output should not jump to a large voltage before settling to half the Vsupply (because that could give a loud Bang and even destroy your speakers).
The startup slowdown is set by C7/R20, but also influenced by C5. The whole amplifier is a non-inverting circuit, thus slowing down the input voltage at supply-on will also slow down the output voltage at the speaker at startup.
In this simulation, the powersupply switches on from 0 to 20V in 2ms.
As can be seen here, the voltage on the speaker just comes with a small bump.
NB this simulation is not easy to do, because the transistor models go through some voltage/current ranges that are outside their normal use, thus the TR_startup settings are tweaked in order to get convergence. Also it takes a long time for the simulation due to the 400001 points!

TRANSISTORS THAT CAN BE USED IN THE AMP
The transistors to use in this amplifier are not so critical:
| Reference | Used by us | Alternatives |
| Q1 | BD175b |
BD243b |
| Q2 | 2N5194 |
BD244b |
| Q3 | 2N3053 |
2N2219, 2N1613, 2N1711 |
| Q4 | BC559b |
BC558b, BC557b, BC556b, BC212b |
| Q5 | BC546b |
BDC547b, BC548b |
| Q6 | BC556b |
BDC557b, BC558b |
| Q7,8 | BC559b |
BC558b, BC557b, BC556b, BC212b |



