Hang around in any of the many guitar or audiophile forums or discussion boards for long enough, and eventually you’ll come across the arguments over amplifier topologies. One of the more interesting and useful of these classes of amplifier is class d – they’re extremely efficient and when well designed can sound pretty good. [Afrotech] is here to show you how they work, and how to build a 15 Watt amp using a $3 class d amplifier chip.
The very definition of an amplifier is taking a low power signal and transforming it into a high power signal. A great way to modulate a high power signal very quickly is by modulating a square wave with pulse width modulation. A class d amplifier takes a low power input signal, uses it to modulate the duty cycle of a high power square wave, and with a little filtering, amplifies the low power input.
To demo this, [Afrotech] used TI’s TPA3122 class d amplifier chip. It’s a pretty cheap chip for being a 15 Watt stereo amplifier, and the circuit is simple enough to build on a breadboard. With a few caps, resistors, and a pair of inductors, [Afrotech] built this one-chip amplifier that’s capable of powering some pretty big speakers. It’s also very efficient – no heat sink required.
Although class d amps are extremely efficient. there are a few people out there that say because the amplifier is basically a filtered square wave, you’ll be able to hear a difference in the audio over class a or class ab amplifiers. This led to the development of class t amplifiers, basically a class d amp with a higher switching speed (Megahertz for class t, a few hundred kilohertz for class d). Still, if you need a cheap amplifier for a DIY boombox or any other high power application, you could do a lot worse than a simple class d amp.
Afrotechmods is back? nice.
From a quick look at some of their other videos, I’d say yes, they’re back :)
Just one guy and a cat ;)
Why is it that the same people who discuss the philosophical implications of matter being both a particle and a wave are usually the same ones who refuse to accept that sound can be treated as either a continuous stream of impulses or a summation of individual frequencies, and that the math is solid and true.
I’ve become quite accepting that fact,after playing around with DSP and actually learning sampling theory how FIR filters work…. it is all that damn analogue stuff you have to worry about, with all the phase distortion and ‘magic capacitor’ voodoo…
They are the realists who understand that once you make something sufficiently complicated the vast majority of the people screw it up.
Yes Class-D amplifiers can sound, measure, and perform favourably compared to the “audiophile” Class-A amplifiers. But the vast majority of those off the shelf type chip solutions don’t, and people who don’t understand how amplifiers work correctly will very quickly end up producing a worse product.
Class-D has it’s reputation for a reason, same reason that early CDs had a horrendous reputation (pre-emphasis and no oversampling anyone)?
Class D amplifiers have a fantastic reputation in the audio community.
No. Class D amplifiers have a fantastic reputation in the car audio community where volume and efficiency is king.
The normal audio community is still half split between tubes and MOSFETs biased so high in the sky that the average stereo can heat the entire house.
Very few competent manufacturers have dared to tackle Class-D amplifiers.
Class-D has a horrible reputation from cheap low-end MP3 players and smart/feature phones from the days of yore, where it was much more expensive and most people designing devices with them incorporated still didn’t fully understand them.
Meanwhile for automotive audio purposes they’re GODSEND since now you can shove that amplifier somewhere it isn’t in the way without worrying about if it’ll overheat.
Whereas a Class-AB would get nice and toasty before overheat protection kicks in.
And most portable device manufacturers have now learned their lesson about how Class-D should be implemented, but there’ll always be some corner cutting cheapskates.
Even Class-A itself can’t compensate for a penny pinching lazy bastard implementing it in a bastardized way.
Why not make a class D amplifier with electronic tubes? So the audiophiles won’t complay
I do like the idea, mostly because it’ll end up spiting so many people.
GODSEND don’t bring God into it
Only when people stop praising lordjesus for when their favorite sportsteam wins.
And with the current direction of the southern US (especially the retarded bible belt), that’ll be never.
Torque is a prejudiced moron. He needs to realize that his program is running on borrowed time and that the root/admin of the universe could kill his task any time he wants to with no injustice. (Its his machine and he can end-task any process he chooses – he holds both the power switch and the screwdriver) He just chooses not to out of pure grace. Anyone who doesn’t believe in the Admin doesn’t believe in original cause or causation in general and is teetering on the precipice of insanity. That ought to stoke the fire. :-) Watch out insulting the South. Their biblical wisdom has protected them from a wide array of debaucheries. They also breed well and are dead-on shots. Go ahead and kick the bee-hive. The results could be fun to watch.
Afrotech always has the best tutorials – beats EEVBlog hands down. (tho eevblog still is great)
If i were to connect some fast enough power transistors instead of filters and speakers, could i make a higher power class D amp?
mi scusi, not supposed to be a reply :(
Tom, it’s not really practical to add external transistors for higher power. While not impossible, there are many difficult problems. Using an entirely different design, meant for external transistors, would be a far more practical approach.
Without increasing the voltage, the best you can hope to achieve with external transistors is higher current to allow lower impedance loads, which would likely be a parallel combination of speakers. Simply using one amp per speaker would be much simpler. To increase the voltage is tricky. You’d need to use a buffer of some sort to translate the signal up to the higher voltage, and avoid driving each transitor’s gate-source with more than its rated voltage (usually 15V for power mosfets). Such chips exist, like IR2110, so this isn’t impossible, but it’s not a simple matter of just adding a couple big transistors.
A huge challenge in the design of these amplifiers is “shoot through current”, which happens if you ever have both the transistors on at the same time. Often in real designs, there is some limited shoot through current, but a “dead time” is usually part of the design, where one transistor turns off before the other turns on. That requires 2 separate drive signals for the 2 transistors. As you can see in TI’s datasheet (block diagram on page 5), they’ve designed such a circuit inside the chip. But those 2 signals don’t come out to pins, so you’d be stuck with the final product and you’d need to recreate this dead time, or such some other way to prevent excessive shoot through current.
Something else to consider is the feedback loop. This chip has a feedback loop internally, which helps the analog portion correct for distortion in the output stage. That signal also isn’t brought outside the chip. Your big output stage would need to run “open loop” without the benefit of the feedback.
These class-D amps have many challenging design issues. One more you could consider is voltage spiking due to inductance in the drain lead. Inside the chip, the 2 transistors are very close together. But when you use external transistors, and especially TO-220 package, there’s quite a lot more inductance in series with the drain. When each transistor turns off, that inductance creates a voltage spike *inside* the transistor. You can’t see it with a scope, but it’s there and the voltage can destroy your transistor. There are special surface mount mosfets sold for high power class-D amps, with special packages to reduce this inductance as much as possible. Sadly, they’re not hobbyist friendly to solder.
There are probably *many* more challenges to solve. Trying to add external transistors to this sort of chip makes an already challenging design much, much harder, since you don’t have access to useful signals inside the chip.
International Rectifier has a lot of great app notes and even reference designs for fairly powerful class-D amplifiers. They make the power mosfets and mosfet drivers, so of course they want to help you use big mosfets for really high power. That would be the best place to start if you’re really wanting to make a high power class-D audio amp.
Thanks for the pointer to International Rectifier… I think I’m going to enjoy poking around their site… hadn’t ever run across them before!
Not really, you need the filter to get rid of switching frequency noise…a class D amp is basically a frequency inverter, only running much faster and (usually :D) less power. Also, less noisy ;-)
I think Tom wants to know wether it is possible to add a higher power end-stage after the chip, before the filter. I suppose that’s possible with 2 higher power mosfets?
Possible? Yes. Practical? NO!
Without being able to directly connect to the driving circuitry, you will gain a lot of extra capacitance, which is something you do not want when you are trying to efficiently switch power transistors…(you would probably have to add extra dead-time or there will be a shoot-through problem :P)
There are ICs which do not have the PA stage integrated, those are meant for making electric heaters play music ;-)
Or use their higher power chip(s) where all the *proper* engineering have been done probably with months of full time work and people with experience in the field.
TAS5630B “Analog input 300W Stereo class D amplifier with integrated feedback”
Power stage voltage: 52.5V
TI makes some of the best audio amplifiers out there. What’s really amazing are the digital input versions. Given that most audio sources nowadays are digital, that just makes sense.
We went around this one in 1964/5 with the Clive Sinclair X-10 class-D amplifier fiasco.
Class-D amplifiers have many of the same advantages and problems as SMPS’s, high efficiency (meaning low waste heat and small heatsinks), light weight, generally smaller, and in mass production therefore significantly cheaper.
They also have some very serious problems, the primary one being spurious RF radiation (EMI) up to many MHz or even GHz requiring very careful shielding of the electronics and RF bypassing of external connections if they are to happily co-exist with other electronics, radio systems in particular. The X-10 simply couldn’t be used with a radio tuner.
The *proper* design and construction of the output filter is also more difficult than just about any linear amplification stage. Apart from the inductors and their core material, the duty of capacitors in the amp generally, but the output filter particularly, is very arduous and they therefore have a limited lifetime compared to analogue audio amplifiers, sometimes quoted as about seven years for commercial Class-D builds.
To cap it off Class-D amps are about as repairable/serviceable as SMPS’s, which is to say difficult without fairly up-market test gear, and therefore normally quite uneconomic given their initial low cost. I doubt many HaD’ers bother to repair faulty computer SMPS’s.
Where weight, size and power are important considerations, such as portability or in air and space craft, then the extra complexity and difficulty is worth the trouble, but for living room Hi-Fi or guitar amplifier duty it is hard to justify.
For many guitarists a guitar amplifier is a “tool of trade”, so the cost and Mean Time To Repair are quite significant and, for the moment at least, Class-D still can’t compete with Class-A, -AB, or -B for ease of repair.
On the face of it Class-D amps should scale up to 100+ watt levels easily, but on the prototyping bench problems such as EMI, very high circulating currents in the output filters, and power feedback to the power supply, become difficult above about the 20 watt level – even short PCB traces will resonate and radiate. For these reasons CE certification is uncommon on kilowatt level Class-D PA amps.
An excellent discussion of Class-D amplifiers and their design problems can be found in International Rectifier application note AN-1071.
It should be noted that the X-10 fiasco was a major factor in the failure of Sinclair Research in the late ’60’s, and that Tripath with their so-called “Class-T” (proprietary Class-D) went broke in 2007.
tl;dr – you can cobble up something that works, but doing a Class-D amp *properly* isn’t as easy as it looks.
I may be an outlier here, but might be worth noting that I use a class-D guitar amp – EHX 44 Magnum – precisely because it is small, light, relatively cheap (<$100 used), and actually still too loud for what I do most of the time. I'd much rather have that on my pedalboard and carry a light 1×10 cab rather than the 80lb 1×12 combo I used to use.
Not saying it sounds better than a good tube amp or that it's a good touring solution, but it works for me.
That was a great video; I understand Class-D amplification a lot better now.
One day I hope to get a chance to play around with the Hypex NC400 – http://www.hypex.nl/product/2012-11-23-13-41-35/nc400.html
This is especially true should you aren’t totally sure where you plan to place the speakers.
You’ll need to consider multi-channel home audio amplifiers with at least 150
watts to 350 watts per channel. Be sure to contain the right tools for installing wall speakers or
acquire some professional help with embedding components into the walls in the event you’re not confident carrying
it out yourself.
You rock, thanks so much for the great explanations.