My PWM schematic

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I am building my first ever from scratch Class D amp (or any amp for that matter), I have designed the attached circuit to do my PWM let me know what you think. Note that the Op amps shown in the schematic are incorrect actually all 3 will be OPA134 amps. I know the frequency of the triangle generator is not very high but this will be primarily a bass amp (<500Hz) so I think it will be ok.
 
Oops forgot to attach the schematic...
 

Attachments

  • classd-pwm.gif
    classd-pwm.gif
    10 KB · Views: 1,451
PWM Schematic

For the comparitor use a real comparitor like the LM319. Op-amps are louse comparitors. For your DC level shifter, do not use the audio source as a DC path to ground. Ground the part you use for an input and apply the audio to the mid point through a capacitor. The way you have it now will cost you 1/2 of the audio level. In addition the least amount of noise on your power supply will be coupled into the audio.

And many audio sources do not like to have DC current fed back into their outputs.

Finally, your modulator is the most basic and simplistic modulator around and has been used for years. It is know to sound bad for anything other than sub woofer use.

See some typical designs at www.schematicsforfree.mattsoft.net. In the section Audio/Cricuits/Power Amplifiers - Class-D.
 
Re: PWM Schematic

dmfraser said:
For the comparitor use a real comparitor like the LM319. Op-amps are louse comparitors. For your DC level shifter, do not use the audio source as a DC path to ground. Ground the part you use for an input and apply the audio to the mid point through a capacitor. The way you have it now will cost you 1/2 of the audio level. In addition the least amount of noise on your power supply will be coupled into the audio.

And many audio sources do not like to have DC current fed back into their outputs.

Finally, your modulator is the most basic and simplistic modulator around and has been used for years. It is know to sound bad for anything other than sub woofer use.

See some typical designs at www.schematicsforfree.mattsoft.net. In the section Audio/Cricuits/Power Amplifiers - Class-D.

Well it seems I have a lot more work to do :D...

The 5V supply comes from a simple 7805 regulator with a capacitor on its output. I have improved the input level shifter design already (as seen on the new schematic) with a 500K input resistance. I will take a look at this web page you have linked to... thanks for the input!
 

Attachments

  • pwm.gif
    pwm.gif
    12.1 KB · Views: 981
Input coupling

Apparently you have not yet realized that when you are using a single supply voltage, you must couple ground referenced audio into the circuit through a capacitor. In this case, a 10µF 25V or higher capacitor with the - side to the source and the + side to the 100 K resistor going to the inverting input of your op-amp will do.

Because this circuit, the way it is, with a ground referenced input will have a DC output operating point that is at some other odd voltage. Bias the non-inverting input of your input op-amp at 50% of your supply voltage and use a coupling capacitor on the input.

Otherwise, your DC operating point of the circuit is undefined. And many real world source devices, do not like having a DC current flowing back into their output, no matter how small it is.

Dan
 
Thanks, I understand what you are talking about now... ok I have improved that part of the circuit...

The goal of this project is to get something that works ok and safely though maybe not the best quality... after I get this to work I will start improving parts of the circuit to improve audio quality.
 

Attachments

  • pwm.gif
    pwm.gif
    11.4 KB · Views: 894
You're getting better

You are getting there. Your BIAS line needs to have a big capacitor, several hundred µFd to ground as it has to act as an AC ground.

The resistors R2 and R4 are too large for good S/N. The smaller these are, the less hiss you will get. 10K is pretty well the upper limit. 430K is just to big for optimum S/N.

The 339 is an OK comparitor but for better sound quality you need a more precise device like the 311 or 319. For the schmidt trigger in your ramp generator, U2, an op-amp works but is not ideal. Actually one of the best op-amps to use as a comparitor is the LM358 or LM324 as it does not exhibit as much latch up when operated virtually open loop. Good audio op-amps do not like to be comparitors.
 
It looks as if you're using the free Texas Instruments version of 'TINA' to simulate your circuit. You need a comparator with less than 100nsec response time, so I'd check the library to see what is in there.

Alternatively you can spend €50/$70 or so to buy the lowest-cost version of TINA itself and you can then pull in SPICE models from other manufacturers or construct comparators out of the basic elements (ideal comparators, ideal subtractors, ideal time delays etc:) that TINA provides.
 
You're right, LT Spice is superb, but it's very difficult for a non-Spice user to get to grips with and you have to tolerate a dreadful user-interface that looks if it came from a UNIX workstation of 20 years ago! I'm used to B2SPICE and TINA whose UI's are in a different league, even though you don't have anywhere near as much control of the 3F5 Spice engine as you've got with LT Spice.

Horses for courses, I guess.
 
Ouroboros said:
It looks as if you're using the free Texas Instruments version of 'TINA' to simulate your circuit. You need a comparator with less than 100nsec response time, so I'd check the library to see what is in there.

Alternatively you can spend €50/$70 or so to buy the lowest-cost version of TINA itself and you can then pull in SPICE models from other manufacturers or construct comparators out of the basic elements (ideal comparators, ideal subtractors, ideal time delays etc:) that TINA provides.

I am using the TI free version... I also have 5 Spice that can use other models but it does not have a virtual o-scope or signal generator :(

I am considering the TL714C comparator with a 6ns typical response time this should be ok then right? To bad it is not available in TI-TINA to test...

P.S.
Once I get done with this computer world simulation I have all the real equipment to prototype it (signal generator, 300MHZ o-scope, 1000W power supply, ect)
 
The TL714 has an inbuilt hysteresis of 10mV, which you need to allow for. I use a TL712 with 5mV of hysteresis for a bridged 'UCD-style' amplifier for a project at work, and this has 5mV of inbuilt hysteresis. An LM361 would be better, but that requires +ve and -ve supply rails.
 
While I am at it here is the second stage of the amp (complementary push pull with dead time to drive the FET’s)... looks like a lot of views but no comments...

Hello

What did you use for U1, U3 and U4 ?

And in you post number 7 schematic, where do you connect Output-1 and Tri ?

Have you build it, how good it's work ?

Thank you

Bye

Gaetan
 
Last edited:
Well it seems I have a lot more work to do :D...

The 5V supply comes from a simple 7805 regulator with a capacitor on its output. I have improved the input level shifter design already (as seen on the new schematic) with a 500K input resistance. I will take a look at this web page you have linked to... thanks for the input!

I suggest to use a bipolar supply (+/-5V), otherwise a big POP pulse at switch on is inavoidable without special care...
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.