Before we start building strange noise makers or outlandish guitar effects we are going to need something to use to play them. If you have a background in music you may have an amplifier or two lying around but I like to have something small and low powered I can keep on my workbench for testing and playing around with new devices before I roll out my admittedly oversized guitar amplifier. This is where the LM386 Power Amplifier comes in.
The LM386 is a popul ar little power amplifier chip which can be very easily turned into a versatile DIY desktop amplifier. This lightweight amplifier is easy to build and can be run on a 9V battery making it simple, portable and perfect for beginners to audio DIY. It also features options to control the amplifier gain and add bass boost functionality allowing you to customize your circuit and output the sound that best suits your application.
What you’ll need:
1 – Small proto board or perf board
1 – speaker (4-8 ohms impedance)
1 – LM386 power amplifier IC
1 – 8 pin IC socket (This is not required but is definitely a good idea)
2 – toggle switches (I used a fairly oversized one for my power but really any SPST or SPDT will do)
2 – ¼ inch jacks (one of these should be switching if you want the speaker to cut out when you plug in headphones
1 – LED (color is up to you)
1 – 10K ohm potentiometer
1 – 220-470 UF Electrolytic capacitor
1 – 100 UF Electrolytic capacitor
1 – 10 UF Electrolytic capacitor
1 – 0.01 UF capacitor
1 – 0.047 UF capacitor
1 – 10 ohm resistor
1 – 470 ohm resistor (or whatever best suits your chosen LED)
1 – 9V battery
Hook up wire (I used stranded 26 gauge wire but whatever you have on hand should do the trick)
Let’s start by having a look at the circuit :
If you aren’t experienced with electronics or circuit diagrams the image above may seem a bit daunting but don’t panic, this is actually a lot simpler than it looks. Break the circuit down into sections and deal with each one at a time. As an example try following the power input extending up from pin 6 of the IC or the output traveling right from pin 5 to the speaker. Take your time and follow each lead through the diagram to get a good feel for the circuit. Once you’ve reviewed the circuit and have a good feeling for what goes where the real fun can begin.
Step 1 : Breadboarding
This step is especially important if you are new to electronics as it allows you to take the circuit diagram and begin to flush it out with real physical connections. Again if you are just getting started this can feel a bit overwhelming but if you take it slow and work through it one component at a time you’ll have it working before you know it.
Typically I will start by placing my IC (The LM386) in the middle of the breadboard and attaching my battery clip to the positive and negative strips on the breadboard. From here I will work my way around the IC chip one pin at a time. Looking at the circuit diagram we can see that pin 1 connects to a switch so I will start there, next that switch goes to a 10UF electrolytic capacitor, and from the capacitor back to pin number 8. Repeat this process for each pin until you’ve built up the entire circuit. Depending on your components some parts (typically potentiometers and jacks) will not fit in your breadboard so for these you will need to either solder leads to the terminals of the component or attach alligator clips between your breadboard and the component. I tend to use alligator clips which are messier but quicker for the testing phase.
It’s a bit hard to see in this image but the black block on the right side of the photo is a speaker which I used to test my circuit well it was still on the breadboard. This will allow you to make sure that all the connections are correct and all of your components are working as they should be. If upon hooking up all of your components you find that the amplifier does not work, don’t worry! This is exactly why we are using the breadboard, it allows us to identify and fix any issues before we start soldering things down. Compare the circuit diagram to your breadboard, once again follow the connections from each pin through the circuit diagram and across your breadboard. Pay special attention to the electrolytic capacitors, notice on the circuit diagram there is a positive terminal for each electrolytic capacitor? Make sure the orientation of these capacitors on your breadboard matches those on the diagram.
If you’re still having trouble try exchanging your components 1 by one to see if you have a faulty resistor or capacitor, or even the LM386 chip itself. This can be especially useful if you are working with any older, second hand or Ebay sourced parts as they can be less reliable. Be patient, check and recheck each connection and you should be amplifying in no time.
Step 2 : Perf Board
Amplifying things from a bread board is all well and good but it lacks the permanence and portability which are key to this circuit. The next step is to take what you’ve learned from the circuit diagram and working on the breadboard and put it in a cleaner more functional package.
Above you can see I am beginning to populate my perf board, like with the breadboard I start with the IC socket and work my way out from there. I typically start by putting all of the components which I plan to have on the breadboard itself in place and soldering their connections trying to keep everything as neat as possible.
Here is the back of the same board as shown above, Note I have left the ground connections (bottom of board) unsoldered for the time being, this is because I know there will be several connections from the off-board components which will also have to link to ground. I have also left long leads in the other places I know off-board connections will need to be made, at the top for the positive power, audio input and output on the right and the gain switch on the left. Take your time on each solder connection and be especially careful around the IC socket as it is very easy to create a solder bridge between 2 pins. If you do create a solder bridge don’t worry, by re-heating the solder you can often break the bridge and in extreme cases a solder sucker or wick can clean it up nicely and allow you to start over.
Step 3 : Off Board Components
Next we can start attaching the off-board components, I will usually start by attaching the power switch, LED and gain switch. Don’t forget to put a resistor in line with the LED to protect it from burning out. Also be careful to ensure the LED is correctly oriented as (like the electrolytic caps) it will only work in the correct direction. The Battery clip would then be connected with the black wire going to the ground and the positive wire connecting to your switch. At this point you can also connect the input circuit going from the input jack to your volume control and down to the board.
Note in this photo I have left very long wire leads. This is because I had initially intended to use this circuit in a fairly large speaker box. Always measure your wire based on the box your project will be living in. It’s a good practice to leave yourself a little bit of extra wire to work with (a few centimetres at most) but anything beyond this can turn your final product into something of a rats nest. This is manageable with a relatively simple circuit like this one but can escalate quickly as you get into more complex designs.
At this point I like to make sure everything is working correctly. By plugging an audio source (I’ve used the MFOS Noise Toaster I keep near my desk but anything will work) into the input jack and attaching the output lead and ground to a speaker with alligator cables you should be able to power it up and give it a try. This will allow you to troubleshoot any problems before everything has been housed in your box.
If the amplifier doesn’t turn on or if you find there are problems with the audio (distortion, oscillation or lack of volume to name a few I have run into in the past) remember the troubleshooting we did on the breadboard, check each component is oriented correctly and they are all connected to the right places. Also check each of your solder connections both visually and with a multimeter to ensure they are strong.
Step 5 : Output
If everything’s gone well with your tests you’re ready to add your speaker. I’m using a small 8 ohm speaker I picked up from the local dollar store. Since this is a relatively low powered amp it is best to keep to an equally low power speaker but anything in the 4-8 ohm range should be able to run. In the above image I’ve connected short lengths of wire to the positive and negative terminals of the speaker.
Here you can see the orange and black wires from the speaker passing through the front of my project box. Connect the black (negative) wire to the ground on your output jack and on to the ground point on the perf board. The input connects to the switch tab on the output jack. I then connect the tip of the output jack back to the output on my board. When nothing is connected to the output jack the switch and tip will be connected allowing the audio to flow out to the speaker but when something (like headphones) is plugged in the tip will be pushed away from the switch tab turning off the speaker.
Before wiring a jack (especially a switching one) it is important to check either visually or ideally with a multimeter which connection is attached to which area of the jack. Different manufacturers will place the tabs in different alignments so it is always important to be sure. If you for instance switched the tip and switch connections in this circuit the speaker would work normally when nothing is plugged in but plugging in headphones would break the circuit and you would not get any audio.
We’re near home free, all that’s left is to give our new circuit it’s home. This is your chance to be creative and really make the project your own. I have seen these circuits wired into Altoids tins, lunchboxes, guitars, the only limit is your imagination. For this particular amp I found a balsa wood box at a local department store which was approximately the size and shape I was looking for (also dirt cheap which is always nice). From there I planned out my component placement and marked where each switch, pot and jack would be located. I then drilled holes for component being sure to match the hole sizes to the threading on each particular part. You’ll notice my holes vary substantially in size. Each one is approximately the size of the threads on the component it’s meant to fit.
Insert your components and fasten them in place and you are in business! Time to amaze your friends and annoy your neighbors. Have Fun!