Lost on LM386

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I have tried to build an LM386 amp for practice with headphone or a small speaker over the last couple of weeks, but was not successful.

The first version I tried was an mylk386, which uses a TL071 as preamp and a LM386 as power amp. This did actually work but at higher gain levels the sound was just noise.

So I tought "maybe take a step back" and tried to build a Little Gem. I ordered myself better components this time (Panasonic FCs and WIMA MKP2) which did make a difference, but did not solve my problems.

In its current state, it is nearly impossible to play the amp, cause it starts crackling as soon as i get over a certain volume or gain or strumming a bit harder. Actually I have to turn it down in such a way that the guitar is louder than the amp. And this is completely irrelevant to the guitar (single coil or humbuckers) or speaker/headphones I plug in.

Below is a schematic of the circuit I am currently using and photos. Since so many of you have this amps working, I'm really lost. Am I expecting to much out of this?
 

Attachments

  • Schematic_Little-Gem-1.1_1.1_20180524075859.png
    Schematic_Little-Gem-1.1_1.1_20180524075859.png
    43.3 KB · Views: 661
  • DSC_0657.jpg
    DSC_0657.jpg
    704.8 KB · Views: 656
  • DSC_0641.jpg
    DSC_0641.jpg
    269.7 KB · Views: 628
Administrator
Joined 2007
Paid Member
Yes, that's perfect. The power supply decoupling should always be as close as possible to the chip so as to remove the effects of any wiring resistance/inductance.

In other words placing the 100nF cap directly across the pins 6 and 4 is very much more effective than placing it across the battery.

Also, when you run an amp off a battery you find it very beneficial to add a larger electrolytic cap across the supply as well. This component can be across the battery and its purpose is to help the battery supply current peaks to the circuit. The battery voltage sags under high current loading, the cap helps with that but of course its not something for nothing as the cap only helps for short term transients. You will find it makes a big difference though. Anything in the 220uF to 1000uF range is good for that.
 
Administrator
Joined 2007
Paid Member
That looks OK.

Try and keep C1 as close to the IC pins as possible. C2 can be further away, even as far away as the battery.

Try and return the speaker ground and the Zobel network ground directly back to the negative end of the 470uF (depending where you place the cap).

Return pin 4 back to the 470 uF cap with its own wire.

Return the ground of the volume control back to the 470uF cap with its own wire.

This is important so that they don't interact. The small but finite resistance of the wires can cause stability problems if you just 'tap into' a single connection. Try and return them all back to a common point, and the negative end of the 470uF is a good place for that.
 
Administrator
Joined 2007
Paid Member
I'm not sure tbh.

Strange things might happen if all the points that should be at ground potential arrive there at different times. Having pin 4 permanently grounded and making and breaking the other grounds could well cause problems such as the device latching into an unpredictable state.

I would say build it conventionally first and confirm it all works, and then change to suit.
 
Ok, so this is what I have on my bread board right now.

And guess what? It sounds great! Just slight breakup when playing hard, but the rest is nice clean tones.

Thank you so much, I really was about to give up!

How do I ensure this wont get worse when putting it into a box again?
 

Attachments

  • WhatsApp Image 2018-05-25 at 20.50.30.jpeg
    WhatsApp Image 2018-05-25 at 20.50.30.jpeg
    226.4 KB · Views: 232
  • WhatsApp Image 2018-05-25 at 20.50.17.jpeg
    WhatsApp Image 2018-05-25 at 20.50.17.jpeg
    202.6 KB · Views: 241
  • Schematic_LM386-Amp_Sheet-1_20180525204750.png
    Schematic_LM386-Amp_Sheet-1_20180525204750.png
    34.2 KB · Views: 245
Administrator
Joined 2007
Paid Member
Well done :up:

It should all transfer over to a box OK. Just be sure to retain the same wiring scheme.

I can't overemphasise this wiring issue... and just to highlight this as a general example lets look at your breadboard layout and the three brown wires plugged into that horizontal row at the bottom.

So all three are at the same potential... er well not exactly :) Lets say the wire on the right is the speaker return, the middle one is an input ground and the one on the left an output ground. The battery is the black wire at the left.

The problem is that the horizontal connector has resistance... not much... but enough to cause a volt drop proportional to the current flowing... and that current is varying because its your music driving the speaker.

So what happens now is that input ground and output grounds are at different voltages, voltages that change in relation to the music. This can add a form of positive feedback to the circuit and in extreme cases cause distortion and instability. At best it will worsen the distortion performance overall.

So it hugely important.

Have a look at this very old thread:

Oscillograms/Testing, and why layout matters.
 
The LM386 is fussy about pcb layout and decoupling.

Any amplifier that has its power flowing through a ground wire is gong to be fussy. Doesn't matter if it's half a watt or half a kilowatt. You absolutely have to minimize the impedance between pin 4 of the chip and global ground. The input stage's bias resistors (and the emitter of the VAS, and everything else in there) is also returned to that pin - which carries half-sinusoidal power supply current.

You want a really fussy chip amp try one of the higher power versions, like the 377, 378, or 380. They may not even be making those anymore. I've gotten those hot enough to burn myself.
 
Thank you so much, Mooly. And explaining and pointing this out to me as a noob.

So, all grounds should have their individual, as short as possible, connection to a point "behind" the filter cap. That's what a ground star does on PCBs, right?

What about cable lengths to that point for components that are not on the board?
 
Administrator
Joined 2007
Paid Member
The goal is to make the wiring disappear and that is what a star ground tries to achieve. You are off to a good start with a clean battery supply which means there is no power supply charging pulses getting added into the mix. The small spur (any length) becomes a clean point of reference.

Cables should always be as short as possible to prevent stray pickup, but length itself should be taken 'out of the equation' as far as circuit interaction due to resistance goes by careful design.
 

Attachments

  • Untitled.png
    Untitled.png
    18.8 KB · Views: 204
  • Untitled2.png
    Untitled2.png
    22.6 KB · Views: 188
I added some components today. Mainly an on-off switch, the gain switch, the headphone plug and an LED.

The gain switch was fun. I first tried a pot, but found out I either wanted max or off. I tried different caps from 2.2u to 22u. The 2.2uF sounded a bit dull and the 22uF rocked the house. I finally settled for a 10uF, best sound for me and also used in the technical documentation.

The headphone plug gave me troubles and I wonder if there is any solution for this. No matter what resistor I tried for the headphone ground (10R up to 1K), at about 80 percent Volume on the guitar the headphones start to crackle (breaking up?), especially on low notes. It is also happening on the speaker, but not that prominent.

Now to get this all over to a board.
 

Attachments

  • DSC_0668-1587x1190.JPG
    DSC_0668-1587x1190.JPG
    482.8 KB · Views: 104
  • IMG_20180526_151822-1587x1190.jpg
    IMG_20180526_151822-1587x1190.jpg
    381.7 KB · Views: 68
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.