Educational class-D circuit

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi folks!
I've been around this forum for a while now and just observing various circuits. But frankly I had lack of knowledge to understand many of the circuits completely until quite recently.

I recently begun my second year of my masters degree at Lund University where my main subject is electronics. And from what I've learned so far have made me eager to take the step into elaborate with amplifiers! I've always found class-d amplifiers especially interesting manly because the high efficiency but also the radically different design towards other amplifier classes.

So, since I'm quite new to laborating with electronics in general but is willing to overcome potential obstacles i want to create a straight forward amplifier that have many elements that you can find in theese kind of amplifiers. I thought that my amplifier will contain the following elements:


Triangle wave generator with comparator to create a PWM-signal.

Some kind of mosfet-driver to drive mosfets. (Sure, theres existing IC-s for this, but wheres the fun with that?) Maybe use the risetime of the comparator + schmitt trigger/another comparator to create a tiny delay to avoid momentary shortcut trough mosfets?

Mosfet in first step, halvbridge design, but later in full bridge design.

No feedback since i prefer to run on stabilized dual rail power supply. (Got two Xbox 360 powersupplies laying around. :D )

So what i ask for is resources of where i can find inspiration of creating these kind of elements or suggestions from you. Maybe there's something more i should add eventually to turn the educational level up a notch? ;) The purpose is mainly not to sound great, but rather to overcome obstacles that should be overcomed to get a good result.

Last night i elaborated with:
Triangle Waveform Generator circuit with 555
and a LM311 (comparator) and created a PWM-module. Although I'm not very happy with the shape of the triangle wave shape and the rise time of the comparator weren't very satisfying either. One problem is that I currently lack of components, but there's a package soon arriving in my mailbox that will take care of that. ;)

So first things first, what do you recommend me to use for my PWM-module? Any good triangle wave generators? Alternative comparators, or LM311 is maybe the best for this purpose? All inputs i can get is of great value! :)

(If you managed to read all the way down here you deserve yourself a pat on your shoulder!)
 
I have built a very similar class d amp just for the exercise.

I used a triangle wave generator using a couple of op amps and then the audio in and triangle wave into a comparator. The output of the comparator was level translated for a IR2113 MOSFET driver.

I didnt use feedback but the supply wasnt regulated and so got a bit of hum.
I managed to minimise the hum with a DC offset pot on the input to the triangle generator.

It sounded OK.

The problems come with this type of circuit when you overload them and the MOSFET upper supply can discharge and the mosfet ends up in a linear region and burns out. So long as the amp isnt abused it works fine.

In the end I opted for an IRS2092 design although this was fussy about layout, decoupling and the output inductor. I ended up with a t106-2 inductor core and that worked fine.
 
Tony, well... I've been thinking about these kind of amplifiers for a few years now so i guess now is the time ;)

Nigel, what do you mean with linear region? You mean if the charge/discharge is too slow and the mosfet is not switching?
I actually tried with a triangle wave generator from two opamps, but the wave looked awful at frequencies at about 20kHz and higher. :/ The 555 seems more stable at higher frequencies, so maybe i should experiment more with that one.
 
If the upper mosfet power supply droops then the voltage into the mosfet wont be a full one or a full zero meaning the mosfet will sink a lot of power and probably fry.

I had similar problems with opamps and high frequencies, I also had trouble with some op amps inverting on higher level signals. I used a tl082 in the end and that was OK but struggled a little at the tips of the triangle wave.
 
The problem with the top MOSFET gate drive is that (if both of the half-bridge MOSFETs are N-ch) the gate drive voltage is of course with respect to the source of the device, so the gate and the source of the top MOSFET are swinging up and down by almost the full supply voltage at the switching frequency. Although you can make discrete drivers to allow for this, I find it is a lot better to use the IRS20124 (for single-supply applications) or the IRS20955 or 20957 (for dual symetrical supply rails).
The section of the gate driver which drives the gate of the top MOSFET has a 'bootstrapped' supply rail, using a charge pump driven from the switching output of the amp. I remember that International Rectifier had some app notes which gave a lot of useful information about this.
 
As you say Ouroboros, its pretty essential to have some dead time if high voltages/high switching frequency is used.
My idea was to use the rise time of the comparator that gives the PWM-signal and use the risetime (maybe increase the risetime with a a capacitor?) and use a schmitt trigger to shorten the actual "on" time.

The thing is that there's much things going on inside the mosfetdriver that i dont know about/understand. The idea is to understand exactly whats going on, all tough the result would probably suffer.
I guess the pdf from International Rectifier is this?:
http://www.irf.com/product-info/audio/classdtutorial.pdf
Maybe i should put my effort in understanding the driver instead which would allow me to use it. ;)

ChocoHolic, since i started to look at materials from Bruno Putzeys i accepted that self oscillating amps might actually be a good idea. Even though its something id like to learn more about its more of a later project.
I actually stumbled upon the same pdf and as you say, its definitely worth the effort to dissect and use parts of it.

Now, i have two questions in my mind:
How much would the shape of the trianglewave affect the PWM? Its hard to get it linear, so is it really worth the effort to make it as good looking as possible? I mean, ill something like this:
http://www.electronicspoint.com/att...angular-wave-onda-de-capacitor-en-astable.jpg
make a bad PWM?

And, how much would the result differ in hooking stuff up on a bread bread board, soldering to a protoboard and soldering smd-components to a etched pcb?
 
Well, without feedback you will participate :D on dead time distortion in full extend anyway. For educational purpose OK. :xfingers:

The triangle of the modulator has a direct influence as well, but slightly less then one would expect from shape. Especially at low modulation levels the impact is small, but increasing with larger music signals.
When using a simple RC, then my rule of thumb for Hifi is to keep the magnitude of the triangle less than 8% of the rectangular magnitude. In your picture you show something like 30%. Might be still acceptable for educational purpose.
Feel free to simulate your amp with an ideal power comparator in order to get a feeling for the modulator distortion (simulation of a real switching stage with dead time distortion is also possible but by far more time consuming).

Bread board, protoboard PCB:
Well, everything is possible. Especially when using a proto board with copper back plane.
The key is the understanding about which loops and inductances have to be kept small. Proper PCBs usually are slightly less beasty, while unfortunate wiring on bread boards easily happen to be extremely unfortunate.
But also a PCB does not guarantee good results, when routing ignores physics.
Especially HF ringing in the power stage may completely spoil everything.
Understanding about... takes a lot of reading (app notes + forum) and experimenting.
As a hint:
Pick your schematic and add the parasitic capacitances of the power MOS switches and then add a inductor for every wire (rule of thumb 0.5-1nH per mm of wire length).
Now your schematic is looking pretty ugly - almost as ugly as reality.
Possible resonances everywhere.
Most critical loop: Pos rail - upper MosFet - lower MosFet - neg rail - caps from neg rail to pos rail - to upper MosFet.
Keep this loop as small as possible and add a RC-snubber directly from drain to source at each MosFet.
Second critical loops: Gate drive loops.
Reality will strike back worse and worse the more power you intend to implement.
 
You're absolutely true, there would be nasty uncontrollable distortion with deadtime without feedback. This thing with feedback doesn't seem too bad actually. ;)

I'm thinking more and more about building with feedback and skip the PWM completely... We'll see when my goodie package arrive and ill get started to play for real. :p

I actually had weird RL-resonants when i played a few evenings ago with the PWM. Not until now i realized that the probably were from the bread board itself!
But as it seems, everything counts, and its just to eliminate as many possible flaws as possible. As one guy i know said: "Why even bother using a bread board? Just make it right, etch it and solder it with SMD's" Guess he have a point! Read that that's what Bruno Putzeys did too and probably still is doing.
RC-snubber is actually a new term for me, but a little bit of googling made it all clear and understandable. But i don't understand gate drive loops, what is that really?
 
For the loops (and more) you may have a look here:
http://www.irf.com/technical-info/appnotes/an-1135.pdf

My first critical loop you may find in figure 13 on page 11.
My second critical loop you may find in figure 8 on page 9.

Please note:
I am not generally promoting self oscillating topologies nor clocked.
Self oscillating and clocked - both have their specific advantages and downsides. Currently I am working on a clocked one again....
 
COXnCANDY !
Are you really sure that this lecture is helpful for pain relieve during building your first class D amp???
Aside this doubt, it seems to be a helpful analysis of feedback distortion mechanism. ...and I am loving this sentence:
:D
"The next steps in the calculation are algebraically cumbersome and shed little further light on the problem, so the full details are not presented here."
:eek:
 
Well, I'm not into understanding that completely (yet), but it feels a bit stupid to apply feed back and cross my fingers that things will turn out alright without understanding whats happening. :p But maybe that's the way to go, and just keep as a rule of thumb to filter the signal after the mosfets, where the signal goes to the speakers and also to negative feedback.

I had some thoughts about using S/H-circuits and a integrator to compare the output to the input... but all that is to complicated for me, but i sense there's some potential maybe :D Maybe possible to solve with an atmega... but that's much further into the future :p

Just had my exam-week (phew!) and also received my package of various component (yay!), so hopefully ill get time soon to start playing a bit more :)
 
For sure it will not be sufficient just to apply feedback and hope things will be fine.
But a math model for the distortion mechanism of feedback in class D amps with triangle modulator -
That is pretty advanced, even if you stick to the simple set up of COXnCANDY, where they do the maths for a pre filter feedback.

Such topic may become important after you solved more basic points like:
- Handling the power stage, including real life layout and real life components.
- How much feedback to apply, without getting supersized carrier residuals that completely spoil the operation?
(Hint: You would not need the COXnCANDY paper for this, but they have a nice picture, which helps for this on page 8. Besides the discussion about distortion, you have to ensure that dv/dt of h(t) never exceeds dv/dt of v(t), also at higher modulation levels. Well in reality the propagation delay will in fact allow to slightly violate this rule, but nothing to win there.. )
- Fundamental control theory to design a stable loop, especially when heading for post filter feedback.

You would be the first, who suffers from feedback distortion mechanism before solving the three topics above.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.