Author Topic: Pre-amp to connect microphone to speakers  (Read 11423 times)

0 Members and 2 Guests are viewing this topic.

Offline SoundFanTopic starter

  • Contributor
  • Posts: 17
  • Country: fr
Pre-amp to connect microphone to speakers
« on: November 23, 2018, 01:24:52 pm »
Hello,

I am trying since a few days to make a good microphone pre-amp to connect my electret microphones to a speaker or headphones. I have tried some Arduino modules like the MAX9814 from Adafruit and a cheap chinese module that uses a transistor and a LM393 comparator. My project will be powered by Li-Po batteries and needs a very good audio quality. These Arduino modules do work but the sound quality isn't good enough. I have tried to make my own pre-amp using some op-amps but none of these worked well (I can only hear some distorted sound when I blow directly into the mic, but I can't hear my voice when I talk).
The mic itself should have enough quality: I have tried connecting it directly to the mic input of my laptop and it sounds great.

Could someone please help me ? I really would like to improve my results.
« Last Edit: November 23, 2018, 01:26:44 pm by SoundFan »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20357
  • Country: gb
  • 0999
Re: Pre-amp to connect microphone to speakers
« Reply #1 on: November 23, 2018, 01:46:00 pm »
A power amplifier is required to drive a speaker or headphones.

There's nothing wrong with the MAX9814. It's a perfectly good IC and includes an AGC (Automatic Gain Control) which means it adjusts the volume level automatically to match the sound picked up by the microphone.

The LM393 is not an audio amplifier and is probably one of the worst things you can use. An op-amp won't be able to drive a speaker. It will current limit and give a distorted output. A common IC is the LM386, but it's fairly low powered.

What are your output power requirements? How big is the speaker?
 

Offline SoundFanTopic starter

  • Contributor
  • Posts: 17
  • Country: fr
Re: Pre-amp to connect microphone to speakers
« Reply #2 on: November 23, 2018, 04:53:59 pm »
@Hero999 First of all, thanks for your quick reply!
I'm driving a very small 0.5W and 8 ohm speaker.
You are right, the LM393 is totally inappropriate for the job but unfortunately the max9814 also doesn't work well in my project somehow (it is almost as bad as the transistor preamp with LM393).
I won't be needing much energy at all. This 0.5W speaker and headphones are the only things I want to connect to the output. And even those won't be connected simultaneously.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 12537
  • Country: us
Re: Pre-amp to connect microphone to speakers
« Reply #3 on: November 23, 2018, 05:08:32 pm »
I have this page in my bookmarks list:

http://www.techlib.com/electronics/audioamps.html

You may find something useful here?
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4321
  • Country: us
  • KJ7YLK
Re: Pre-amp to connect microphone to speakers
« Reply #4 on: November 23, 2018, 05:20:17 pm »
Remember that electret condenser microphones require power (some call it "bias" but that is improper).
Your computer provided the ~5V "plug-in power" when you tested it there.

Here are a few examples of circuits which provide the power supply to the electret mic....









Those circuits will work with most modern op-amps, so the specific numbers on the above schematic diagrams are only suggestions.
 

Offline SoundFanTopic starter

  • Contributor
  • Posts: 17
  • Country: fr
Re: Pre-amp to connect microphone to speakers
« Reply #5 on: November 23, 2018, 09:09:39 pm »
@Richard Crowley
Thanks for your fast reply

Yes I found out about that power consumption a few days ago. Can I use the first op-amp diagram you sent me and simply replace the LM741 by an OPA134 please ?
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4321
  • Country: us
  • KJ7YLK
Re: Pre-amp to connect microphone to speakers
« Reply #6 on: November 23, 2018, 09:34:58 pm »
Yes, you can use almost any op-amp.
The important part is the resistor that supplies power to the microphone,
and the capacitor that blocks the DC power, but passes the AC audio signal.
 

Offline commongrounder

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: us
Re: Pre-amp to connect microphone to speakers
« Reply #7 on: November 24, 2018, 12:06:42 am »
I don’t believe the OPA134 will work with a single ended power supply.  It needs at least +/- 2.5 volt rails. Of course the circuit can be modified for a split supply.
 

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Pre-amp to connect microphone to speakers
« Reply #8 on: November 24, 2018, 03:18:28 am »
Reply #4, schematic 3, has a few problems. It is probably an outline circuit just to show how to power the mic.

Attached is the schematic for a practical circuit that should work.
« Last Edit: November 24, 2018, 04:44:40 pm by spec »
 
The following users thanked this post: Richard Crowley

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4321
  • Country: us
  • KJ7YLK
Re: Pre-amp to connect microphone to speakers
« Reply #9 on: November 24, 2018, 03:01:25 pm »
I don’t believe the OPA134 will work with a single ended power supply.  It needs at least +/- 2.5 volt rails. Of course the circuit can be modified for a split supply.

ANY op-amp will work with a single-ended power supply:
1) If you provide proper "virtual ground" (V/2) reference for the circuit.
2) If the total voltage is adequate when "split in half".

Reply #4, schematic 3, has a few problems. It is probably an outline circuit just to show how to power the mic.

Yes, that circuit does NOT show the proper "virtual ground" (V/2)  as mentioned above. 

The circuit that @spec posted shows the proper V/2 voltage divider (R3/R3) that creates the "virtual ground"
« Last Edit: November 24, 2018, 03:06:51 pm by Richard Crowley »
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Pre-amp to connect microphone to speakers
« Reply #10 on: November 24, 2018, 11:49:40 pm »
I think the electret mic preamp should be like this:
 

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Pre-amp to connect microphone to speakers
« Reply #11 on: November 25, 2018, 05:29:44 am »
Hi AG,

Fancy seeing you in these parts. :)

Nice mods- I didn't do any optimization on that circuit, so it was really an outline.

I would suggest changing the opamp to a TSX711 or OPA191 as part of the improvements. As you say the OPA134 is not all that happy with a low Vcc.
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Pre-amp to connect microphone to speakers
« Reply #12 on: November 25, 2018, 03:49:01 pm »
Hi again, Spec.
I goofed on making changes to the schematic, this one is best:
 

Offline SoundFanTopic starter

  • Contributor
  • Posts: 17
  • Country: fr
Re: Pre-amp to connect microphone to speakers
« Reply #13 on: November 25, 2018, 04:59:41 pm »
Hello
Thanks for all your great replies !
I'm sorry that I didn't reply until now, I've been quite busy these days with my studies and meetings as well as some research project.
I will try to test out these circuits and use 9V instead of 5, maybe this will finally make my project work.
 

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Pre-amp to connect microphone to speakers
« Reply #14 on: November 26, 2018, 05:49:56 am »
Hi again, Spec.
I goofed on making changes to the schematic, this one is best:
:) I goof all the time
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20357
  • Country: gb
  • 0999
Re: Pre-amp to connect microphone to speakers
« Reply #15 on: November 26, 2018, 10:01:30 am »
@Hero999 First of all, thanks for your quick reply!
I'm driving a very small 0.5W and 8 ohm speaker.
You are right, the LM393 is totally inappropriate for the job but unfortunately the max9814 also doesn't work well in my project somehow (it is almost as bad as the transistor preamp with LM393).
I won't be needing much energy at all. This 0.5W speaker and headphones are the only things I want to connect to the output. And even those won't be connected simultaneously.
The MAX9814 won't drive a speaker directly, if you attempt to, it will current limit and give lots of distortion.

@Richard Crowley
Thanks for your fast reply

Yes I found out about that power consumption a few days ago. Can I use the first op-amp diagram you sent me and simply replace the LM741 by an OPA134 please ?
The OPA134 will not drive a speaker directly either.

You need to connect the output of the MAX9814 or OPA134 to a power amplifier such as the LM386 to drive a speaker.
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Pre-amp to connect microphone to speakers
« Reply #16 on: November 26, 2018, 04:27:07 pm »
Most opamps have a minimum allowed load of 2 thousand ohms. It has a peak output current of only about 20mA which will produce a power output of about 0.0016W into an 8 ohm speaker.

A cheap clock radio produces only 0.5W. Without any clipping distortion and an 8 ohm speaker, an LM386 little power amplifier produces 0.2W with a 6V supply or 0.45W with a 9V supply.
If the microphone can hear the speaker then you will have acoustical feedback howling.
 

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Pre-amp to connect microphone to speakers
« Reply #17 on: November 27, 2018, 05:47:18 am »
Most opamps have a minimum allowed load of 2 thousand ohms.
I am not arguing- just interested. Where does that requirement come from?
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4321
  • Country: us
  • KJ7YLK
Re: Pre-amp to connect microphone to speakers
« Reply #18 on: November 27, 2018, 06:47:17 am »
I am not arguing- just interested. Where does that requirement come from?
Most op-amps are used for internal circuit configurations where impedances are designed around optimal power consumption and/or signal-to-noise ratio.  So there is no need to drive particularly low-impedance loads.

However, there are some kinds of op-amps which ARE designed with lower output impedances because SOME circuits require driving lower impedances.  For example op-amps designed to drive audio outputs where you might want impedances in the low 100s of ohms.  And, of course some circuits which are designed to drive speakers where impedances are around 10 ohms.
 

Offline SoundFanTopic starter

  • Contributor
  • Posts: 17
  • Country: fr
Re: Pre-amp to connect microphone to speakers
« Reply #19 on: November 27, 2018, 08:41:41 am »
Hello,
I have tried out the circuit from AudioGuru and unfortunately it still doesn't work.

The OPA134 will not drive a speaker directly either.

You need to connect the output of the MAX9814 or OPA134 to a power amplifier such as the LM386 to drive a speaker.

OK, I will be ordering some LM386s. I think using the LM386 directly won't be possible because of its low gain (x20), right ? I have found a post of someone using the LM386 to connect an electret mic to a speaker : https://circuitdigest.com/electronic-circuits/lm386-audio-amplifier-circuit


It seems like this works but I think the gain is really low here. If I connect the LM386 to the OPA134, which changes should I make to the circuits please ? Would the one I've attached work pleas ?
« Last Edit: November 27, 2018, 08:43:49 am by SoundFan »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20357
  • Country: gb
  • 0999
Re: Pre-amp to connect microphone to speakers
« Reply #20 on: November 27, 2018, 09:41:07 am »
Most opamps have a minimum allowed load of 2 thousand ohms.
I am not arguing- just interested. Where does that requirement come from?
Data sheets typically show 2k when specifying the output drive. In reality there is no set minimum load impedance requirement. It's determined by the op-amp's maximum output current and the desired voltage swing. If the op-amp can drive 10mA peak, then it'll be able drive a 600Ohm load with a peak voltage of 6V.

Hello,
I have tried out the circuit from AudioGuru and unfortunately it still doesn't work.

The OPA134 will not drive a speaker directly either.

You need to connect the output of the MAX9814 or OPA134 to a power amplifier such as the LM386 to drive a speaker.

OK, I will be ordering some LM386s. I think using the LM386 directly won't be possible because of its low gain (x20), right ? I have found a post of someone using the LM386 to connect an electret mic to a speaker : https://circuitdigest.com/electronic-circuits/lm386-audio-amplifier-circuit


It seems like this works but I think the gain is really low here. If I connect the LM386 to the OPA134, which changes should I make to the circuits please ? Would the one I've attached work pleas ?

How much gain do you want? The LM368 configuration you linked to has a gain of 200, not 20, because C1 bypasses an emitter resistor inside the IC. The data sheet provides lots of information about configuring the LM386 for different gains.
http://www.ti.com/lit/ds/sbos869/sbos869.pdf

The circuit you've posted with the op-amp and LM386 stages cascaded has a total gain of 200 000, which is far too high.

The single stage LM386 circuit, with a gain of 200, will probably have enough gain to drive a small speaker, form an electrect mic.
« Last Edit: November 27, 2018, 09:48:56 am by Hero999 »
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Pre-amp to connect microphone to speakers
« Reply #21 on: November 27, 2018, 04:19:19 pm »
I think either the electret mic is connected backwards or it is not an electret mic, maybe it is a dynamic mic and the bias voltage is causing it to work poorly.

EDIT: I think the tiny speaker (squeaker) is fried.
« Last Edit: November 27, 2018, 04:27:13 pm by Audioguru »
 

Offline SoundFanTopic starter

  • Contributor
  • Posts: 17
  • Country: fr
Re: Pre-amp to connect microphone to speakers
« Reply #22 on: November 28, 2018, 09:29:07 am »
How much gain do you want? The LM368 configuration you linked to has a gain of 200, not 20, because C1 bypasses an emitter resistor inside the IC. The data sheet provides lots of information about configuring the LM386 for different gains.
http://www.ti.com/lit/ds/sbos869/sbos869.pdf

The circuit you've posted with the op-amp and LM386 stages cascaded has a total gain of 200 000, which is far too high.

The single stage LM386 circuit, with a gain of 200, will probably have enough gain to drive a small speaker, form an electrect mic.

I'm sorry, I thought I've read somewhere that the LM386 has a fixed gain of 20. I'll try that when the LM386s arrive.
 

Offline SoundFanTopic starter

  • Contributor
  • Posts: 17
  • Country: fr
Re: Pre-amp to connect microphone to speakers
« Reply #23 on: November 28, 2018, 09:31:24 am »
I think either the electret mic is connected backwards or it is not an electret mic, maybe it is a dynamic mic and the bias voltage is causing it to work poorly.

EDIT: I think the tiny speaker (squeaker) is fried.

I've tried different mics and they work fine if connected directly to the PC. They are unpolarized but I have tried them in both directions already. The "squeaker" (I like that name) might be fried but the headphones work well.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20357
  • Country: gb
  • 0999
Re: Pre-amp to connect microphone to speakers
« Reply #24 on: November 28, 2018, 09:59:31 am »
How much gain do you want? The LM368 configuration you linked to has a gain of 200, not 20, because C1 bypasses an emitter resistor inside the IC. The data sheet provides lots of information about configuring the LM386 for different gains.
http://www.ti.com/lit/ds/sbos869/sbos869.pdf

The circuit you've posted with the op-amp and LM386 stages cascaded has a total gain of 200 000, which is far too high.

The single stage LM386 circuit, with a gain of 200, will probably have enough gain to drive a small speaker, form an electrect mic.

I'm sorry, I thought I've read somewhere that the LM386 has a fixed gain of 20. I'll try that when the LM386s arrive.
Whoops, I posted a link to the OPA196, when I meant to post a link to the LM386.
http://www.ti.com/lit/ds/symlink/lm386.pdf

The LM386 can be configured for any gain between 20 and 200. Adding a 10µF capacitor between pins 1 & 8 increases the gain from 20 to 200. Including an additional resistor in series with the capacitor, enables the gain to be set to other values between 20 and 200. Page 8 of the data sheet shows a 1k2 resistor in series with the 10µF capacitor, gives a gain of 50.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf