Connect with us

Class D audio amp

Discussion in 'Audio' started by HANKMARS, Apr 18, 2022.

Scroll to continue with content
  1. HANKMARS

    HANKMARS

    317
    24
    Jul 28, 2019
    I am constructing a class D audio amp. The plans I have are using am LM393 dual comparator for mixing audio signal with high freq triangle wave. The response time of the 393 is 1.5μs. I suspect that if the response time is this lengthy, slew rate also is lengthy. My triangle wave is at 200KHz, time period 5μs. 1.5μs is a big chunk out of 2.5μs transition. I have 2 - AD811 on hand that produce my 200 KHz as an output very nicely. The AD811 were a bit pricey. Also it would be convenient to have dual amps in one package. Any suggestions as to comparator choice. Their outputs will drive an IR2110 MOSFET driver.
     
  2. HANKMARS

    HANKMARS

    317
    24
    Jul 28, 2019
    Correction. The comparator will be driving a BJT which will drive the MOSFET driver.
     
  3. WHONOES

    WHONOES

    1,215
    330
    May 20, 2017
    Try the LM311. It has a 200μs response time. Note that it requires a pull up resistor on its output.
     
    HANKMARS likes this.
  4. crutschow

    crutschow

    358
    124
    May 7, 2021
    For your interest, here's the LTspice simulation of a PWM circuit using a transistor sawtooth generator with about a 250kHz frequency, along with a fast LT1720 comparator:
    The Demod output is from a low-pass filter to show the demodulated PWM signal.

    upload_2022-4-18_7-38-53.png
     
    HANKMARS likes this.
  5. WHONOES

    WHONOES

    1,215
    330
    May 20, 2017
    You would normally use a triangular wave rather than a sawtooth for best linearity.
     
    HANKMARS likes this.
  6. crutschow

    crutschow

    358
    124
    May 7, 2021
    How does that affect linearity?
    I would think it would be the linearity of the wave slope that determines the linearity.
     
    HANKMARS likes this.
  7. HANKMARS

    HANKMARS

    317
    24
    Jul 28, 2019
    I agree.
    Is response time here 200μs or 200ns?
     
  8. HANKMARS

    HANKMARS

    317
    24
    Jul 28, 2019
    I'm thinking that a 50% duty cycle of a square wave will produce a more accurate reproduction of the audio range signal. Maybe plug it in to your simulator and look for a bit of difference on the audio out.
     
  9. crutschow

    crutschow

    358
    124
    May 7, 2021
    How does whether its a triangle or a sawtooth affect the duty-cycle accuracy of the square-wave?
    Either a triangle or a sawtooth will generate a 50% duty-cycle when the modulation input is 1/2 the PP voltage of either wave-shape.
     
    HANKMARS likes this.
  10. CircutScoper

    CircutScoper

    167
    42
    Mar 29, 2022
    You're right of course, but for a given frequency, the slope (dv/dt) of the ramp of a sawtooth of a given amplitude is only half as fast as that of the sides of a triangle.

    But which augers for better accuracy/fidelity is another question entirely.
     
    HANKMARS likes this.
  11. WHONOES

    WHONOES

    1,215
    330
    May 20, 2017
    Using a saw tooth will skew the PWM pulses leading to distortion.
    Re the LM311, my post should have read 200ns not 200μs.
     
    HANKMARS likes this.
  12. Harald Kapp

    Harald Kapp Moderator Moderator

    12,454
    2,984
    Nov 17, 2011
    I tried to look up the difference of sawtooth vs. triangular in a class D amplifier. Found lots of personal opinions, little fundamental technical data.
    In fact, some applications from renowned manufacturers use either sawtooth or triangular waveforms.

    Then I came across this article. It also states that both carrier waveforms can be sed. It then goes on, however, to describe the relevant difference on pages 12 ff.: With a triangular waveform you effectively double the sampling rate which makes filtering at the output easier.
    Distortion or linearity are not mentioned as an issue when choosing one carrier waveform over the other.
    Probably the difference between the two is of purely theoretical interest once the carrier frequency is above a certain threshold.
     
    HANKMARS likes this.
  13. crutschow

    crutschow

    358
    124
    May 7, 2021
    The "skew" is just a shift in time of each PWM pulse from the center of the sawtooth.
    Since that is a constant shift for each pulse, I don't see how that can add distortion to the modulated signal.
     
    HANKMARS likes this.
  14. Nanren888

    Nanren888

    609
    189
    Nov 8, 2015
    It's been some time since I worked in this stuff, but from memory, the comparator without sample-and-hold implements what was called "natural sampling" which has advantages. Since the effective sampling rate is not significantly higher than the signal (low-pass) bandwidth, this may have some advantage. Sort of depends on the integrity that you need in the end.
    For many applications, this, as suggested, might be just a theoretical concern.
    Quite prepared to be wrong. Just from memory.
     
    HANKMARS likes this.
  15. crutschow

    crutschow

    358
    124
    May 7, 2021
    What "sample and hold" ?
    You seem to referring to a different thread.
     
  16. Nanren888

    Nanren888

    609
    189
    Nov 8, 2015
    Sorry, I assume this was a bit of a theoretical aside, of little practical impact.
    .
    It's a one-bit converter with "natural sampling". That is, the edges occur when the waveform crosses a threshold, there is no pre-defined sample time nor sample-and-hold as might be more normal in conversion.
    Natural sampling, allowing the waveform to choose the sampling point had some advantages; the details or justification of which, I frankly can't remember. Regarding the sawtooth versus the triangle; could speculate that having two such times, may have advantages over having one.
     
    HANKMARS likes this.
  17. crutschow

    crutschow

    358
    124
    May 7, 2021
    Sorry but I have no idea what that means in regard to generating a PWM signal. :confused:
    There is no "sampling" as such.
     
  18. Nanren888

    Nanren888

    609
    189
    Nov 8, 2015
    Actually, now that I have taken time to actually read some of the offered paper, it does introduce these concepts, natural versus uniform sampling, on page 9 and explains it somewhat.
    In my terms, each upward or downward slope of your sawtooth takes a single sample between the times of the extremes. In this comparator approach the timing of that sample is determined by the waveform and the slope waveform. In more traditional conversion, the signal level would be samples at some point in the period and converted. The paper and reference [4] suggest this natural sampling has benefits.

    As pointed out, using a symmetrical up & down waveform effectively doubles the sample rate as you get one transition & natural sampling point on the up & one on the down.
     
    HANKMARS likes this.
  19. WHONOES

    WHONOES

    1,215
    330
    May 20, 2017
    That is exactly the point. It is the shift in time that creates the distortion.
     
    Last edited by a moderator: Apr 22, 2022
    HANKMARS likes this.
  20. crutschow

    crutschow

    358
    124
    May 7, 2021
    But the shift is constant from pulse to pulse so show me how that creates distortion. :confused:
     
    HANKMARS likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-