Ubuntu MAME Arcade Project – Part 4, Adding Sound


My prototype machine was an HP mutation with an Intel Core 2 Duo processor and a surprisingly loud internal speaker.  Unfortunately that just wasn’t going to cut it here and we needed something bigger. Since we already have a computer in the cabinet the task of creating a signal for speakers to reproduce is handled nicely, but the onboard micro-amplifier on most motherboards isn’t Jukebox worthy and not very loud.  Essentially we need to amplify the sound leaving the board and hopefully provide at least stereo audio.  It would also be nice if we could plug in an MP3 player to the circuit and to be able to port the signal out of the unit to an external amplifier as well.  There are a few options but most of them aren’t very attractive.

Let’s review.

1.  Car Stereo Amplifier

On the upside, it would attach nicely to the cabinet and carries little to no risk of starting a fire.  Sadly, we would have to purchase a power supply to translate AC power into something it could use and they have a decent cost associated with them.  Direct current electrical systems are also more sensitive to resistance in the transmission media, so we would need to spend more money on heavier gauge supply wires to minimize the effect.  In addition, most car stereo amplifiers are probably overbuilt for this application, and we would need to turn the gain way down, making the investment in those heavy power handling components a waste.

2. Home Stereo Amplifier

I actually have a couple of these that I could have used lying around, but if you refer back to the previous list of wants you will notice that we would have to start cutting artisan holes in the cabinet to satisfy some of them and it would look terrible.  I also needed to buy something new in case I ever sold the unit.  I wouldn’t feel right using am amplifier from the corner of the garage because I don’t know how much life is left in it.  Additionally we could create a situation that requires a screwdriver and exposure of high voltage current to body parts whenever you needed to change the volume or adjust the sound.  While fun to watch this is not preferred.

3. Build Something!

Guess which one I decided on…



 Introducing the TDA 2030 power amplifier. It is a 4X16 watt audio amplifier as 2.1 stereo for 2X16 watt stereo channels and 1X32 watt subwoofer channel.  That doesn’t sound like much power but is actually pretty close to what your factory car stereos produce per audio channel.  We also have the luxury of being indoors instead of traveling down the interstate where it is much quieter (hopefully.)

I didn’t do much research on this device initially because to cost was low enough that it didn’t really matter if I could use it for this project or not, and thought it might be something fun to do with the kids.  This device accepts 12V to 18V AC input power which is a little bit of a pain because you have to buy a transformer, but it is so small and light that it gave me an idea.  What if I cut out a couple pieces of the cabinet’s back panel, attached a piece of lexan (which I actually have lying around for some reason, something to do with a chameleon cage…) and attached it directly to the transparent back panel?  That would actually look pretty cool, I thought.  It turns out I was right.

Here is what it took to get this done.



Heat is an unavoidable (and generally undesirable) byproduct of power amplification.  As such the components designed to do this job are generally designed specifically to be attached to heat sinks, cooling towers, and the like.  The TDA2030 integrated circuit has a screw hole and a flat back to attach a heat sink to.  Notice how they are lined up in a row on the outside edge of the board?  That is why.  Without proper cooling these little guys will burn up under load.  To solve, we have to add a heat sink.


This 90mm aluminum heat sink came from Amazon.com and didn’t cost very much.  Since it is universal, we have to mark, tap, and mount it to our amplifier.  This was accomplished by simply placing the amplifier on it’s side and marking the screw holes with a sharpie.


I had to get creative to find an easy way to transfer the hole markings to the inside of the channels so I didn’t drill through a fin.  This is double sided tape.  I used it because it was thicker than regular clear tape, but could have used any reasonably strong tape (not stretchy) that you can see a sharpie mark through.

heat-sink-2The holes were drilled top down into a piece of 1X6 to keep from scratching up my beautiful workbenches.  Note the slight variations in the elevation of the holes.  These are small enough to not matter much, but I should have used a sharper drill bit to keep them from wandering so much.  I also visually estimated that the when the base of the heat sink is even with the plane of the circuit board I am attaching it to the holes all land between the 3rd and 4th fins.

sink screw holes

I tapped the screw holes by simply screwing the supplied screws in.  Selecting the perfect size drill bit is crucial.  Too small and you might not be able to tap the hole with the screw.  Too big and you will need to find bolts that are long enough to pass all the way through the heat sink fins obstructing airflow.

sink insulators

The TDA 2030 kit came with insulators for the screw holes and the ICs.  The 2030 IC is V- or carries a negative voltage.  If it is allowed to touch the heatsink directly without an insulator strange things can happen, but the main concern is that if any of the 4 ICs ever died it would be nearly impossible to determine which one it was using a voltmeter without completely removing the heatsink.

heat-sink-3This unit accepts AC voltage and passes it through a rectifier circuit that evens it out into non-oscillating DC current, so the current at the heat sink is nothing serious to worry about at this stage, but short circuits should always be avoided.

heat-sink-4Now that we have a heat sink installed and it looks like we did it on purpose we need a couple of things.  To get our audio signal from the computer to the board we need to send it to this little white block.  The PCB is labeled with the purpose of each input pin, so we should just be able to connect the proper computer cable and cut the end off, then solder to an 1/8″ TRS jack that plugs into the computer sound card port.



I mistakenly identified the socket on the audio board as a 3 pin molex and ordered the wrong cable, but they are just similar enough to be somewhat interchangeable.  I had to cut down the outward facing plastic on the socket with an Exacto knife, however the molex connector slipped in nice and tight with that slight modification.  I added a blob of polyurethane to the joint to make sure it will never come apart ever again.

knob template

Lastly, I made a template of the PCB control knob positions so that I can just stick it to my Lexan back plate and drill the holes in the right spots.  When it is mounted the unit needs to be installed with the cooling fins running perpendicular to the floor to maximize cooling efficiency.  I also added a fan directly adjacent to the amplifier to help keep it cooler.

completed amplifier

With what we will assume is a working 2.1 channel stereo amplifier now, it is time to work on the backplate.

backplate tools

Without getting into too much detail about how to measure, draw lines, or cut holes let me just say this.  Lexan sucks to work with.  It is brittle, hard to cut and score, any cracks run like they do in a sheet of glass if you tighten something down too tight, and it’s a little bit  sharp one the edges.

That being said, I used a 120MM hole saw to cut holes for my Coolermaster PC case fans, a 13/16″ hole saw for the Neutrik panel mount passthrough connectors, the jigsaw for detail work, and a few different drill bits for the various holes needed for mounting and attaching things.

lexan left

I made a mock up of how I wanted everything laid out on the back panel and measured from the edges.  Next I used a Sharpie to mark important measurements and started boring and cutting.  The left side will house the power plug with fuse assembly, a 120MM fan to force cool air into the cabinet, and a Neutrik panel mount ethernet passthrough jack for network connectivity.


The right panel will hold our amplifier, RCA IN/OUT jacks and a second cooling fan.  Small holes were drilled around the border of the Lexan pane to attach it to the backplate securely with #6 screws.




I ordered a ton of small wood screws because I can use them for other projects later.  This project took less than 20 to complete, but I could have used less than a dozen and been fine.


With all the holes in the right spots now we can add the components.  Our amplifier mounts perfectly and the Lexan sheet holds it securely.  There are also no distortions in the plastic from the weight of the assembly so it looks like it will hold up well to being moved around.


This view shows the final resting place of the amplifier and it’s buddies before we start connecting things.


$4.06 each

I used Seismic Audio RCA panel jacks for the audio in/out ports.  They were relatively inexpensive and used the same 13/16″ hole saw as the Neutrik ports for the USB and ethernet connections.  I predrilled the screw holes and self threaded the #6 screws directly into the plastic.  Connections were then soldered onto the back to complete the connections to the amplifier.




It took some research to find a suitable power supply.  I settled on a 12V 2A AC Center Tap Transformer.  It’s funny because this is actually a stock photo from the distributor of these transformers and the right side of the bracket is bent up a little bit.  Coincidentally when mine arrived in the mail it was also bent the same way and needed to be flattened with a pair of pliers to prevent wiggle.  Maybe someone in China thinks that is how they should come?  It accepts 120V household power OR 240V and converts it down for the amplifier.

For connecting all the AC components to the common V+ and V- rails I purchased a power distribution block ($4.99) from Amazon.




Putting it all together it starts to look more complicated although the individual components are pretty simple.  I added speaker wires for the arcade top speakers.  We decided to use Boss 40W peak 4″ dual cone speakers.  While these are not top of the line by any means, when compared to the generic and ultra-cheap speakers that are generally used in arcade cabinets they are pretty nice.  Additionally, we aren’t pushing a huge number of watts here, so these are technically overbuilt for this application and components designed for heavier loads would be a waste for this.


Here is a detailed view of the soldered connections for our sound system.  I used the heavier speaker wire for the signal input since this application is highly sensitive to signal noise here.  Note how short I made the small gauge wires for the amplifier input harness for this very reason.  I bundled everything together with zip ties and routed them down and away from the amplifier to keep them from blocking airflow or being pulled out during installation.


The green wire is soldered to the underside of the amplifier board through a hole with the letter “G” on the other side, and tied to the green earth ground wires for the other components.  This is important because if there is an electrical issue on the board when it is powered on it should short the issue to ground and break the circuit (Remember our fuse?) instead of letting the onboard components melt or explode.  There is a good sized pair of capacitors on this board and as you know if you have ever wired one up wrong,  they can go of like little bombs under the right circumstances.

Fun!  🙂


Here I have added ports for airflow from the bottom of the cabinet to the top.  Since hot air rises the heat generated down below will need an escape route to the vents in the top of the cabinet.  I used a decent sized hole saw, taking care not to damage the pre-drilled holes for the monitor brackets.


Here is the subwoofer and our homemade bracket mocked up on the top side of the monitor shelf.  We will be mounting it to the underside in this location with the cone pointed directly at the player.  I decided to use the 2.1 channel amplifier board over the 2 channel or 4 channel variants because I wanted to give this system a little bass.  I am very happy with the result.  It sounds great.  This is a Boss 8″ 4 Ohm sub.  I really can’t consider anything smaller to be a woofer, and since we are just trying to add more low frequency response with very little power (36 watts for the woofer), again it doesn’t make sense to pay more or go bigger here.  This speaker says it is rated at 800 watts, but I would guess that is pretty generous.


Here I have started the screws that will fasten the subwoofer to the bottom of the monitor shelf.  I probably went overboard with the quantity, but this thing is surprisingly heavy and I definitely don’t want it falling or coming loose.  These are 1″ wood screws in 1/2″ particle board I had lying around.  This puts the screws a little less than 1/2″ deep into the bottom of the monitor shelf so it made sense to use extras.


Just like putting a t-shirt behind your license plate to keep your car subwoofers from making it buzz from the sound waves hitting it, I used the rest of our tube of polyurethane (the same one we started with…) as a buffer and to ensure that only acts of god could ever remove this piece from the cabinet.


Here you can see the woofer installed in it’s final home inside the bottom of the cabinet.  It sits just behind the end of the keyboard shelf and points towards player’s chest.  Boom boom.  I also made sure that this doesn’t interfere with the pending coin door and that it was set back far enough to ensure that the throw of the cone didn’t touch anything during operation.  I was surprised to see how far this speaker throws when it is playing given the low wattage we are feeding it.


Here is the view from the front.  USB cables from the control surfaces and the USB dock need to be tied together and rolled up to keep them from rattling around and buzzing against the cabinet, or getting in the way during maintenance.  At this point I made sure to clean the interior out top to bottom to eliminate any unwanted dust and debris from our cutting and drilling.  Once the build is completed it is essential that the interior be spotless or the electrical components could be damaged over time.


Now that everything is installed it is time to hook up the speakers, connect the amplifier input to the computer sound board, plug the computer, monitor, and marquee lighting into the power strip, connect the fan power cable to one of the computer’s Molex power connectors, and button up the back of the cabinet.

Note:  A crossover ethernet cable is needed to connect the internal jack of the Neutrik ethernet passthrough port to the computer.  A regular “straight through” cable will not work here.

When testing out our new sound system before installing in the cabinet (we tested everything before getting to this stage,) it actually gets very loud.  Eye protection is definitely recommended for testing.

I was concerned about the heat sink not being large enough to protect the amplifier ICs, but at high power for several hours it turned out not to be an issue at all and with the 120mm computer fan blowing cool air in it gets warm but not very.


From top to bottom in our installation, the control knobs on the amplifier board are as follows:

  1. Top                                  Volume
  2. Middle                            Treble/Bass
  3. Bottom                           Subwoofer Volume

The Seismic RCA ports are Left/Top, Right/Bottom.

We terminated our audio inputs from the computer to the amplifier inputs instead of adding more signal noise and terminating to another location.  Since these are inline between the computer and any external device they work as both inputs or outputs depending on your preference/application.  I designed this system to fill the roles of both a coin-op jukebox as well as an arcade machine so this seemed to be the easiest way to provide that functionality.  I hooked these ports up to an MP3 player to test and it amplifies incoming signals with no noise issues.  Hooking it up to an external amplifier provides a nice clean output to an external from the computer as well.

I am very happy with the finished product.  Everything works beautifully, and once we dress up the cabinet with vinyl graphics it should be very impressive.

Hopefully this article is enough to get you going on your own project.  If you have any questions or would like some help leave me a comment and I will definitely try to help out.  I have already given all the magic away, but if you are interested I can build you a variation one of these and send it to you drop me a line. There are 2, 2.1, and 4 channel options readily available.

One Comment:

  1. I’m not sure where you’re getting your information, but great topic.
    I needs to spend some time learning much more or understanding more.
    Thanks for wonderful information I was looking for this info for my

Leave a Reply