1
\$\begingroup\$

I am using this electret microphone amplifier in my circuit

https://www.sparkfun.com/datasheets/BreakoutBoards/Amplified-Mic-Electret-v14.pdf

I'm getting voltage spikes at the amplifier output that are randomly happening every 2-5 seconds. After shorting the microphone leads, there were no voltage spikes at the amplifier output. What could be the probable causes of an electret microphone causing voltage spikes? Is that a common problem? I'm thinking that I might need to switch to a MEMs microphone.

The amplifier output is connected to an analog input pin of an Attiny84 microcontroller as well as an input to a comparator.

\$\endgroup\$
  • \$\begingroup\$ Well, I don't know what's causing yours to misbehave. The capsule is really cheap though. I've used/built maybe a dozen such circuits in my life (from scratch), even on plug-in breadboard... and never had problems. I never even bothered with good [e.g. Japanese] brands; just Taiwanese ones. So I think electrets are quite reliable (also they used to be 90% of the market until the phones got really packed with electronics). \$\endgroup\$ – Fizz Sep 29 '15 at 6:46
  • \$\begingroup\$ electronics.stackexchange.com/questions/170571/… might be related. \$\endgroup\$ – Fizz Sep 29 '15 at 7:25
  • 2
    \$\begingroup\$ What happens if you disconnect the microphone? \$\endgroup\$ – Andy aka Sep 29 '15 at 8:50
  • 1
    \$\begingroup\$ I actually still see the voltage spikes after disconnecting the microphone... \$\endgroup\$ – cheeto Sep 29 '15 at 21:12
3
\$\begingroup\$

You are running a gain of 40 dB. Any noise that is present at the input will be amplified by 100x.

There are several possible places where the noise might enter the circuit but the most likely spot is the bias resistor. There are a couple of things that you can try.

1) Move the bias resistor power lead from Vcc to ground. Although the mic won't work, does the noise go away?

If it does, you need to add a low-pass power supply filter to the bias supply. This can be as simple as another 10k resistor in series with Vcc and a large capacitor from the junction of the two resistors to ground.

2) Disconnect the mic. Does the noise go away? If so, try a different mic capsule.

One very rare problem that I've had in the past is that the ground trace that connects to mic's the metal case was broken. This allowed the metal case to pick up nearby noise spikes. Replacing the capsule fixed the problem.

\$\endgroup\$
  • \$\begingroup\$ I disconnected the mic and I still see voltage spikes at the amplifier output. It would be hard for me to move the bias resistor power lead because it's a small surface mount part and there is a trace on the board connecting it to VCC... \$\endgroup\$ – cheeto Sep 29 '15 at 21:16
  • \$\begingroup\$ @cheeto: so the problem is in the amplifier circuit then. Since you've removed the mic, this might a good opportunity for you build your own mic [pre]amp. There are plenty of schematics on the web. I typically use a NE5532 with two 10x stages, but most opamps will be fine. Also, if you have a laptop/computer with "mic in" (not just "line in") you can connect the capsule directly to that to test/use it. The "mic in" jack supplies the necessary bias (and is amp', typically to 100x). The same goes for a smartphone that can take a mic headset. \$\endgroup\$ – Fizz Sep 30 '15 at 6:33
2
\$\begingroup\$

Facts:

  1. You short the microphone terminal out and the noise disappears
  2. You open circuit the microphone and the noise is still there

Conclusion, the noise is coming thru the 2k2 bias resistor and there are two mechanisms: -

  1. Noise on the power rail
  2. A weak power rail that is being affected by the op-amp's output and positive feedback is causing the oscillation/noise.

You should try decoupling the power rail first with maybe 100uF. If this offers no improvement then splitting the 2k2 bias resistor into 2x 1k resistors and decoupling the mid-point to ground is likely to offer improvement.

\$\endgroup\$
  • \$\begingroup\$ Ok thanks I'll have to check that out, but now I've been thinking about another possibility: I read that ceramic capacitors can behave like microphones through the piezoelectric effect, could this be causing the noise? Would it be best to replace the ceramic caps by tantalum ones? \$\endgroup\$ – cheeto Sep 30 '15 at 21:37
  • \$\begingroup\$ @cheeto: what is your power supply? I would suggest you first try powering the opamp circuit from a battery (clean DC) and feed it some low-level (10-50mV) DC signal at input but *after * the C1 (AC-coupling) cap. Then measure the output (for a while). If there are no spikes then the circuit is mostly ok, except for (lack of) immunity to power supply noise. The OPA344 can take up to 5.5V supply, so use a powerbank for phones, etc. \$\endgroup\$ – Fizz Oct 1 '15 at 19:16
  • \$\begingroup\$ The minimum supply is 2.5V for OPA344, so two AA batteries would work as well; in that case limit the input to 25mV or so. \$\endgroup\$ – Fizz Oct 1 '15 at 19:22
  • \$\begingroup\$ Actually, the latter (2xAA) is better because some power banks use a switching regulator, and that will be noisy. You could also use a "naked" Li cell if you have that. \$\endgroup\$ – Fizz Oct 1 '15 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.