Introduction: DIY LM386 Audio Amplifier : Datasheet,Circuit,PCB,Hardware

About: An electronics hobbyist

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.

Step 1: Parts Required

  1. LM386 SMD
  2. 100nF(104) ceramic non polar cap, 4pc
  3. 2pF ceramic non polar cap 1pc
  4. 100uF polar electrolytic 1pc
  5. 47uF polar Capacitor electrolytic 1pc
  6. 470uF polar Capacitor electrolytic 1pc
  7. 10uF
  8. 10k potentiometer 2pc
  9. 1 condenser mic
  10. 10ohm Resistor
  11. 1kohm resistor
  12. 8ohm speaker and earphone
  13. 3.5mm Male cable and female connector
  14. 9V battery with connector
  15. male header and shorter caps
  16. Terminal Blocks (Number as per ur requirements)
  17. copper clad board single sided
  18. Hand drill with 0.7,0.8,0.9 mm bits for PCB hole drilling
  19. FeCl3 solution for etching
  20. Cloth iron for toner transfer
  21. Glossy photopaper A4 for printing PCB with Laser Printer
  22. Acetone/Kerosene for cleaning away toner
  23. Soldering Iron and solder
  24. Wood varnish (optional)
  25. DSO (optional)
  26. Power supply (optional)

Step 2: 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.

  1. First graph infers that ckt will consume only 4.5mA with 9v supply. thus it is battery friendly.
  2. Second graph says that PSRR value can be maximised by the use of a 47 uF capacitor at Pin7.
  3. Third graph says that at 9v, 8ohms, it will give a satisfactory performance.
  4. 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

Step 3: 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,

  1. Audio Input
  2. 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

Step 4: Video Part 1: Datasheet and Circuit

Step 5: PCB Design

Then switching into PCB mode, I've managed to get this design. Top 5 points to remember while designing:

  1. Place power supply decoupling caps as close to the IC as possible
  2. Use thicker tracks for power lines, thinner for signal lines
  3. Use star grounding.
  4. Place components close and make shorter tracks but do distance signal and power components
  5. 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

Step 6: Making the PCB

I will be using toner transfer method, the following steps to be done:

  1. Taking printout using Laser printer on a A4 glossy Photopaper ( mirrored, non inverted)
  2. Toner transfer using Cloth Iron
  3. Using marker to fill out missed out tracks (if any)
  4. Etching using Ferric chloride
  5. Removing toner using acetone/kerosene (or rubbing very gently with sandpaper)
  6. Drilling out holes using handrill
  7. Gather and place components at respective positions
  8. Solder everything
  9. 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.

Step 7: 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.

Step 8: Video Part 2: PCB and Hardware

Step 9: Power Measurement

Power can be of two types:

  1. Peak power
  2. 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:

  1. 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).
  2. Set supply to a fixed voltage & power up circuit
  3. 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 )
  4. Attach DSO's probe to the load and observe signal.
  5. 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.
  6. Measure Vpeak and apply formulas (images given) to measure Peak power and RMS power.
  7. 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.

Step 10: 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.

Anything Goes Contest

Participated in the
Anything Goes Contest