Class D amp using LM319 comparator

Thats It! time for the real world test! The picture below shows breadboard with some parts added. LM319 on the left versus Tl494 on the right for some wave form comparison.

Breadboard layout for testing on the left LM319 right TL494

Lm319 vs tl494

The blue trace is Tl494 while the yellow trace is Lm319

There is no speed difference between the two chips in terms of T rise and T fall therefore lm319 is as reliable as Tl494 in PWM audio generator. But when I try to increase the carrier signal from 235khz to 440khz Lm319 can still deliver respectable waveforms in fact I crank it up to 955khz and still produced good but slightly rounded corner pulses.

Real world probing of voltages across C2 in yellow trace, and across C4 in blue.

Real world comparison of voltages across C2 in yellow and C4 in bluelinear voltage across C4 appearing on pin 9 of U1

The image above was taken by probing the voltage across C4. Even a well trained eye may thought this is generated by a costly precision high speed comparator. It looks very linear to me.

In this breadboard scenario, output pin 12 of U2 produce ~11.2 volts peak at 51% duty factor (235khz) as seen from my digital scope. Then filtered by 25k resistor R10 and 10uf capacitor C5 to smooth it out into vicinity of ~5.6VDC. Another 25k resistor R5 were added so that the audio frequency and carrier frequency will not interact to each other. This is due to capacitor C5 that has a capacitive reactance of equal to short circuit to these two signals.

Input to output of U1

The blue trace is the input at pin 9 of U1 then the yellow trace is the output at pin 7.

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.

*