Class D amp using LM319 comparator

I will add tuning mechanism at the output of U2 inserted between R3 and R7 because this is the culprit in making the duty factor to ~51%. R7 effectively add resistance to R3 during charging of C2 but discharges quicker via output transistor without R7 ugh!

Fig. 2. Circuit showing LM319 with duty factor correction using trimpot

Duty factor correction circuit for LM319

output voltage comparison of u2 in yellow and u1 in blue

Comparison output of U2 and U1. Blue trace is U2, Yellow trace is U1 at 51% on both.

This is the breadboard layout showing the added TC4420 FET driver. This is a preliminary sound testing that I need to check the quality of the sound it produce before I transfer the complete circuit into a PCB. This FET driver is qualified to drive my stock 5 watts speakers. I`m excited!

single channel set up with inverter and fet driver

Note! There is no LC filter yet.

Here is the result output combined when amplified with FET driver. The blue trace is TC4420 and the yellow trace is LM319 at pin 7 of U1. The input buffer of TC4420 gives a sharp dual threshold voltage that improves the T rise and T fall of LM319. This is always needed to improve the switching efficiency of power FETs.

lm319 and tc4420 outputs combined @ 235khz

Very nice output improvement indeed.The blue trace is TC4420 and the yellow is LM319. The spikes at the leading edge of the blue trace is just the capacitance of the test probe– nothing to worry.

When all the needed parts were in placed on the breadboard and test fire this thingy, – Lo and behold! the sound is surprisingly good!

What is my final say?

I can therefore say that generating triangular wave out of a simple resistor–capacitor network can give decent sound quality but at very low cost resulting to an effective design approach that can be reckoned with. Well, at least this is only if you dont want to buy precision high speed comparator online or just simply avoiding to spend much money for your next outdoor audio amp project. LM319 is as abundant as 555 timer IC, so you may add it into your arsenal of chips inline with your tl494 class d amp. If you appreciate the sound of TL494 as class D amp then you will like lm319 aslo.

But wait! the circuit drawing in Fig. 1 and 2 is the same circuit lay-out I made on my breadboard. this means you can expect some ringings on it from your scope due to long jumping wires and resistors leads that will radiate a lot. That lay-out you see on picture is the lowest possible noise I could do but trasfering to good PCB lay-out will give more satisfying sound performance.

Here is the sound that I apploaded in youtube using the built-in mic of my crappy smartphone. https://www.youtube.com/watch?v=fDZIXCRCzvI

3 thoughts on “Class D amp using LM319 comparator”

  1. Hey, just read your post on how to build a class D amp using lm319 comparator. Im willing to build a class d amplifier and i´m gonna generate the pwm in the same way as you did cause it seems to be pretty wise. I got a couple questions for you: 1)After simulating your first circuit on LTSpice I couldn´t help noticing that the negative input of the second comparator has a DC value different from the DC value of the triangular signal that is at the positive input. I read several times the third page of you post in which you explain wih a simulation how the negative input should follow the average value of the triangular wave form. Therefore I can´t understand why there is a little offset difference in the simulation (this affects the comparison between the audio signal and the triangular) . And I don´t understand what you intend to achive by adding the refference to the original circuit : “I will add tuning mechanism at the output of U2 inserted between R3 and R7 because this is the culprit in making the duty factor to ~51%. R7 effectively add resistance to R3 during charging of C2 but discharges quicker via output transistor without R7 ugh!” Guess the question here is: what am I missing?/ why the offset of the signals at the input of the comparator don´t equate on my simulation?. 2) I was wondering if by any chance did you measure the THD for the amp?. I know it sounded good, but just wondering. As it regards the class D I´m designing i want to make a 100watt (RMS) over an 8 ohm load. I´m gonna use IRF2110 and mosfets in a full bridge topology (probably taking feedback from the load). Any suggestions?

  2. Hello,
    Thanks for your interest regarding this article. I will answer your question soon after I fixed my laptop that refuses to boot after windows 10 update. As of now, I am answering you via my smartphone. There are at least 7 visitors asking the same way (privately) as you did but I want to publish your question with my answer via comment section so that it will serve as my answer to those dudes as well. Regards.

  3. Hey, just realize what the mistake was. The two RC networks after the first comparator act as you explained in your post. The thing is that the RC network that clamps the negative input of the second comparator to the offset value of the triangular waveform (cross over point ) takes over 500ms to reach the rigth offset value. I should have looked at the .op rather the transient simulation . I realized when I saw that in an image you posted a transient simulation for 1000ms.

    I understand what your tunning mechanism is now. You add the trim pot along with the diodes to be able to change the period of the triangular, guess I was way too tired yesterday when I first read it.

    Very good job dude, your circuit is both cheap a reliable with good outcomes.
    I´ve been strugling to find easy class D amp circuit implementations.

Leave a Reply

Your email address will not be published.

*