DIY LM386 Audio Amplifier : Datasheet,Circuit,PCB,Hardware
by SayantanM4 in Circuits > Audio
4548 Views, 36 Favorites, 0 Comments
DIY LM386 Audio Amplifier : Datasheet,Circuit,PCB,Hardware
Hi there, today we will be learning how to make an audio amplifier using SMD version of LM386. We will look at the datasheet info, the circuit diagram in EagleEDA, then the PCB in Eagle EDA and finally the actual hardware. It will be a complete DIY with circuit and PCB descriptions and information everything included.Necessary files are also given at respective steps
Prerequisites: Analog Circuits, familiarization with PCB and circuit analysis, reading datasheet, .
So lets not waste any more time and directly jump at the circuit info.
Parts Required
- LM386 SMD
- 100nF(104) ceramic non polar cap, 4pc
- 2pF ceramic non polar cap 1pc
- 100uF polar electrolytic 1pc
- 47uF polar Capacitor electrolytic 1pc
- 470uF polar Capacitor electrolytic 1pc
- 10uF
- 10k potentiometer 2pc
- 1 condenser mic
- 10ohm Resistor
- 1kohm resistor
- 8ohm speaker and earphone
- 3.5mm Male cable and female connector
- 9V battery with connector
- male header and shorter caps
- Terminal Blocks (Number as per ur requirements)
- copper clad board single sided
- Hand drill with 0.7,0.8,0.9 mm bits for PCB hole drilling
- FeCl3 solution for etching
- Cloth iron for toner transfer
- Glossy photopaper A4 for printing PCB with Laser Printer
- Acetone/Kerosene for cleaning away toner
- Soldering Iron and solder
- Wood varnish (optional)
- DSO (optional)
- Power supply (optional)
Datasheet Info
Datasheet link: https://www.ti.com/lit/ds/symlink/lm386.pdf?ts=160...
Firstly lets dive into electrical characteristics. It says, maximum power is obtainable (700mW max) at 8ohm load with supply as 9v. The Gain and PSRR can be varied.
The graphs in the 2nd image shows interesting details.
- First graph infers that ckt will consume only 4.5mA with 9v supply. thus it is battery friendly.
- Second graph says that PSRR value can be maximised by the use of a 47 uF capacitor at Pin7.
- Third graph says that at 9v, 8ohms, it will give a satisfactory performance.
- Fourth graph states that gain can be variable from 26dB(20) to 46dB(200), when pin 1 and 8 are bypassed by a 10uF capacitor.
Datasheet says: To make the LM386 a more versatile amplifier, two pins (1 and 8) are provided for gain control. With pins 1 and 8 open the 1.35-kΩ resistor sets the gain at 20 (26 dB). If a capacitor is put from pin 1 to 8, bypassing the 1.35-kΩ resistor, the gain will go up to 200 (46 dB). If a resistor is placed in series with the capacitor, the gain can be set to any value from 20 to 200. Gain control can also be done by capacitively coupling a resistor (or FET) from pin 1 to ground.
Look out for the internal diagram at 4th image to get a more intuitive understanding.
The third image shows an amplifier of fixed gain of 50. Now to make it variable a 10k pot can be used instead of that fixed 1.2K resistor across pin 1 and 8, in series with 10uF capacitor.
There are other applications mentioned in that datasheet but we're not dealing into that. You may dive into the datasheet for more interesting info.
Watch the video at step 4 for more detailed description
Circuit Diagram in Eagle
According to the datasheet details as discussed above, I've drawn a circuit diagram in Autodesk Eagle EDA.
Now I've modified the circuit to make it work in 2 ways,
- Audio Input
- Microphone mode
This can be set by positioning the shorter cap at the 3 header pins.
For microphone mode, condenser mic is used with a 1k ohm pullup and a 100nF capacitor to remove DC from entering into the amplifier.
Power supply decoupling capacitor banks are added to remove any supply ripples.
The output has a 470uF polar cap, you can change the frequency response at output by testing out various values of the cap.
2 Potentiometers are used, one placed at input and other at the gain determining pins (1 and 8).
Zobel network/Boucherout cell is used at output. A series combination of 10ohms, 100nF capacitor will work fine.
I have added some solder pads and terminal blocks along with other necessary components.
Watch the video at step 4 for more detailed description
PDF link of circuit diagram:https://drive.google.com/file/d/1SGEk6IFGj5mdDwvccivGEQJHLFHSVG5W/view?usp=sharing
Video Part 1: Datasheet and Circuit
PCB Design
Then switching into PCB mode, I've managed to get this design. Top 5 points to remember while designing:
- Place power supply decoupling caps as close to the IC as possible
- Use thicker tracks for power lines, thinner for signal lines
- Use star grounding.
- Place components close and make shorter tracks but do distance signal and power components
- Perform manual routing'
Do watch the video link given at Step8 for more details.
Mirrored (Non Inverted ) PCB PDF link : https://drive.google.com/file/d/16B6DPPxQ_kOzF7_7uBsU8StHPfccoTGt/view?usp=sharing
Making the PCB
I will be using toner transfer method, the following steps to be done:
- Taking printout using Laser printer on a A4 glossy Photopaper ( mirrored, non inverted)
- Toner transfer using Cloth Iron
- Using marker to fill out missed out tracks (if any)
- Etching using Ferric chloride
- Removing toner using acetone/kerosene (or rubbing very gently with sandpaper)
- Drilling out holes using handrill
- Gather and place components at respective positions
- Solder everything
- Apply a layer of wood varnish to protect copper tracks and you're done
Do watch the video link given at Step8 for more details.
Testing
Now as PCB is done, it's time to test. Set jumper position to audio input mode, connect 9v Battery to the terminals, connect audio input, connect 8ohm speaker load and now play the audio.
Now, connect earphones in place of that 8ohm load, switch to microphone mode and speak near the onboard mic.
Do watch the video link given at Step8 for more details.
As per my experience, the audio quality was just fine and there was no unnecessary hiss and buzz. All credits to star grounding and the other PCB routing techniques. Apply them, practice them and you'll gradually hone the skills.
Video Part 2: PCB and Hardware
Power Measurement
Power can be of two types:
- Peak power
- RMS power
When nothing is mentioned we take it as RMS power. To get the power measurement we need a DSO. The necessary process is as follows:
- Attach load (non inductive wire wound resistors is ideal for the job, but normal carbon resistors can be used in our case just for testing purposes).
- Set supply to a fixed voltage & power up circuit
- Use your smartphone as a signal generator and give a 1KHz sine signal to the input of the amplifier. (Android link: https://play.google.com/store/apps/details?id=com.keuwl.functiongenerator&hl=en_IN&gl=US )
- Attach DSO's probe to the load and observe signal.
- Adjust gain potentiometer such that the signal is amplified faithfully without any distortions and clipping. Set gain at the position such that beyond which the signal gets distorted.
- Measure Vpeak and apply formulas (images given) to measure Peak power and RMS power.
- Repeat the above steps for other voltage and load conditions.
Using these steps I have taken power measurements at several conditions, results shown in the images.
The End
Now as your circuit is done, maybe you can think of ur personal room speakers or a hearing assistant.But I will not suggest you to use this old IC for these product based tasks. Instead I will prefer to go out for modern TDA2050, or class D ICs like PAM8403. Use LM386 for hobby purposes, to practice circuit design, practicing PCB design, etc.
Design Files: https://drive.google.com/drive/folders/14ePLKF8xm5YU_z9uKTcBtzC-8e9ha8YH?usp=sharing
Anyways, I hope you learnt quite a lot in this tutorial. For confusions, comment below or drop a mail at robosanu1@gmail.com. Visit my instructable profile for more such interesting tutorials.