Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LM386 Mic Amp to LED Output

Status
Not open for further replies.

Laplace's Demon

New Member
Hi all,
I'm trying to build a microphone-driven amplifier outputing to a few low-voltage LEDs. I'm working from a very simple, 9V battery powered design using a single lm386 IC. The circuit design is similar to the "Simple LM386 Audio Amplifier" I found at http://www.techlib.com/electronics/audioamps.html#LM386. I've been experimenting trying to adapt this to drive LEDs, with the main result that I can't seem to get enough power.

As far as I can tell, this should be powerful enough to make a mic signal light up a few low voltage LEDs, but even on full gain I have to make a lot of noise into the mic to get much response.

Suggestions? Do I need more amplification for a direct mic signal?
 
You could use the output of the amplifier to power a transistor which then powers the LEDs.
 
The LM386 with the capacitor between pins 1 and 8 has a voltage gain of 200.
A mic has a typical output of 10mV with normal talking so the output of the amp is 2V which will barely light an LED.
If you shout into the mic then the LED should be very bright and will need a series current-limiting resistor.

The circuit that was posted uses a dynamic mic that has a coil and magnet. Maybe an electret mic was used that won't work if it is not powered.

I think the amp should be biased so that direct-coupled LEDs can be used.
I think this circuit might work:
 

Attachments

  • LED blinks from mic.PNG
    LED blinks from mic.PNG
    21.6 KB · Views: 5,905
This may be a stupid question, but is the 9V input for that circuit absolutely necessary?

I am teacher looking for a simple breadboarding project where an electret microphone lights up an LED. We are in a computer lab, so I was going to use the computers' 5V USB outputs to power the circuits we work on to save money on batteries.

I feel like I've built circuits in the past where an LM386 worked on 5V, so I'm wondering if values can be changed to get the whole circuit to work with 5V power. I'm far from an electronics wiz, so please let me know if this is a pipe dream.

Thanks,
Kurt
 
Yes the LM386 would work on 5V; the minimum is 4V. You might need to reduce the value of R to get adequate LED brightness.

You would want to avoid the "high"-voltage version (LM386N-4) which has a minimum of 5V and would be marginal on USB.

(USB experts... tell us if the 470uF is ok?)
 
If the supply voltage is only 5V then the voltage to the LED is only 2.7V which will light a red LED but not a blue or white LED.
The resistor values need to be changed for it to work properly with a supply of only 5V.
 
Wonderful! This is great to hear, as batteries are always a problem. With about 60 students, we end up spending a ton of money on batteries, because half of them go dead from shorts within 10 minutes of being handed out.

I will experiment with the values to get it working.

One more question, I don't understand what pin 3 is doing (pointing at 100K resistor?). Its a general engineering course, and I did mech in college...
 
The part at pin 3 is not a resistor, it is a variable resistor which is called a volume control. It adjusts and reduces the input level so that the LED is not turned on all the time.

You could use a little 100k trimpot instead which is adjusted with a screwdriver.
 
The LM386 with the capacitor between pins 1 and 8 has a voltage gain of 200.
A mic has a typical output of 10mV with normal talking so the output of the amp is 2V which will barely light an LED.
If you shout into the mic then the LED should be very bright and will need a series current-limiting resistor.

The circuit that was posted uses a dynamic mic that has a coil and magnet. Maybe an electret mic was used that won't work if it is not powered.

I think the amp should be biased so that direct-coupled LEDs can be used.
I think this circuit might work:

Hi audioguru,
Would like to ask if let say from this circuit i would like to put a PIC once the LED is detected... then the input pin of portA0 where should i connected? Before LED or where?
 
Hi audioguru,
Would like to ask if let say from this circuit i would like to put a PIC once the LED is detected... then the input pin of portA0 where should i connected? Before LED or where?
The positive wire of the 220uF capacitor filters the rectified output of the LM386 amplifier. Without sound into the mic the voltage is about +0.3V and with loud sound and a +5V supply the voltage is about +3.0V.
 
Hi audioguru,

From the screenshot that u paste on this forum does not ahve a 220uF capacitor.

However, i measure the LM386 pin 5 is only max 1.4V when my microphone is inputting some voice. In this case, my LED is ON but i cant trigger my PIC as PIC only input high at around 2.4V.

I have adjust the potentialmeter but still same error happpened.

Plz comment why the pin 5 is not more than 2V?
Refer the attachment as this is the attchment that u paste in this forum...
 

Attachments

  • LED blinks from mic.PNG
    LED blinks from mic.PNG
    21.6 KB · Views: 812
The 22k and 1k voltage divider from 9V makes pin2 0.39VDC. The DC gain of the LM386 is 10 so the normally 4.5V output will be 0.39VDC.

The AC gain is 200 when the 10uF capacitor is from pin1 to pin8. Then if the mic signal is 20mV then the output of the LM386 is +4.5V.

If you whisper or if the mic is far from the sound then the output will be low and a preamp is needed.
 
Last edited:
The 22k and 1k voltage divider from 9V makes pin2 0.39VDC. The DC gain of the LM386 is 10 so the normally 4.5V output will be 0.39VDC.

The AC gain is 200 when the 10uF capacitor is from pin1 to pin8. Then if the mic signal is 20mV then the output of the LM386 is +4.5V.

If you whisper or if the mic is far from the sound then the output will be low and a preamp is needed.

So if let say the preamp is needed then which preamp will be recommended?
 
"we end up spending a ton of money on batteries, because half of them go dead from shorts within 10 minutes of being handed out."

Is it save to short the 5 Volts to ground from a USB port?
Will it damage the port if shorted for a minute or more?
 
I think the computer will be damaged if the current is higher than 500mA.
Don't short the USB connector. (But the kids will short it, won't they?)
 
If I'm not mistaken over current protection is part of the USB spec.
 
Well we hope you are right. If not, batteries are the cheaper option. However, it would seen that not so many people are involved. A decent protected bench supply might be best.
The class could build it, perhaps. (not my job, just saying)
 
well after i change the 22k to 47k this circuit sounds better...
at least i can "on" my output of my PIC and the transimitter do send the signal...

but now im facing the receiver error part as it does not receive any signal to "on" my PIC...
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top