Microphone outputting constant voltage?

Discussion in 'The Projects Forum' started by Lilrayray, Mar 30, 2009.

  1. Lilrayray

    Thread Starter Active Member

    Feb 21, 2009
    31
    0
    Hi all,

    I have constructed a small microphone preamp for an electret condenser. According to the simulations I ran prior to putting the circuit together, the setup should work as intended, which it is not. (In order to analyze the amplified microphone data, I am using a microcontroller to read the data into my computer where I view the output on screen).

    Foremost, instead of getting constant "center" unamplified values when the microphone is not receiving sound, the input indicates that the microphone is outputting a voltage. When I increase the op-amps gain, this idle value increases accordingly instead of remaining relatively the same. For example, if a central value of 512 indicated 0 voltage output from the microphone, I would receive a constant value 550-700, depending on the gain that I set.

    Furthermore, the only time I am able to detect a change in these values is when I make physical contact with the microphone or blow on the microphone -- simply talking into it does nothing.

    Does anyone have any hypotheses as to why this might be happening? Below is the schematic of my preamp circuit. I am using the microcontroller's 5V power supply to power both the op-amp and the mic.

    Thanks you in advance,
    Andy
     
  2. leftyretro

    Active Member

    Nov 25, 2008
    394
    2
    Should you not be evaluating the audio performance using an output coupling capacitor? You have in effect a AGC preamp stage and you are seeing the effects of dynamic DC bias changes. Just as the AC audio input is series coupled into the circuit via a coupling capacitor the output audio should use a capacitor to couple the audio to a load and measured to see the effect of the AGC action.

    Lefty
     
  3. peajay

    Well-Known Member

    Dec 10, 2005
    67
    0
    The op-amp in that circuit isn't exactly wired as an amplifier. It's more of a voltage follower, except that you have a capacitor on its negative feedback, which means that it will amplify, but the gain is frequency-dependant: high frequencies will saturate the output while low frequencies won't see much amplification at all. All the variable resistor does is change the degree to which the op-amp is shorted to ground and the resistance between the op-amp's output and the capacitor, which does adjust the gain, but not in the sense that you would want it to since the gain is still frequency-dependant.

    Also, I think that 5 mv may be much more than what you might see come out of that microphone.

    If you want to make this easy, I would use a LM386. Just use one of the examples in the datasheet and it will work like a charm. It's cheap, and it amplifies so well that it'll drive a speaker from whatever stray radio waves it happens to pick up if you just attach a long piece of wire to its input.

    ...but, assuming you want to learn, I've been using this lately:
    http://ecow.engr.wisc.edu/cgi-bin/get/ece/340/schowalter/opampckts.pdf

    I attached two schematics.

    The first is what I use to create the virtual ground for the op-amps to work from. It's sometimes helpful to set this virtual ground to a different voltage, for example, the LM324 output can go all the way to negative, but only to within one volt of positive, so sometimes I make the ground 2.0 volts so that I can go two volts either way, instead of 2.5 volts negative and only 1.5 volts positive. Anyway, you can omit the capacitors if you're happy with how stable your voltage source is, and the resistor on the op-amp's feedback isn't really necessary I suppose, but I'm superstitious.

    The second I think will work well for the amplifier. It's the "non-inverting amplifier" on the first page of that PDF. Turning the resistor all the way towards the op-amp causes no gain at all, and turning it all the way towards the "ground" causes infinite gain, so you should find an approriate gain for the signal from your microphone somewhere between those two extremes.
     
  4. Lilrayray

    Thread Starter Active Member

    Feb 21, 2009
    31
    0
    So will coupling the output with a .1uf capacitor be enough to solve the problem? I was hoping not to have to make any drastic changes, however I feel that it might be necessary at this point.
     
  5. leftyretro

    Active Member

    Nov 25, 2008
    394
    2
    I would give that a try.

    Lefty
     
  6. Lilrayray

    Thread Starter Active Member

    Feb 21, 2009
    31
    0
    Ok, so I added a .1uF capacitor to the output and it had no effect what so ever. I am still getting a constant voltage and talking into the mic does nothing to change the output. Any other ideas what might be wrong with it?
     
  7. leftyretro

    Active Member

    Nov 25, 2008
    394
    2
    Did you terminate the output side of the output coupling capacitor (say 10k ohms to ground). It shouldn't have any DC component.

    Lefty
     
  8. Lilrayray

    Thread Starter Active Member

    Feb 21, 2009
    31
    0
    Hmm, maybe I mis understood, should the output cap. be in parallel to the opamp? Currently I have the amplifier > 470k ohm resistor in parallel, connected to ground > 100nF capacitor in series >output lead.

    attached is a diagram of the opamp output
     
    Last edited: Mar 31, 2009
  9. trixheim

    Member

    Apr 1, 2009
    10
    0
    The inverting input is connected to neg power supply through R1. When you change the R1 the offset of the amp is changing and force the output to change. The non-inverting input is connected to R3/R4 who make a midpoint voltage; you must make a similar solution for the inverting input to balance the amplifier.
     
  10. Lilrayray

    Thread Starter Active Member

    Feb 21, 2009
    31
    0
    Im not sure I follow. The inverting output in my schematic is connected to the output through R1 and ground. There is no negative supply in the circuit.

    Also, would a small offset voltage really cause this problem? Id think even with the offset error, the microphone would still respond to sound.
     
  11. trixheim

    Member

    Apr 1, 2009
    10
    0
    Both opamp inputs need to be held around the middle of the power supply (you are thinking about ground in the same manner as you will in a double supply system). When you connect R1 to ground, you introduce a DC input signal on the inverting input who will be amplified together with the signal. Disconnect R1 from the ground and I think it will work!
     
  12. Lilrayray

    Thread Starter Active Member

    Feb 21, 2009
    31
    0
    Ohh, I understand. I was initially hesitant to connect the third pin of the trimpot to ground. Ill give it a try. Thanks!
     
  13. Lilrayray

    Thread Starter Active Member

    Feb 21, 2009
    31
    0
    Eureka! Works like a charm, thanks a lot!
     
  14. Lilrayray

    Thread Starter Active Member

    Feb 21, 2009
    31
    0
    Hmm, now that I have the preamp functioning correctly, I seemed to have stumbled upon another mystery...

    I am currently amplifying the microphone output with a gain of 500. This gain seems unable to amplify the signal very much: When I speak into the microphone, with the mic nearly touching my lips, the output would indicate that the ADC is only receiving .1 volts.

    So I guess my question is simply whether this seems correct for a moderately high gain? Do electret condensers require obscene amounts of gain normally? The microphone I am using is specced with a sensitivity of 1V/Pa. Im sure my voice isnt even coming close to 94 dB, however Id still think with a 500 gain Id be getting more than I am.
     
  15. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The electret microphone needs to be powered for it to work.
    Usually it is fed from a 4.7k to 10k resistor from a decoupled positive supply.
    Make it like this:
     
  16. DickCappels

    Moderator

    Aug 21, 2008
    2,659
    632
    Now its starting to look like a proper amplifier!
     
  17. Lilrayray

    Thread Starter Active Member

    Feb 21, 2009
    31
    0
    I have my mic powered according to the datasheet: It is similar to your setup, however I am powering it with 5V (the mic can take between 1.5 and 10V; the 5V, afaik, decoupled -- USB power) through a 680 ohm resistor (as used in the datasheet). I do not however have a capacitor as you do leading off from the power supply rail (47uF). Also, what is the purpose of the 1k ohm resistor on the Vs rail between the voltage divider and the opamp?

    Thank you for you help
     
  18. flat5

    Active Member

    Nov 13, 2008
    403
    17
    680 ohms might be too low. Try a 4.7k as AG suggests.

    The 1k resistor provides isolation and more filtering for the Op-Amp input & mic.
     
  19. Lilrayray

    Thread Starter Active Member

    Feb 21, 2009
    31
    0
    I suppose I could try a higher value, however a 680 ohm resistor is used in the example in the data sheet. Would the resistor value make that much a difference on the output voltage of the mic?
     
  20. flat5

    Active Member

    Nov 13, 2008
    403
    17
    Yes. The other side of the resistor is bypassed to ground.
    I would think the datasheet meant 6800 ohms. I have used 6.8k resistors in my passive mixer with 9vdc.
     
Loading...