8
\$\begingroup\$

I'd like to use this diagram to pre-amplify a microphone signal in order to activate the analog input of my arduino

schematic
(source: reconnsworld.com)

Will it work with a dynamic microphone in place of an electret microphone?

\$\endgroup\$
  • \$\begingroup\$ There was recently another question about connecting microphones to arduinos: How to connect mic on arduino, with opamp? \$\endgroup\$ – Phil Frost Jan 13 '13 at 14:22
  • \$\begingroup\$ Thanks to everyone. I'm still building it, so I'll mark the most helpful answer when I'm finished. \$\endgroup\$ – Joseph Jan 13 '13 at 22:28
9
\$\begingroup\$

The circuit is okay (not ideal for quality but it will work), but there's one small issue if you want to feed the output to your Arduino. As shown, the output will swing below ground (i.e. it will be biased at 0V) and your Arduinos analog input will only accept positive voltages.

The output with the above circuit will be something like this:

Cap Couple No Bias

If your supply is 5V, you need to bias the output to 2.5V to get the maximum swing from your input signal.

Adding a voltage divider after the capacitor will do this:

Cap Couple circuit with divider

The voltage divider is made from R2 and R4, and it biases (read "holds") the TO_ADC node at 2.5V so the ADC pin sees the full swing of the signal. Without it the ADC would only see the positive half of the signal, because we have no negative power supply present.
The formula for a voltage divider is:

Voltage divider formula

Voltage Divider example

So for the voltage divider formed from R2 and R4, with the 5V supply we get:

5V * (R4 / (R2 + R4) which equals:

5V * (100kΩ / (100kΩ + 100kΩ) = 5V / 0.5 = 2.5V at the middle (Vout in the above example diagram, which is the TO_ADC node in our circuit)

Then the output will be more like this (depending on your ADCs input impedance it may not work well though - this is the bit that is simulated by Radc and Cadc, I'll check this shortly):

Cap Couple with Bias

There are other options also, I will try and post an improved circuit shortly.

Okay, here's an option which controls the transistor gain properly (using the emitter resistor with AC bypass) and outputs a lower impedance signal that swings around ~2.5V (V+ is 5V - the capacitors do not have to be as large as 10uF, you can still use 100nF if you wish for your input capacitor):

Improved option

Radc and Cadc
Radc and Cadc are not components you need to add (so you can ignore them if/when you make the circuit), they represent your microcontrollers analogue input pin characteristics. Some microcontroller ADCs can have quite low input impedances which can load your signal and attenuate it (so basically you end up with a lower reading than you expected)
So when we simulate, it's good to add this simulated loading to make sure the signal will not be affected too badly.

Simulation (note simulated ADC loading also):

Improved option simulation

We can see this handles a 20mV input pretty well, if we input 20mV to the original circuit (even without any loading), we get some distortion due to the uneven gain (note flattened edges on negative swing):

original output

There are still better options and variations (the above may need the values tweaking a little) A simple opamp circuit would be one, but it depends on how concerned you are about the sound quality whether you would want to bother. If you're happy with a bit of distortion, then the first circuit with a suitable method of biasing will be fine.

\$\endgroup\$
  • \$\begingroup\$ Are you sure this solution will work without affecting the amplifier gain? Actually, the second plot you posted has a slightly smaller gain. Maybe using even bigger resistors for the divider would work... \$\endgroup\$ – Vladimir Cravero Jan 13 '13 at 5:44
  • 1
    \$\begingroup\$ It has roughly the same gain, the main point is the issue of the DC bias so the ADC sees a positive voltage. The circuit is not ideal, if the ADC input impedance is low, then bigger divider resistors would be worse. I'm just about to post a better circuit. \$\endgroup\$ – Oli Glaser Jan 13 '13 at 6:01
  • \$\begingroup\$ @Oli. Thanks for your detailed and extensive answer. However, it's a bit beyond my skill level. So I have the following questions What is a voltage divider? More importantly - how does it work? In the second circuit diagram what is the Radc and Cadc doing? \$\endgroup\$ – Joseph Jan 13 '13 at 16:06
  • 1
    \$\begingroup\$ Now if we could only get circuits in circuitlab so people can easily play with them! :) Very nice answer. \$\endgroup\$ – Kortuk Jan 13 '13 at 17:01
  • 1
    \$\begingroup\$ @OliGlaser Yes, we have been doing the link to thing, SE is actually waiting with dev guys to get the plugin working on the site as soon as circuitlab has setup the interface! \$\endgroup\$ – Kortuk Jan 13 '13 at 17:12
6
\$\begingroup\$

Yes, it will probably work just fine. You just need to eliminate R1, since a dynamic microphone doesn't need a DC bias.

\$\endgroup\$
  • 4
    \$\begingroup\$ I'd phrase it more strongly: a DC bias may damage a dynamic microphone. \$\endgroup\$ – Phil Frost Jan 13 '13 at 2:37
  • \$\begingroup\$ I doubt if 1 mA will physically damage it, but it probably won't work very well while the current is flowing. \$\endgroup\$ – Dave Tweed Jan 13 '13 at 5:23
  • \$\begingroup\$ Hello, I built the circuit without R1 - replacing it with a wire. The diaphragm of the microphone is completely sucked in - this doesn't seem to be aiding the recording of any signal. It's clearly the due to the current flowing into it - should this be something that's occurring? \$\endgroup\$ – Joseph Jan 13 '13 at 23:05
  • 1
    \$\begingroup\$ Ah... remove the resistor completely, not replacing it with wire \$\endgroup\$ – Joseph Jan 13 '13 at 23:30
  • 2
    \$\begingroup\$ I think you fried your microphone... \$\endgroup\$ – Vladimir Cravero Jan 14 '13 at 13:39
4
\$\begingroup\$

You may need considerably more gain - probably a second amplifier stage - with a dynamic microphone. At which point, using a low noise opamp is probably simpler.

\$\endgroup\$
  • \$\begingroup\$ A decent (sensitive) dynamic mic can output quite a large signal (relative to other mics) in the order of tens of mV, so a gain of 100 is reasonable for a 5V microcontroller ADC. I agree a low noise opamp is a nice solution though. \$\endgroup\$ – Oli Glaser Jan 13 '13 at 12:14
  • \$\begingroup\$ "decent" and "sensitive" are often different things in microphones! Perhaps I should rephrase as, check the microphone's specification; if necessary, choose a higher gain mic or be prepared to add more gain. \$\endgroup\$ – Brian Drummond Jan 13 '13 at 12:18
  • \$\begingroup\$ yes, you're right about the decent/sensitive bit :-) I didn't mean they necessarily go together. Hopefully the OPs mic will be suitable, but a simple audio opamp with a gain control would be nice - I was going to add one to my answer but it's long enough anyway, maybe you could add an example in yours. \$\endgroup\$ – Oli Glaser Jan 13 '13 at 12:33
  • \$\begingroup\$ Go ahead. Your answer is better overall anyway; I just feltt a warning about gain was worthwhile to prevent surprises later. \$\endgroup\$ – Brian Drummond Jan 13 '13 at 13:28
  • \$\begingroup\$ Yes, the warning on gain was definitely worthwhile considering the wide range of dynamic mic sensitivities. I'll probably add it later then, hopefully by then the OP may have commented on whether the quality is so important (or an opamp is an option) \$\endgroup\$ – Oli Glaser Jan 13 '13 at 14:24

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.