LM386 Amplifier - need help with interference

Any help would be great I am pulling my hair out. The circuit seems so easy and it doesn't seem like anybody else is having difficulty so I must be missing something obvious.

I am building a simple amplifier circuit using the LM386. I am using a electret mic as the input and for now I have a little speaker as the output (eventually I'm going to read the output into the Arduino)

This is the schematic I am using...

http://www.josepino.com/circuits/index?mini_amplifier_lm386.jpc

Looks pretty damn easy huh? The problem is I am getting insane feedback/interference. At first I was just getting a oscillating sound with no amplification. I took out the pots (I thought it may be causing the issue) and connected the .1uF cap from pin 3 to the mic. When I did this I started to get some amplification but the interference still persisted. Even if I have nothing connected to pin 3 I still get noise!

Is this interference from EMF... do I have a crappy breadboard. Any suggestions would be helpful.

From the circuit's website:

In theory, this circuit will not work because it needs a pre-amplifier. Supposedly, a 741 or any othe pre-amplifier is needed. As I said before, I don't follow the theory. I already verified that the pre-amplifier is not needed, just adjust the 10k variable resistor. In fact, You may not be able to get the circuit to work properly with a pre-amplifier.

You may just be unlucky :frowning:

If you are getting feedback, however, make sure the microphone and speaker are well separated. Otherwise sound from the speaker gets into the microphone, which is amplified and sent to the speaker, which gets into the microphone, and...well....that's feedback.

--
Beat707: MIDI drum machine / sequencer / groove-box for Arduino

Perhaps I am unlucky. I don't like giving up on things like this but if I don't get it working this weekend I think I am just going to buy a sparkfun component.

Here are the other people that seem to have it working...

http://tinkerlog.com/2007/10/22/diy-tengu-on-a-breadboard/

By looking at the images I can see the way I have hooked it up should work... the only major difference I can see is they are using little plastic pots... I am using metal pots and they are using a ceramic cap for the 0.1uF and I am using electrolytic.

I'll post a picture of my setup tonight.

I would really love to figure out how to use the LM386 because it looks pretty useful. I see things like this... no pots or caps and it works fine...

And it drives me nuts.

Thanks in advance.

Regulator chips require caps on their input pin and their output pin. Look at any typical 7805 wiring setup. I think you have a very unstable power source. I think a LM386 will take 9vdc directly without the need of the regulator?

Lefty

Sorry I forgot to mention:

  • I'm using a battery.
  • The interference is not feedback as I tested with headphones.

One thing about the LM386 - according to the datasheet (which I assume you have on hand?), you need to keep all interconnects short, and the external components as close to the chip as possible; the second photo you posted was a good setup on a breadboard - the first wasn't too bad, but might not be ideal. Of course, on a PCB this is an easier thing to do.

I've never had good luck with the LM386. Oscillations, high distortion, etc. Have used several other similar parts successfully, however. Too bad, it's a useful concept.

Thanks everybody. I've got it working enough that I think figure the rest out myself.

The problem seems to have been with the large metal pots I was using. I replaced the pot with one of those tiny plastic ones and all my problems went away. The sound is a bit hissy but I think I can figure that out. I am planning on using this as a sound trigger so fidelity is not a huge concern.

Here is a picture of my breadboard in case this can help somebody else out (you can see it's even more simplified version)...

@ KE7GKP

If you connected the metal shell to circuit ground your noise would not only diappear,

I solder a wire to the metal case and attach to ground? Good to know.

That is because LM386 is a power amplifier. It is optimized for driving small, very low impedance speakers. It is NOT well suited as a microphone preamp. I believe we have said this before. But now you understand WHY we said it.

You said before that there are other IC's that are better suited to act as a mic preamp.... do you have any suggestions/links etc? The only reason I went the LM386 route is because that is what I found information when I performed a search.

Any pointers would be appreciated.

Something with your mic wiring is not quite right.
If you check the schematics in your first post, there's a 1~10K resistor between the +V rail and the mic's positive terminal. The mic's negative terminal goes to ground.

The pot is there to adjust the volume. To simplify things while troubleshooting, you may consider removing it - just wire the mic+ to the blue cap directly. Another way to isolate mic issues vs. amp issues is to use a MP3 player for the input. If music plays nicely, check the mic; if there's still too much noise and interference, check the amp setup.

I've posted the schematic I've used here: http://arduino.cc/forum/index.php/topic,56074.msg408206.html#msg408206. After a lot of frustration, it worked out fine for me.