I'm currently working on a fun PCB project and have this circuit built that will input into an ATmega328P.

What I'm looking for is what you guys think of this and if you think it will work.

Does the op amp look okay for being in single ended mode?

Unfortunately I've been told that an LM386 is mainly designed for driving speakers but I feel as if my schematic should work, shouldn't it?

Otherwise, I was told to look at using an MCP6002 op amp.

Despite my "killer" design below, I'm really not great with op amps. Does anyone know what a microphone schematic with an MCP6000 series op amp might look like?

LM386 Microphone Schematic

Edit: I was trying to mimic this design but KiCad's implementation of op amps is a bit funky so my schematic above is upside down compared to the conventional implementation.

Original Schematic

  • \$\begingroup\$ Grounding the +5V DC input is likely to cause smoke, somewhere. \$\endgroup\$
    – glen_geek
    Feb 25, 2021 at 18:20
  • 1
    \$\begingroup\$ You've posted your question twice. Can you delete one of them? Regarding your schematic, you've drawn it rather unconventionally. The convention is positive on top, negative on the bottom. Ground symbols point to, um, the ground. Circuit signal flow is generally left to right so the microphone would be on the left and the "microphone" label would be "output" or "line out" or similar. As it is it looks like an input. As glen says, you have a dead short betwee +5V and GND. Otherwise the layout is clean. \$\endgroup\$
    – Transistor
    Feb 25, 2021 at 18:22
  • \$\begingroup\$ Sorry about that, I've deleted the accidental repost. I tried to mimic a design for my op amp that clearly I didn't mimic very well facepalm at the +5V short \$\endgroup\$ Feb 25, 2021 at 18:27
  • \$\begingroup\$ An omission: These LM386 circuits are prone to high-frequency oscillations, because the +5V source is far from the chip. Add a DC supply bypass capacitor close to pin 4,6. \$\endgroup\$
    – glen_geek
    Feb 25, 2021 at 18:30
  • \$\begingroup\$ @glen_geek C9 in my original schematic, will it cut down on oscillations? That was my plan with the purpose of that Cap \$\endgroup\$ Feb 25, 2021 at 18:38

2 Answers 2


Elecret Physics

Electret microphones depend upon one basic idea: a pre-charged capacitor, whose capacitance varies with pressure variations caused by ambient sound. In highly simplified form, \$V_t=\frac{Q}{C_t}\$. So, it follows that the voltage itself will vary as the capacitance does.

Typically, these devices have only a few pico-Farads. The cheaper ones closer to \$5\:\text{pF}\$ and more expensive ones with several times that. Given a desire for a frequency response down towards \$20\:\text{Hz}\$ or so, the input impedance of the amplifier must be nearer to \$1\:\text{G}\Omega\$.

Electret 1st stage Amplification

As with any input transducer, the 1st stage design is vital. (This is also likewise true for any output transducer, where the final stage design is also vital.) As a general rule, it is the first stage that will determine the signal-to-noise ratio (S/N) for a given bandwidth. There are tricks you can play later on, but those same tricks would have been even better spent had the 1st stage been arranged more optimally. So it is the first stage where you spend your design trade-off time.

In the case of electrets, especially earlier in their ramp-up towards maturity, only very few components could be included inside the capsule/module. Until fairly recently (and still true for cheap modules), that meant a JFET and/or a resistor. These early electret microphones fell into two camps: 2-terminal and 3-terminal devices.


simulate this circuit – Schematic created using CircuitLab

(You once could buy electrets without any circuitry. I remember them back when I knew less about how to use them. So I avoided them. But today? I don't know if that's still possible -- at least in hobbyist quantities.)

The resistor may already be provided in the 3-terminal devices. But not necessarily so. Always check the datasheet.

It's interesting to look at the datasheet for a typical JFET used in these microphone modules. So here's information from the K1109:

enter image description here

In the 2-terminal variety of JFET modules, \$V_\text{GS}=0\:\text{V}\$. So here you can see that \$350 \:\mu\text{S}\le g_m\$ and that it is typically \$g_m\approx 1.6\:\text{mS}\$. The typical value of \$g_m\$ would put the voltage noise density introduced by this JFET at about \$2.6\:\frac{\text{nV}}{\sqrt{\text{Hz}}}\$. (At worst, this is \$5.6\:\frac{\text{nV}}{\sqrt{\text{Hz}}}\$, despite what the datasheet says about it towards the bottom.)

(Feel free to peruse this lab worksheet's first couple of pages if you want to see the calculations used for JFET noise density.)

BJTs are usually far better when used at lower source impedances. Their noise sources from three primary places (ignoring flicker): the base spreading resistance's Johnson noise density, the collector current shot noise density across \$r_e\$, and the base recombination current crossing the PN junction in the device. The density sum of the first two noise sources drop as the collector current is increased, but eventually bottoms out at some collector current. Once that is reached, you have to find a different device to get a better noise density value. The third one increases with collector current but the combination of all sources means that the overall BJT noise is pretty flat for \$ \frac12\:\text{mA} \le I_\text{C}\le 3\:\text{mA}\$. Unfortunately, that also tends to mean source impedances in the low \$k\Omega\$ range and below. That can be addressed using very low BJT collector currents. But then the base spreading resistance dominates and it is just not going to compete with the JFET.

So, at the high source impedances needed for electrets, JFETs are generally better, despite their vagaries. That, plus the ease of using a JFET in these capsules and the fact that they didn't take up too much room at the time meant that JFETs quickly became the standard for electret modules.

Some final notes here:

  1. Note that in the above example JFET, \$40\:\mu\text{A} \le I_\text{DSS}\le 600\:\mu\text{A}\$. With \$V_\text{GS}=0\:\text{V}\$, this device's drain current will be within that range. Most electret capsules are assumed to operate at about \$500\:\mu\text{A}\$, though some will require twice that or even more.

    Designing correctly for 2-terminal capsules to handle such a wide tolerance, always in saturation mode, can be a challenge. 3-terminal devices offer better design management options, as \$V_\text{GS}\lt 0\:\text{V}\$ now, but you often cannot expect users of your circuit to forego 2-terminal devices.

  2. 2-terminal devices will operate the gate for a half-cycle where the gate diode is reverse-biased. But for the next half-cycle they will be moving this diode into its forward-biased region and this will snip/distort the signal. 2-terminal devices should be operated with high gain so as to mitigate this distortion. On the contrary, 3-terminal devices can be readily operated so that the entire cycle operates with the gate diode reverse-biased and therefore avoid the distortion of 2-terminal devices.

  3. Modern capsules can now include entire opamps inside. These also include both 2-terminal, direct replacement, types as well as 3-terminal, high performance, types. The current compliance specifications for these tend to vary more widely than they do for pure JFET capsules. So, again, it's important to decide carefully about what range of electret modules to support when designing a circuit to provide the necessary compliance current.

Elecret Sound Pressure

Perhaps you noticed that the above datasheet provided that \$-100\:\text{mV} \le V_{\text{GS}_\text{OFF}}\le -1 \:\text{V}\$? If that JFET mentioned above were used, you would not want the input signal to peak with a magnitude larger than \$100\:\text{mV}\$. Luckily, it's almost impossible for electrets to exceed it. But this gets to a different question. How exactly does sound translate to voltage peaks in an electret?

These devices will have a specification. For example, let's examine two different eletrets from Primo: EM123 and EM272. Note that the size of one is quite different from the other. So are the specifications: EM123 as \$-43\:\frac{\text{dBV}}{\text{Pa}}\$ and EM272 as \$-28\:\frac{\text{dBV}}{\text{Pa}}\$. (Please feel free to read the associated conditions for those specs, too. Note, for example, that the EM123 specifies an S/N ratio of \$58\:\text{dB}\$ and the EM273 specifies a much better \$80\:\text{dB}\$!)

To work out the details here, you'll need to know the sound levels you are dealing with. And this is where things get very, very important in your situation. If you operate your ADC as a linear function of the SPL, then you can at most expect a practical dynamic range of about 10:1. That's the difference between a very quiet library and having a conversation while standing up with someone just a few feet away. It's also the difference between that same conversation versus standing at a busy street corner during the day.

That may be okay for your music uses. But I believe you must seriously decide now, before you design anything. Even if you can vary the top end to your liking, it's highly likely that the bottom end will be "in the noise" of your ADC. Or, if you set the bottom end, then some of your desired top end detections will be with the ADC saturated out and providing no useful info. So this is where you need to sit down and work out the realistic levels.

For example, the difference between me practicing my piano and me listening to some chamber music in a small hall is about \$15\:\text{dB}\$. That's "on average" and makes for a dynamic range of about 32, or so. If I wanted to detect between just these two cases, I might plan for 10-bit ADC average value to be 800. This would mean I could accept about \$+1\:\text{dB}\$ excess over my expected average. This also means that if I wanted to detect my piano practicing case, the 10-bit ADC average value might be about 25. But this is likely pretty close to the noise floor for the MCU ADC, too. So it may work okay. It may not. Especially if I need to allow for a somewhat lower level of piano playing while still detecting it.

This is why it's so important to know the dynamic range of your sound levels needed for proper detection. It's easy to just wave your hands around and hope. But it's a lot smarter to sit down with paper and pencil and work out the details as much as you can before embarking on this. You might save yourself a lot of head-scratching later on.

If you do need a wider dynamic range than about 10:1 or perhaps even 30:1, then you may need to do something different. This might mean a logarithmic amplifier or something where you can set the low end of the dynamic range (and a desired ADC value for it) and the high end of the dynamic range (and again another desired ADC value for that, too.) Yes, this is more complex. But it's not impossible. And if you need it, then you do. Or you could just accept a broad log-amp arrangement and calibrate the values in software when you have time for that.

Let's return to the two electret microphones above for a moment. My piano playing might be \$60\:\text{dB SPL}\$ (this is referenced to a barely detectable sound level of \$0\:\text{dB SPL}\$ or \$20\:\mu\text{Pa}\$.) So here I get about \$20\:\text{mPa}\$. That chamber music quartet I'm listening to might be \$75\:\text{dB SPL}\$. Or about \$110\:\text{mPa}\$. With the EM123 sensitivity of \$-43\:\frac{\text{dBV}}{\text{Pa}}\$, the dynamic range will be from about \$140\:\mu\text{V}\$ to about \$800\:\mu\text{V}\$. With the EM272 sensitivity of \$-28\:\frac{\text{dBV}}{\text{Pa}}\$, the dynamic range will be from about \$800\:\mu\text{V}\$ to about \$4.5\:\text{mV}\$.

All of these are of smaller magnitude than the smallest \$V_{\text{GS}_\text{OFF}}\$ of the JFET we've been examining, so these would all play well together (so long as the loudest sound to tolerate would be the chamber music.) The loudest that you could reasonably use with the JFET above would be \$98\:\text{dB SPL}\$. But that's a lot, so it may be just fine.

Voltage Gain

Perhaps you've already noticed that different electrets will produce different output voltage variations, given their reference output resistance. Widely different. So you already know that in order to support different electrets you will have to support varying the system gain before reaching the ADC. You will also likely have to support different compliance currents. Or, if you only plan to support just one, you still may need a way to calibrate the dynamic range you need to support. And that's still lacking in your specification.

I'm going to leave this with a "standard template" approach to get some answers from you. I'll use your MCP6002 opamps (but illustate by using the MCP6022 package.) But I leave this design with a huge question mark at the end -- what to do with the final opamp?


simulate this circuit

The above allows you to set the microphone's compliance current independently from voltage gain considerations, by trading off resistance in \$R_1\$ and \$R_2\$. The output of the first stage will be centered around \$\frac12\:V_\text{CC}\$. And it is here that I've no idea what you need:

  • Do you want the ADC to see the full audio swing and require substantial data processing rates? If so, you'll have a lot of processing to do for various "levels" of audio detection.
  • Do you want to somehow have close to the ADC offset voltage as "no signal" and then create an increasing DC value for louder levels of audio? If so, what's the integration period for this achievement? How often will you need to sample this?

It's up to you. But you really need to write a better specification. I'm lost about what you really need. I honestly don't know. The communication burden is on you to correct this.


The +5 volt supply is shorted to ground: -

enter image description here

So yes, it is a "killer" design!!

Does the op amp look okay for being in single ended mode?

It's not an op-amp but an audio amp and yes, despite the schematic being upside down it does roughly match the information in the data sheet.

Does anyone know what a microphone schematic with an MCP6000 series op amp might look like?

It might be anything so no, there is no specific answer to this part of your question.

On a side note - before deleting questions, double check that someone (me) hadn't already provided an answer that I then had to transpose here.

  • \$\begingroup\$ Thanks Andy clearly I missed that short. I'm glad I'm getting positive feedback though on the fact that this should work. Although I'm seeing others are saying the LM386 can create high freq oscillations and might not be suitable for an audio amp \$\endgroup\$ Feb 25, 2021 at 18:41
  • \$\begingroup\$ Andy, would like your thoughts on this. I've been told by a friend that my use of the op amp in single ended mode needs a fake ground at 2.5V with a pair of resisters and to use them on the non inverting input. With extra op amps, I can use one as a voltage follower on the fake ground. This is what makes me doubt my implementation of my current op amp..... \$\endgroup\$ Feb 25, 2021 at 18:45
  • \$\begingroup\$ What op-amp do you refer to @johnson8ryley - The LM386, like any audio amplifier is subject to certain precautions in the implementation or, it can produce instability and distortion in the speaker. \$\endgroup\$
    – Andy aka
    Feb 25, 2021 at 20:04
  • \$\begingroup\$ The LM386 is a power amplifier that already has its inputs biased properly and it already has negative feedback, it is not an opamp. An opamp needs to have its +input biased at about half the supply voltage and it needs to have negative feedback added. \$\endgroup\$
    – Audioguru
    Feb 25, 2021 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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