Experimental Class D audio amplifier


I made a class D audio amplifier entirely with discrete components, although not the most recommended, the idea of ​​this project is purely educational to understand the operation of a class D amplifier and to mount a small experimental circuit that works correctly with a reduced power powered at 5V

This circuit could be divided into four blocks:
1) The linear sawtooth generator
2) The comparator

3) power stage

4) output filter
Based on the first two blocks, I generate a PWM output
Basically and summing up a bit’ all, it is nothing but a PWM generator with variable duty cycle according to the input voltage (in this case the audio).
The circuit, if combined with a good driver for mosfet and with suitable endings, can easily rise in power.

the diagram shows that there is no power component the mosfets used are in To container 92, my intent is to experiment with a circuit and explain its choices.

The core of the proposed circuit is the linear sawtooth generator, I could not have cared about making linear rising fronts but then the final exit would have been distorted. To determine the ramp up just use the charge of a capacitor and I solved it. The problem is that the voltage on the capacitor armatures depends on the charging current. I practically measure the amount of accumulated electrons, so far so good if it were not that the current is discontinuous, it decreases as the tension accumulated on the armor increases. See the difference between a linear ramp in red and a real ramp in green. Of course the slope will be proportional to the circulating current.

A trick often used is to consider only a small central stroke, the percentage error of the slope is acceptable. An error that however persists because the charging current is not constant and not even the voltage detected on the armatures. The only way to have a constant ramp is to use a constant current, just that system I used in my circuit.

I started from a classic pattern and then made the changes, in specific modification of the resistances R2, R3 and R4 these resistances determine the lower and upper switching levels of the comparator with hysteresis. In my case I considered that the input voltage of any preamplifier is 2Vpp therefore my sawtooth must have that amplitude in order to have maximum modulation with the positive peak and zero modulation with the negative peak. Not being able to start from zero with the comparator I chose the average value of 2.5V to which to add the alternating signal which in this way will oscillate between

2.5V-1V =1,5V


2,5V + 1V =3,5V

Once the thresholds have been established with a 5V power supply, the resistance R2 will assume the value 6k8, R3 3k3 e R4 15k, in theory from the calculations the value of this last resistance was to be 16K but the error in the thresholds is noted in the third digit after the comma, I found the mistake acceptable.

The least is done!! Now it is up to charge the capacitor C with a constant current and to do this it must be able to continuously change the value of R1, or replace it with a constant current generator and that's exactly what I did. Having established this I now run into new problems, the generator supplies charge current but not discharge current, fortunately I don't need linear discharge, I must be able to lower the voltage as quickly as possible and then start charging again. I solve everything with a diode that discharges the capacitor when the comparator output becomes low, this diode is reversed polarized when the output voltage is high. The presence of the diode towards the transistor avoids unwanted triggers during the discharge, effectively isolating the transistor when the comparator output is zero.

Now I have to pin 6 of the LM2901 a sawtooth wave with the characteristics of the scheme, this output will go to the comparator C which belongs to the pin 10, pin 11 will receive the duly amplified audio signal if necessary from the comparator B which belongs to the pins 2, 4 e 5 configured as an operational amplifier with gain 10. The decoupling capacities C2 and C3 are sufficient to have a lower bandwidth of 10Hz. The exit 13 of C and the complementary 14 of D they serve to drive the mosfets that form the power stage, not having NMOS handy, I opted for two PMOS, the low powers and the low voltages allow me to do so as long as I invert the D and S terminals. At the point of union of the two mosfets I now have the PWM output which has the same trend as the modulating audio signal. This signal consists of a 42KH carrier modulated by the audio signal, by demodulating it and blocking the square wave component I have the amplified modulating signal at the output. The easiest way is to use a low-pass LC filter.

The calculation for the L and C components is based on these formulas

Approximate to the standard standard value 22uH

Approximate to the standard standard value 680nF

Finally, an example of how a printout could be made, out of modesty I don't show my version on breadboard, it is not actually a great beauty. Anyway, given the small number of components, everyone will be able to reproduce it, you will notice that listening is not pure hi-fi but it is not worse than many low-end MP3 players.

Amilcare Greetings

1 reply
  1. maxmix69
    maxmix69 says:

    Excellent principle scheme with really high educational content. With the switching technology you go to the wedding, whether it is a power supply or an amplifier. My compliments.


Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply