DIY Class D Audio Amplifier

69,683

367

33

Introduction: DIY Class D Audio Amplifier

About: Awesome Electronics Tutorials, Projects and How To´s

In this project I will show you why a class AB amplifier is pretty inefficient and how a class D amplifier on the other hand improves this efficiency. At the end I will show you how we can apply the theory of operation of a class D amp to a couple of common components in order to create our own DIY class D audio amp. Let's get started!

Step 1: Watch the Video!

The video gives you all the information you need to build your own class D audio amp. During the next steps however I will present you some additional information to make the project even simpler.

Step 2: Order Your Components!

Here you can find a parts list with example sellers (affiliate links):

Ebay:

1x 3.5mm Audio Jack: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x 10kΩ Potentiometer: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x LM393 Comparator: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x TLC555 Timer: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x 74HC04 Inverter: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x IR2113 MOSFET Driver: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

2x IRLZ44N MOSFET: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x 7805 Voltage Regulator: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x 7812 Voltage Regulator: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

2x PCB Terminal: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

3x 47µF, 1x 22µF Capacitor: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

7x 220nF Capacitor: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

3x UF4007 Diode: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

2x 10kΩ, 2x 10Ω, 1x 2kΩ Resistor: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

2x 33µH Inductor: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

Aliexpress:

1x 3.5mm Audio Jack: https://s.click.aliexpress.com/e/_dYyosJz

1x 10kΩ Potentiometer: https://s.click.aliexpress.com/e/_dX83GAF

1x LM393 Comparator: https://s.click.aliexpress.com/e/_d7ObgpD

1x TLC555 Timer: https://s.click.aliexpress.com/e/_dTrUY9D

1x 74HC04 Inverter: https://s.click.aliexpress.com/e/_d8c7LDl

1x IR2113 MOSFET Driver: https://s.click.aliexpress.com/e/_d7SJq6b

2x IRLZ44N MOSFET: https://s.click.aliexpress.com/e/_dWhSrDl

1x 7805 Voltage Regulator: https://s.click.aliexpress.com/e/_dXSrfiP

1x 7812 Voltage Regulator: https://s.click.aliexpress.com/e/_d8OcXHl

2x PCB Terminal: https://s.click.aliexpress.com/e/_dYbstfZ

3x 47µF, 1x 22µF Capacitor: https://s.click.aliexpress.com/e/_d7dOwRz

7x 220nF Capacitor: https://s.click.aliexpress.com/e/_dU4FEsB

3x UF4007 Diode: https://s.click.aliexpress.com/e/_dYR45Bh

2x 10kΩ, 2x 10Ω, 1x 2kΩ Resistor: https://s.click.aliexpress.com/e/_dTPpXjt

2x 33µH Inductor: https://s.click.aliexpress.com/e/_d6A4mKL

Amazon.de:

1x 3.5mm Audio Jack: http://amzn.to/2rpKbHN

1x 10kΩ Potentiometer: http://amzn.to/2rT8PSN

1x LM393 Comparator: http://amzn.to/2rG3dKL

1x TLC555 Timer: http://amzn.to/2qUBsd9

1x 74HC04 Inverter: http://amzn.to/2rGfizn

1x IR2113 MOSFET Driver: http://amzn.to/2rpQWtr

2x IRLZ44N MOSFET: http://amzn.to/2rT1X7R

1x 7805 Voltage Regulator: http://amzn.to/2ryYCI3

1x 7812 Voltage Regulator: http://amzn.to/2qUK5EG

2x PCB Terminal: http://amzn.to/2qQ1ymz

3x 47µF, 1x 22µF Capacitor: http://amzn.to/2qPYdE6

7x 220nF Capacitor: http://amzn.to/2rGg1k5

3x UF4007 Diode: http://amzn.to/2qUxLnM

2x 10kΩ, 2x 10Ω, 1x 2kΩ Resistor: http://amzn.to/2ryTxiV

2x 33µH Inductor: http://amzn.to/2rG8wtn

Step 3: Build the Circuit!

Here you can find the schematic of the project with and without the LM386 preamplifier. Feel free to use the pictures of my finished perfboard circuit as a reference.

You can also find the schematic on EasyEDA: https://easyeda.com/editor#id=74409197e62e4ff6b09d...

Step 4: Success!

You did it! You just built your own Class D Audio Amplifier!


Feel free to check out my YouTube channel for more awesome projects:

http://www.youtube.com/user/greatscottlab

You can also follow me on Facebook, Twitter and Google+ for news about upcoming projects and behind the scenes information:

https://twitter.com/GreatScottLab

https://www.facebook.com/greatscottlab

1 Person Made This Project!

Recommendations

  • Mason Jar Speed Challenge

    Mason Jar Speed Challenge
  • Bikes Challenge

    Bikes Challenge
  • Remix Contest

    Remix Contest

33 Discussions

0
talktoarijeet
talktoarijeet

2 months ago

Hello Guys , i was also building same class D amplifier ,i have built the circuit ,when i am powering the circuit ,555 Timer gives a nice triangular wave and Lm 393 gives a output of PWM wave , but when i am providing this signal to the hex inverter , the output is not coming,zero volts is coming .Anyone can help me about ?

0
narb08
narb08

2 years ago

Can you recommend a good alternative/equivalent to the IRLZ44N?

0
Alia fiori
Alia fiori

Reply 5 months ago

sorry I'm late but you can use an IRF3205

0
AliA742
AliA742

Question 2 years ago

i am confused where should i add lm386

0
JohannesD22
JohannesD22

Answer 1 year ago

Where did you connect it? I know its bewteen the audio signal and the lm393, but what pins and what components did you use?

Thanks

0
AliA742
AliA742

Answer 2 years ago

found it :D

0
AliA742
AliA742

Question 2 years ago

can i use ir2110 instead of ir2112

0
FunVA_OpEd
FunVA_OpEd

2 years ago

It would be great if in addition to the app, you can add a Wi-Fi recover module to this project, preferably aa this date, using 802 11.AC or better, and build a full signal, separate transmitter project that can stream output from an AVR or other audio source to the receiver on the amplifier module. Best of both worlds just have the receiver be a separate module that you could add onto the amplifier with just a plug-in. Wi-Fi modules today are extremely cheap, but if you say that it needs processing and many other things, then you can just add an anadreno board or raspberry pi and modify it appropriately since at least the later already has much audio processing capabilities, Wi-Fi, ethernet, low power, very easily able to connect to other projects, programmable, and very very inexpensive. That doesn't even touch upon its other capabilities which would really make an amplifier such as this into a truly world-class product for pennies on the dollars compared to what is sold in the marketplace today, especially if all the questions, comments, and improvements that have been offered on the amplifier are implemented, where they make sense.
Also not sure when you started this project but maybe there are better / alternative chips out nowadays? Lastly it was just certain types of components versus Stating the quality of the components that you offered as examples. Some may want to build a very high-quality amplifier using this as a guide, perhaps you can offer different classes of components that people could use from starting to professional. I think this is a great article I'm just offering suggestions where you could take it further.

0
FunVA_OpEd
FunVA_OpEd

2 years ago

I noticed that you do not have a tool section with their costs and which ones to order. That might be helpful for beginners. Also consider a low bit more advanced but easier ways of doing soldering such as using solder paste and cover how to correct bridges etc. You should at least cover the soldering paste application versus soldering each lead. You don't have to cover the details of how to do it but just the application to your project. There are many YouTube videos on how to do soldering for entire boards with many electronics, at once is using solder paste, which is especially nice for microcircuitry.

Also, all these questions and comments need to be answered. If not somebody should then take the basis of this project, all the input from that, and take the next leap forward. A person wanting to create an app, or what many of these comments and questions addressed before they would create this particular project. I know such projects are evolutions, but if questions and comments go on answered on the original design unchanged, then people lose faith in that particular circuit.

0
attiny85
attiny85

2 years ago

how did you set the dc offset on the output of the lm386??

0
johnyradio
johnyradio

2 years ago

Hi, awesome work. But, why does your sine wave sound like a sawtooth? Many audible harmonics.

0
SamyakJ4
SamyakJ4

2 years ago

I made it but doesn't get any output at the end of circuit and what about the connection of audio jack (how we can identify the 3 pins out of 5...) please suggest .. any one help me

0
CarlosL210
CarlosL210

3 years ago

Is the power source a 12v car battery?

0
GreatScottLab
GreatScottLab

Reply 3 years ago

I used my lab bench power supply set to 15V.

0
SamyakJ4
SamyakJ4

Reply 2 years ago

what about current ? ... 1 Amp or what

0
DmitriyU2
DmitriyU2

3 years ago

Great instructable and amazing video! Thank you!

What is missing, from my point, is a test for max power output, and distortions analysis.

0
bassbindevil
bassbindevil

Reply 3 years ago

Also, signal to noise measurements, and frequency response. RMAA could do that using a computer sound card, except there is the problem of the bridged output. I'd try a sound card with optical input and a battery-powered ADC with optical output (eBay, analog digital audio converter).

I suspect performance will be unimpressive, since there's no feedback. Suitable for a vehicle PA horn or siren, the kinds of music production applications where distortion is a good thing, or a science fair project. If you actually want to listen to music, there are awesome little class-D amp boards from China for the price of a burger combo.

0
Polymorph
Polymorph

3 years ago

All the unused inverters need to have their inputs grounded. Never leave inputs floating.

0
asfi235
asfi235

3 years ago

Yeah, there's a DC offset on the output which will toast the speaker. The easiest way to get around this with single-supply operation is to use a full-bridge circuit. Yes, more parts, but you get better fidelity too. See:
http://www.infineon.com/dgdl/an-1071.pdf?fileId=55...

[International Rectifier AN-1071: Class D Audio Amplifier Basics]

Adding the input buffer/preamp is an inherently good idea, though I don't see why you'd use a small power amp for the job. No harm in doing it this way, though.

The 74HC04 would be even better if you used it to buffer both phases. Fast clean edges are best. And ground the unused inputs on the IC!

0
slimtender.
slimtender.

3 years ago

Very interesting circuit!