Class-D audio amplifier makes it from breadboard to PCB

[Ben Laskowski’s] been working on a Class-D audio amplifier for several months. What you see above is the most recent version of the amp. A class-D amplifier uses transistor switching (or in this case MOSFET switching) to generate the pulse-width-modulated signal that drives the speaker. This is different from common amplifiers as it doesn’t generate the kind of heat that traditional amplifiers do, making it much more efficient.

After the break you can hear it demonstrated. It’s operating off of a single-supply laptop brick and we do hear a bit of a hum coming through the system. Still, we’re quite pleased at the power and quality the small board can put out. Take a look at a post from November to get a handle on what went into development. If you still hunger for more details, [Ben’s] shared the bulk of his prototyping materials in the github repository.

Sounds like 60 or 120Hz hum… perhaps line noise isn’t adequately isolated from the DC input to the board. Not terribly surprising with the step-down transformer to rectifier to capacitors that it looks like is being used, a linear regulator after that to drop the voltage just a bit would reduce a lot of the hum I think.

mIK – class T amps are just a product name for what are actually class D amplifiers. Seems that they use delta-sigma modulation and a digital feedback loop, but it’s still a class D.

Hum like that is certainly ground loop. Eye-balling the PCB there are cut outs in the ground plane. That cannot happen! Audio PCB design must be almost as careful as RF, although not for the crappy reasons audiophile tend to feed people. But hum is a real audio design nightmare!

Aren’t there class-D chip-amps available these days? Class D is a pain. Not only do you have to deal with an A/D, then you have to do PWM, then volume control is a hassle (control supply voltage, Which then throws off optimum values of L and C?) Long time since I looked at a class-D discrete build from scratch.

Volume control can be done as simply as using a dual-gang potentiometer on the signal inputs. Actually class-d has become very simple, you can buy premade modules based on Tripath Chips (fully integrated ICs) and all you have to do is hook up a suitable power supply and you’re away. If you’re building a discrete version then this one is particularly popular: http://www.diyaudio.com/forums/class-d/166214-ucd-25-watts-1200-watts-using-2-mosfets.html

@mIK Your phrase “Class D or better” sounds like we’re classifying eggs or surface continuity…that Class A is the best class. Class A was just the first type, Class B the second, etc… And extending what Matt said, Class T is just Tripath’s brand of Class D amps.

@Drone: What’s the A/D and variable supply voltage for? A Class D amp is just an oscillator, comparator, and an output stage. All of which can be fulfilled (although poorly) by a single 555.

I designed a Class D amp in SPICE, using only a LM339 and some discretes. Works great in simulation. I have no plans to build or publish it, I did it only to practice and learn. If I need a real Class D amp I probably will get one of those chip amps, or a pre-assembled PCB using one from Ebay since they’re so cheap.

@Matt
That hum comes form lack of negative feedback loop form speaker terminals to input signal terminals. This allows PSU hum to be modulated to PWM signal in output stage.
It just needs one more opamp per channel and some resistors and capacitors.

Class D amps are just so darn cheap as a complete package, I don’t think I could ever bring myself do build one. I recently used this guy: http://www.parts-express.com/pe/showdetl.cfm?Partnumber=300-385 for a boom-box I built. I had considered building my own amp, but the cost of the amp chip alone is almost as much as the amp (amp was $15 when I bought it).

@Tim: the amp is of the self-oscillating type. On the breadboard, I measured the frequency at around 250kHz. With the decent PCB layout and much faster gate drivers in use now, I’d expect that frequency to be even higher.

@Matt: right you are… If I used a laptop power brick as I suggest in the writeup, the hum should be gone. I just used the transformer/rectifier/capacitor combo as I didn’t have a sacrificial power brick on hand.

@Chamon: I think it’s just a bad experimental power supply. The only ground connection is at the audio input. That’s not ideal, but the key is that there are no other direct ground connections.

@Drone: The L and C values shouldn’t depend on the supply voltage. They DO depend on the load (speaker) impedance, though. Right now, they are close to ideal for an 8 ohm speaker.

@space: There is negative feedback from the switching node of the output transistors. I didn’t take it from the speaker terminals due to the tendency of the RLC filter to cause instability when included in the closed-loop transfer function. You are right, though; with extra R’s and C’s I could make a compensation network and include the filter output in the feedback loop as well.

It’s true that Class-D amps are readily available these days. I just wanted to see how good I could make one from scratch. It worked well on the breadboard, hence the PCB…

Somehow missed this the other day. Nice write up and execution :) Also, thanks for the great links HaD folks. Got me some ordering to do ;) Agree with most above that the hum should disappear with the power brick. I had never even heard of Class T lol.

Hi, the project looks great. I think I’m gonna make it. But I have a few questions before that. I’ll be glad if you answer them.
What is the range for the power supply? For the 2 wings and single power supply?
What has better performance? The version with 2 wings ot single powerd module?
Thanks,
Best regards.