Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Simple electret amplifier (needs to be run from 5V)

Status
Not open for further replies.

physicsjosh

Newbie level 2
Joined
Sep 25, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,315
I'm making a program for an AVR microcontroller that requires audio input via the onboard ADC. I've set up the micro and a 2x16 alphanumeric display that shows the current value that the ADC is "seeing". I've tested it out with a photodiode and it works, so i know that part of the circuit is fine.

The ADC reference voltage is 5V (VCC) and it's got 10-bit resolution so it's sensitive to 5mV changes.

I've got an electret microphone and i've got a couple of opamps in my parts box that i could use. So, i'd either use a TL072 or an LM358 to amplify the signal. My question is what is the best way to do it?

The circuit is powered by 2 AA's and the voltage goes through a MAX619 (boosted to 5V). So i've got a 3V rail and a 5V rail to play with. Ideally i'd like the output range to swing from 0V for no noise and 5V when the mic is (i guess this is the right word) saturated. I've had a go making a non-inverting amplifier, which seems to work occasionally but changing the resistors to play with the gain changes the voltage that the mic input gives (which is a bit confusing). The mic is running from the 5V rail with a 3.3k resistor and the output goes through a 100n capacitor (DC filtering).

The mic doesn't seem to be particularly sensitive either, i know it should be - there are plenty of people reporting picking up whispers and so on. Blowing on it certainly causes a change in voltage, but talking near it doesn't do anything.

Any thoughts as to how to go about this?
 

dick_freebird

Advanced Member level 5
Joined
Mar 4, 2008
Messages
7,140
Helped
2,092
Reputation
4,188
Reaction score
1,939
Trophy points
1,393
Location
USA
Activity points
57,289
The electret element is just a (charged) capacitor
and wants a very high impedance buffer or amplifier
input. Typically a small signal JFET is shown in the
application circuits. You want both high resistance,
and a very low capacitance (to minimize charge
division). An op amp input, with ESD and package
parasitics and large input devices, is probably not a
top choice. Not without you buffer the mic beforehand.
 

throwaway18

Advanced Member level 2
Joined
Jun 9, 2005
Messages
596
Helped
101
Reputation
202
Reaction score
24
Trophy points
1,298
Location
Kent, UK
Activity points
8,363
Sound has very large variations in amplitude. Human hearing is very logarithmic, you don't notice just how much it varies
If you are talking to two people in a quiet room a person sitting next to you and talking loudly might be 90dBA, someone talking quietly on the other side of the room might be 50dBA.
If the person next to you gives 1Vp from an amplified microphone the person on the other side of the room gives about 0.01v

It usually takes a very loud sound to saturate a microphone.
If 135dBA gives 5Vp-p then 75dBa will give 5mVp-p so a lot of sounds in a typical not-very-noisy room, won't register at all.

The mic doesn't seem to be particularly sensitive either, i know it should be - there are plenty of people reporting picking up whispers and so on.
The output with a whisper a few feet away will be in the region of a few microvolts. That is probably far enough above the noise floor of the microphone that
with a lot of gain you could comfortably listen to it from a loudspeaker.

Blowing on it certainly causes a change in voltage, but talking near it doesn't do anything.
You are not measuring it properly. In terms of sound pressure level blowing on the microphone can be 50 decibels (one hundred thousand times more power) than talking at a normal level a foot from the microphone.
The output when you talk will be in somewhere around 0.0001V to 0.01V peak to peak depending on microphone sensitivity and how loud you talk.

The tl072 and the lm358 are not rail-to-rail amplifiers.

With a single 5volt supply those opamps will saturate if you try to drive the output below about 1volt or above about 4volts, you can only be sure of having about three volts of swing.

Also the input pins of the opamp have to be in the region of about 2 to 3 volts. It won't work if the inputs are within a couple of volts of the supply rails.

There are rail-to-rail opamp's that will swing their output 0 to 5volts with a 5volt supply, they tend to be slow but they will do for audio.

. I've had a go making a non-inverting amplifier, which seems to work occasionally but changing the resistors to play with the gain changes the voltage that the mic input gives (which is a bit confusing).
After the DC blocking capacitor you have to bias the input of the opamp to be about 2.5Volts.
Audio is AC. The amplifier has to be able to swing both up and down in voltage.
You have to amplify the difference between a 2.5volt reference and the output of the microphone with bias.

For example you bias the microphone signal so it is 2.5000volts with silence and it varies from 2.4999 to 2.5001volts when you whistle near the microphone. If you choose a voltage gain of 1000 then the amplifer output will swing between 2.4V and 2.6V.

Added after 2 minutes:

The electret element is just a (charged) capacitor
and wants a very high impedance buffer or amplifier
input. Typically a small signal JFET is shown in the
application circuits.
No, usually the small JFET is built into the microphone capsule when you buy it.

An opamp is ok to amplifiy the output of a typical electret capsule.
 

physicsjosh

Newbie level 2
Joined
Sep 25, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,315
Whoop, sorry, i forgot about the logarithmic part, obviously it'd take something stupidly loud to saturate it.

The primary purpose is a camera trigger, and the level at which the photo is taken is entered by the user. So as i said it would be good to have something like a quiet room being "low" and a hand clap or perhaps a glass breaking would be "high". In an ideal world it would be great to have a pot or something to change the sensitivity/gain.

1-4V will have to do, it's not too much of an issue, that'd just mean the ADC never goes below around 200 (1V = 200 div.) or above 800.

The slew rate needs to be fairly fast, fast enough to respond to the sorts of events described above. I'm not sure how long something like a hand clap would take, but even the cheap op amps have a slew rate of 0.1V/µS by the looks of it which should be fine.

A quick look on Farnell for audio op amps shows that the LM386 seems to be a reasonable choice (at 50p it's the cheapest anyway!).

Could you give me any design hints?

How do i bias the mic? Is that simply providing 2.5Vs to the mic's positive terminal?

EDIT:

Since i already have a few 2N3904's i was going to try this instead, but would this be preferable to an op amp?

http://tinkerlog.com/2007/05/20/cheap-sound-sensor-for-avr/

I'm using an AVR so in theory it should be perfect, but i can't seem to get it to work either. It responds, again, to blowing, but as you say, that's (to a microphone) very very loud. Could the mic be dead?
 

Audioguru

Advanced Member level 5
Joined
Jan 19, 2008
Messages
9,169
Helped
2,119
Reputation
4,232
Reaction score
1,947
Trophy points
1,393
Location
Toronto area of Canada
Activity points
57,591
The TL071 opamp has a minimum supply voltage of 7v so is not suitable to use only 5V.
The LM358 is noisy and has a poor high frequency response.
The LM386 is a little power amp, not an opamp and already has its inputs biased and already has negative feedback making a gain of 20 (it can be increased with an added capacitor to 200).

The opamp circuit and transistor circuits have an output DC voltage of about +2.5V with the audio super-imposed on it. The audio is AC, not DC.
 

snafflekid

Full Member level 4
Joined
May 9, 2007
Messages
214
Helped
31
Reputation
62
Reaction score
8
Trophy points
1,298
Location
USA
Activity points
2,644
you could use a log amp instead of linear to "normalize" the volume level for human hearing
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top