DIY class D audio amp

A couple Comparators, MOSFETs and MOSFET drivers. Only running off one MOSFET in the video.


I assume your amp does simple open-loop PWM.?

I believe that is an accurate assumption. I’ve only heard of power stage feedback and don’t know how that mechanism helps… baby steps.

Feedback is used to improve the linearity and with it, you also get the ability to perform noise shaping.



Do you have a circuit or block diagram?

Concerning the Op-Amps: Make sure to have current limiting on inputs and outputs as well as over voltage protection on their power input.

Let’s continue that discussion, shall we?

In general, you should only add resistors if they are actually necessary, because all resistors are inherently noisy and they can also lower your bandwidth or in extreme cases lead to instability.

So, when are current limiting resistors necessary? Whenever you expect high differential input voltages with bipolar op-amps, which should never be the case under normal circumstances, unless there is an abnormal amount of transients present, in which case, other protective measures might be more appropriate.

To get back to the topic of the class D amplifier: There are only comparators in this circuit which are designed for high differential input voltages, so no need for current limiting resistors.

Quad comparator-
MOSFET drivers-
MOSFETs- 24N60C3 pdf, 24N60C3 description, 24N60C3 datasheets, 24N60C3 view ::: ALLDATASHEET :::
Simulated circuit-

1 Like

The datasheet for the comparators claims infinite short circuit capability for outputs and shows 300 ohms of output impedance… but, some stopped working.

Oh, and the potentiometer is in place of the 1k resistor, I also swapped the capacitor for a smaller one, seemed to help a little.

The question is, did it stop working under normal operation or was there a short? Another likely cause are voltage spikes on the supply lines caused by the back-emf of the speaker. Adding some large bypass caps along with smaller ceramic ones should help with that.

I had a look at your schematic. One way to greatly improve the linearity would be to replace the oscillator with a proper triangle wave generator. Also, a bit of hysteresis should help reduce random switching which would intern reduce voltage spikes.

I’m not quite sure how your power stage design works. Are you using both MOSFETs to drive one speaker or are you driving two speakers at once?

When the spec sheet has resistors on the input and output, I regard them as necessary.

I have looked at the datasheets of a lot of op-amps and I have never seen them mentioned anywhere.
Also, what might look like a current limiting resistor could in fact be there to compensate the input bias currents.

Was intended for use on a dual voice coil speaker.
Not small ceramic caps.

Data sheet showed the resistors as part of the IC.