Customizable 20W Amplifier

4 Input, 3 Way Tone Control and Customizable LCD Display

Similar projects worth following
This is the product of a long held desire to build my own amplifier and a failed attempt at some self-powered speakers. The amplifier uses the Adafruit MAX9744 amplifier board for amplification and volume control and is connected to a custom board using the TDA7439 to control inputs and tonal controls. All is powered by an Arduino Nano which interfaces with the buttons and LCD display. All this is housed in a custom 3D printed enclosure.

Input names are user changeable (something I hate about 'real' amplifiers are specific, unchangeable, input names) and all settings are stored in the Arudino's EEPROM and recalled when turned on.

The idea of this project is to make an amplifier that can be customised. Something that annoys me with most amplifiers is that the input names are limited what the designer thought they should be. My home theatre amp has a BluRay input, a DVD/BluRay input, a Game input and so on. While I have one BluRay player, I don't have another and certainly don't have a DVD any more. So the "DVD/BluRay" is actually connected to my media player, but I can't change the name. It is a little thing but something that has always bugged me.

This is a 2 channel amplifier that I designed and made for my slowly expanding "physical media" equipment (so far a tape cassette, DAT, minidisc, vinyl and a RaspberryPi based network media player). As my equipment list grew I needed more than the little powered speakers I was using. I had a MAX9744 based 20W amplifier board by Adafruit that was for a failed project to make a set of powered speakers so that became the basis of the amplifier. the MAX has a few nice features. Firstly it is a digital amp, making it very energy efficient. Secondly it can control the the volume internally, either by using an external potentiometer or via I2C.

Initially I had it running in analogue mode but with the increasing devices I needed a way to switch between them. A little research and I came across the TDA7439DS. This little chip not only has 4 switchable inputs, it also has a 3 way tone control, balance, volume and is controllable via I2C. This opened up the option to use a microcontroller to govern all the parts. Given I have the most experience with the Arduino I went with a Nano as it was something I had on hand and was reasonably small.

So I designed a circuit for the TDA chip that would allow it to connect to the Adafruit amplifier board, the 4 inputs and the Arduino Nano. The Nano then had another board that connected to 5 buttons for dealing with power and the tone and balance controls. It also had a satellite PCB that connects to the input selector buttons and finally a 16x2 LCD character display with an I2C backpack.

Another thing I wanted was to have an output for a VU Visualiser (I refrain from calling it a 'meter' as it isn't calibrated. It is mostly for the flashy lights!) and another output so the currently selected input could be recorded on to a tape cassette. The TDA chip has two outputs, one just after the input selector and the second output after tone controls. The tape output comes from the output just after the multiplexer so it is an exact recreation of the input. The 'VU meter' is taken from the second output that is fed into the amplifier so it shows the actual signal being amplified.

One issue would have been if the TDA chip was controlling the volume, as lowering the volume would make the VU meter also drop down in its response. Fortunately the MAX chip, as we said above, has it's own volume control, that means the output to the VU meter isn't affected by lowering the volume as it happens inside the MAX chip.

The LCD display is used to show the current input selected and the current volume level (or if it is muted). The inputs can all be named up to 14 characters which are stored in the Arduino's EEPROM (along with the current volume, tone and balance settings and the last selected input). Meaning even if powered down it will retain it's settings. All of this is controlled by the buttons and a rotary encoder.

Amp1.4.0 Hackaday

Additional Feature: IR Remote control of the Amplifier

x-zip-compressed - 12.91 kB - 05/20/2020 at 16:34


Remote Control

3D printable case for the remote control. PCB from my Universal Remote project

x-zip-compressed - 123.42 kB - 05/20/2020 at 16:35



Arduino Code for the remote control based on my Universal Remote project

ino - 5.24 kB - 05/20/2020 at 16:33



Graphics for the front and rear panel stickers in PDF and SVG versions. Cut out the magenta (#FF00FF) outlines.

x-zip-compressed - 56.42 kB - 05/15/2020 at 08:39


KiCad CAD drawings. Contains the main input/tone control board (DA2004.1), CPU board (DA2004.2) and the input key board (DA2004.3)

x-zip-compressed - 361.72 kB - 08/19/2019 at 15:55


View all 12 files

  • A Mute Solution

    smartroad06/21/2020 at 08:47 0 comments

    In my last log entry I mentioned about the need to mute the amplifier while the unit switched on as you need to give the amp chip about 1/4 second to boot. This meant that the amp would play anything on the input at near full volume until the controller could turn the volume down. The controller doesn't have any IO left to control the mute pin on the amplifier so I needed another way to hold the mute pin low for at least 1/4 second.

    I wanted it to be as simple as possible so started with the idea of a simple RC timer to hold the pin low. While this worked, the issue came from the inability to quickly discharge the capacitor once power was removed. This would have meant that if the power was applied before the capacitor has discharged it would start again at full volume. The capacitor does discharge, just painfully slowly!

    After a lot of investigation I came to the conclusion that I would have to go a bit more complicated. On that post user Ken Yap said about using a small basic microcontroller to hold the pin low, but that felt a bit of a misuse of a microcontroller, although I did appreciate the suggestion :D

    That though made me think, there is a chip that is A) Cheap and B) designed for this exact purpose. The venerable 555 timer!

    The above circuit diagram shows the 555 in astable mode. Just for anyone who doesn't know about the 555, astable mode means the 555 will start with pin 3 (Q) output high and after a specific time with go low and stay there until power is reset. R1 and C1 provide a brief pulse to trigger the timer when power is applied. R2 and C2 are the main timer, providing about 1 second of delay. The transistor is used to invert the output so the junction of R4 and the collector of the transistor is low when Q is high and vice versa. The diode is used to block the high voltage so the "mute" pin is only pulled low as there is a resistor on the Adafruit board pulling it high and I didn't want to risk injecting 12V onto the 3V rail!

  • Help Requested! - Mute on Startup

    smartroad06/19/2020 at 11:40 5 comments

    For some time I have been aware of an annoying "bug" that I can not seem to squash. When the amp powers up and audio is playing you get a brief, about 1/4 second, blast at nearly full volume. This is due to the MAX amplifier chip starting at a reasonably high volume when it is first switched on. The chip does have a mute pin, which the Adafruit breakout board I am using does, well, breakout. I would love to use it but unfortunately I don't have any spare pins left from the Arduino Nano.

    So I got to thinking, could I use a capacitor to hold the pin low while the amplifier started up. I ran some quick experiments and yes I can, with a big caveat: I can't figure out how to get the capacitor to discharge quickly when power is removed.

    Here is a basic view of the circuit idea. The amp has the mute pin held high with a 10K resistor connected to the gate of a MOSFET that then connects to the mute pin on the amp chip (I haven't shown that part of the circuit). On the right is the simple RC timer I was thinking of using.

    The values I thought about were 100uF for the capacitor and about 330R for the resistor. As it stands the capacitor doesn't discharge at all quickly, but any resistor I put in across it causes a potential divider to change the voltage at the gate of the MOSFET. I was hoping someone might be able to help point me in the right direction on this, or even if it is possible!

    The full circuit for the Adafruit breakout board is here, the part of the circuit is in B5-C6

  • IR Working!!!

    smartroad05/20/2020 at 16:33 0 comments

    I finally got the IR code working in V1.4!! I now have the ability to control the amplifiers essential features from a distance. With the remote you can control the following features:

    • Power
    • Volume
    • Mute
    • Treble/Mid Range/Bass levels
    • Inputs

    The volume control will also increase if the button is held, something that took more head scratching, curse words and childish temper-tantrums then I would like to admit... Essentially the problem was that every time I tried to implement the auto repeat so the volume would increase as the button is held would result in it increasing by an extra one step on release, including if you only tapped the button.

    Finally I found a way to stop the behaviour and it works as expected. There is a half second delay after pressing the button so that it doesn't repeat if you just tap on the button. The timer is reset every time you press the button so you can tap the button to increase or decrease the volume one step at a time.

    I also printed off a remote control using my universal remote design, which I will include the code and case design files for as well. As I have the ability to do multi-filament I coloured the power and input four buttons the same as the amplifier.

  • IR Remote and Artwork Finalised

    smartroad05/15/2020 at 08:36 0 comments

    Something thing that I have been wanting to add to the amplifier is a convenience option present on all modern technology, the IR remote. The main thing that has stopped me from implementing it has been the trouble getting a remote that would work for the functions the amp has. Custom ones are expensive and generic ones are, well, generic. One of my other projects has been to make a remote control using an Arduino to replace the missing remote for an "old" Sony tape deck and CD player. Now that I have that working I plan to use it to make a remote for my Amplifier.

    The controller PCB does have a space for an IR receiver but it wasn't used on the early versions, as such I needed to reprint the front of the amp to have the hole for it to fit into. This also meant updating the graphics for the sticker on the front.

    Above are the two versions I have printed (the LCD on the lower photo has the RGB backlight). The top one, grey buttons and panel, has the IR receiver, the lower one doesn't as it is on my desk so didn't see the need (yet!). The artwork was updated to have the cut-out for the IR receiver, the font has been improved to a clearer version and some of the formatting was fixed. The company I used to make these vinyl stickers has changed the material from the first versions I had made and this new one looks so much better (and seems to be better at not showing fingerprints!)

    I am working on the new firmware to control the amp via IR remote so hopefully will be able to release that (and the design files for the remote itself) soon. I'll upload the new sticker files to here soon.

  • Firmware Update 1.3.2

    smartroad02/09/2020 at 18:54 0 comments

    Yesterday I uploaded a new firmware version to add a feature that corrects a bug. The bug was clipping audio from certain devices. Initially I thought is was to do with the 4 to 1 audio expander I have been making (see my other project) as the only devices affected were the ones that were plugged into it. It took a while but after some investigation it wasn't the expander at all! Turns out it is the way I have the volume controls organised.

    I run both my amps using the Adafruit Digital amp board. This board is able to control it's own volume via the I2C bus and that is how the volume is controlled when it is detected on boot. The input and tone selector chip on my board also has a volume control, but this isn't used in this case and is set to -5dB because originally I set that level to reduce the clipping that was happening.

    Problem came about because that was done before I had the additional kit that was causing the clipping. After I finally figured it all out, I updated the setup menu to be able to adjust that volume by the user, allowing easy adjustment to prevent clipping.

    This is a bit of a bodge at the moment because it doesn't care about the type of amp connected currently, something I ran out of time to implement before I had to leave for work.

    Hopefully I can get that sorted so it will prevent that option being available if the Adafruit board is not connected!

  • V1.3.1 Released

    smartroad01/14/2020 at 22:00 0 comments

    This version update can now detect the type of amplifier attached to it, currently the MAX9744 or none. Which amplifier it has found is shown in the settings menu and will show "MAX9744" or "Custom". The detection is done on hard power up, i.e. when power is applied/attached.

    With the custom option (no MAX9744 board attached) then any amplifier can be attached to the VU output RCA connectors or internally using the RIN, LIN and AGND pins on the MAX9744 connector. With the MAX9744 connected the volume control is controlled by the MAX chip. When it isn't detected then the TDA7439 chip will control the volume.

    The advantage of having the MAX chip control the volume is so that the VU output remains at a high output level regardless of the amplifier volume setting. Making it ideal to connect a visualiser to as it will always show the signal that is being fed into the amp.

    Eventually I plan to make a daughter board that will connect to the MAX connector and allow it to maintain the VU output functionality while still providing a custom amplifier option. Mostly the thinking is that this allows connection of a more powerful amplifier if you need it.

    Bug Fix

    In 1.2 the settings menu would sometime keep the last square bracket from the saturation setting when using the RGB display.

  • Firmware Update V1.2.2

    smartroad09/25/2019 at 08:26 0 comments

    Now that I have the RGB backpack for the RGB backlight LCD I have updated the firmware to take advantage of it.

    This new firmware will auto detect if the RGB backpack is connected and if it is detected it will allow additional options in the new Setup menu. This menu (reached by holding the power button down for two seconds) opens to show the current firmware version installed. The multi-control is then used to navigate the other options. If the RGB backpack is detected it will allow you to change the colour of the backlight (16 options, all with amazing names...), the brightness and the saturation level. Technically this allows for about 400 different colours and shades, although in practise there are many that will look very similar! I am considering using a gamma correction for the brightness and saturation as it is linear now which doesn't always look best on our eyes.

    The backlight can be set  to dim/turn off after a period of not being used, options from 1 minute to 30 minutes. If the RGB LCD is used then it will dim the display to 50% of the current brightness settings. Should the LCD be a standard single colour, the backlight will be turned off.

    In the next update I am looking to add the ability to not need the Adafruit amplifier so you can use it or any other amplifier you want should you want more power. To maintain the full feature set I am currently designing a board that will sit between the controller and amp (where the Adafruit amp is connected) to provide the volume control before the amplifier. However the system will be able to run without it, by using the volume control of the TDA7439DS chip, but the VU Meter output would scale with volume rendering it useless. Hopefully I will be able to implement an automatic detection system, like I have for the RGB backlight, so that it doesn't matter which option you want, it should just work out the best way to operate.

  • Updated files

    smartroad08/19/2019 at 16:01 0 comments

    I have split out the files into separate zip's, saves downloading one file just to get the Arduino code (for example). I haven't included gerber files, mostly because they can easily be generated, however would they be useful?

    The electronics zip file now has the 3 circuits to be able to build the amplifier. My next thing is to write a BOM for easier ordering as the circuit diagrams don't show the additional parts needed (RCA connectors, rotary switch etc).

  • Initial Upload - Changing to KiCad

    smartroad08/18/2019 at 15:59 0 comments

    This is the initial upload of all the files for making the amplifier. I recently made the transition from Eagle (which I made the prototypes on) to KiCad so currently the only circuit and PCB available is the main IO and tone board. Over the next week or so I will add in the circuits and PCBs for the Arduino controller and the input buttons. Please be aware: at the current time I have not had these KiCad version made so while they should work there may well be error's creeping in.

    I think I have included everything in the zip file. There are the 3D files for printing. I have included the STL files and some UNTESTED 3MF files for my new Prusa MK3S. The photos you see in the main listing are from my old printer. This is a long print but I think it looks great. Also included are 2 SVG files for the front and rear panels. I had these printed on vinyl (the green lcd picture) and I think they look great, although the blue lcd shows it printed on sticky paper which works just as well. For the feet I used 12x5mm rubber feet.

    The Arduino program in included as well, there are several support libraries needed to go along with the main program. I wrote a small manual on using the amp, assuming that you use the same case as I have of course! At the back it lists the libraries that are needed (I think they are all installable from the Arduino library manager).

    I hope to maybe sell these as a kit, would that be of interest to anyone? The main chip is the only SMT part, it is easy to solder with some extra flux but I would offer to solder it first for the kit.

    Please have a look, I welcome any constructive feedback!

View all 9 project logs

Enjoy this project?



Supercrab wrote 08/22/2020 at 12:58 point

I'm having some issues with a similar audio processing chip, the TDA7449 with an arduino pro mini.  I get audio for about 1/10 of a second when I power the chip with 9v and then nothing.  The device responds to an i2c scanner, so that appears to be working.  I've seen that people have similar problems with the TDA7439.  Is there anything special I need to do?  The library I'm using has been used in plenty of videos on youtube so I don't think it's that.

Cheers, Mase.

  Are you sure? yes | no

smartroad wrote 08/22/2020 at 14:21 point

Sounds like one of the settings that controls the volume is wrong, possibly inverted?

I'd say start with the left and right speaker attenuation (sub addr 0x6 and 0x07) checking they are set to 0 (no attenuation) and then change the volume (sub addr 0x02) ramp it from 0x2F down __gradually__ to 0x00. This will take it from near mute to full volume (be aware FULL VOLUME!!) so do it __gradually__!!

  Are you sure? yes | no

Supercrab wrote 08/23/2020 at 09:36 point

I briefly checked the library a few days ago and couldn't see anything obvious wrong.  I tried different values for attenuation and volumes but nothing worked.  I'll have another careful look at the data bits again :)  Maybe, I've missed something!

Thanks for the help! :)

  Are you sure? yes | no

smartroad wrote 08/23/2020 at 10:15 point

According to the data sheet it starts with Volume and both speakers attenuation muted. I hit the hardware directly myself without using a library (the one I found didn't do things how I wanted). Check my code ("interface" file) and look for setSelectorVolume() and setBalance(), maybe you can use those to set the volumes higher. If nothing else they show the sub address' you need to access :)

  Are you sure? yes | no

Supercrab wrote 08/24/2020 at 21:37 point

I went direct and set both speaker attenuation to 0 and volume to 0.  There was still no sound so I tried messing about with the gain (0x01).  I've found that sending values above 6 (14dB) gives really distorted buzzing during the peaks (on the beat) of whatever music is beging played.  I tried with different chips and got the same thing.  I'm going to try some different 0.47uF caps and see if that makes a difference.  It's really strange!

  Are you sure? yes | no

h.e.weenink wrote 06/29/2020 at 12:53 point

May I ask a (probably) newbie question: I think about using a TDA7439DS or TDA7440 for preamp.  And trying to find examples for how to move the frequency of Treble and Bass filter. Any suggestions where to find answers? regards, Eef 

  Are you sure? yes | no

smartroad wrote 06/29/2020 at 21:48 point

To change the response of the filters for the TDA7439 you will need to change C13 & C14 for the treble and for the bass C15-16+R3 and C19-20+R5. The datasheet can be found here: Pages 8 and 9 have the formulas to be able to change the filters (to complex to write in these text boxes!). The default values center the bass around 100Hz, Mid-Range to 1KHz and treble is about 1KHz+ Page 10 on the data sheet shows the response rates graphs of the default values. 

If you do change them, I would love to know how they sound and what frequency(ies) you settled on :)

  Are you sure? yes | no

h.e.weenink wrote 06/30/2020 at 05:40 point

Ai, I was hoping you could tell me how to calculate this. Otherwise it has to be "trial and error" and then I would need a way to monitor/measure this. If I find how, I will let you know. 

  Are you sure? yes | no

smartroad wrote 08/22/2020 at 14:25 point

"Ai, I was hoping you could tell me how to calculate this. Otherwise it has to be "trial and error" and then I would need a way to monitor/measure this. If I find how, I will let you know."

You can calculate what you need: the formula's, as I said in my original reply, are on pages 8 and 9 of the datasheet.

  Are you sure? yes | no

desoto100 wrote 01/03/2020 at 13:19 point

Hi, I have a question, can you share your arduino libraries ?

  Are you sure? yes | no

smartroad wrote 01/13/2020 at 08:26 point

Over the next few days I plan to release v1.3.x of the firmware. I'll include the LiquidCrystal library as well as I lightly modified the original to allow custom characters to be stored in program space.

I have also updated the operation manual to show how to get into the new settings menu and the options in it.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates