Dynamic Microphone preamp design help - Page 1
Forum section: electronics / projects

author: atwoz
author_rank: Regular Contributor
timestamp: July 28, 2013, 02:31:13 am
content: Hello,I'm designing a preamp for a dynamic 600Ohm Microphone. I want to be able to connect the dynamic microphone directly to a computer via de 1/8inch input jack. So far I have tried 2 solutions and both gave me bad results.1) I tried using the max4466 (http://datasheets.maximintegrated.com/en/ds/MAX4465-MAX4469.pdf). I followed the datasheet and built the sample circuit. I didn't put the bias resistors since those are intended for an electret mic. The rest is almost the same. I didn't get enough gain and the sound was distorted and it sounded too hollow.2) I built this circuit (exactly as shown)http://www.maximintegrated.com/app-notes/index.mvp/id/1931. I got better results but since I didn't get the gain I wanted I modified the feedback resistors a bit to increase the gain. I was able to get enough gain then but the distortion was too bad and the sound was also hollow.Does anyone have experience with this? I could use some help. Does anyone have or know of any reference design? What parts do you recommend? Is it better to increase the gain in several steps? For example, 4 op amps, each with a gain of 6?Thanks.

author: David_AVD
author_rank: Super Contributor
timestamp: July 28, 2013, 02:40:36 am
content: You could use an INA217 IC with minimal extra components.

author: atwoz
author_rank: Regular Contributor
timestamp: July 28, 2013, 03:02:46 am
content: Thanks for your response!I believe the INA217 is used for balanced Microphones (correct me if I'm wrong). I forgot to mention that the microphones that we will use will be unbalanced dynamic microphones.

author: fpliuzzi
author_rank: Regular Contributor
timestamp: July 28, 2013, 05:09:29 am
content: Hello atwoz,Is the link that you supplied above for your #2 circuit correct? The circuit that the link leads to shows a phono cartridge preamp, complete with an RIAA playback curve filter (the filter's extreme response is shown in figure 3 of that page). This circuit would not be usable as a microphone preamp.Rod Elliott has a page on his site that shows three versions of a mic preamp designed for unbalanced 600 ohm dynamic microphones. Maybe one of his circuits would work for your needs. He also has many other useful audio related circuits there.http://sound.westhost.com/project13.htmRegards,FrankEDIT: Rod lists the noise specs for his Class-A discrete mic preamp in the text of his article and they're quite respectable. Also, the INA217 that David_AVD mentioned has served me well in a few of my projects. Nice chip for circuits where you have the necessary voltage rails.

author: atwoz
author_rank: Regular Contributor
timestamp: July 28, 2013, 05:21:17 am
content: Frank,I made a mistake, since I was in a rush today I did build that circuit, no wonder it didn't work as expected.Thanks for the link. I did come by that site before, didn't try building the circuits for 2 reasons. 1) The supply voltages required are too high. I need 5V max since I will be connecting it to a computer. 2) I believe you need low noise op amps to achieve good results. But maybe I am wrong and those circuits give good results.Thanks a lot for the suggestion.

author: Odysseus
author_rank: Regular Contributor
timestamp: July 28, 2013, 06:10:35 am
content: Mostsingle or two stage discrete transistor amplifiers will have the best noise figure possible for the amount of gain required. Typically much more so than even decent op-amps. Distortion, on the other hand, is another matter.Although beyond the scope of an audio amplifier, seehttp://en.wikipedia.org/wiki/Low-noise_amplifierOnce amplified into the proper dynamic range, however, then the noise level of any good op-amp should be below the noise of the signal itself and it will be the signal processing component of choice.EDIT: Also, have you ensured that the line in on your computer is not a fault? Try recording something that you know sounds good and is at the expected level for the output of your pre-amp. Many recording inputs on laptops serve a dual purpose as a mic amplifier and a line in, which means they can be switched between different gain settings, with the line in setting usually possessing the best distortion characteristics.

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 28, 2013, 08:44:20 am
content: Depending on how critical your application is, then it may be difficult to 'wing' a design. Microphones are notorious for being finicky about the input impedance and other parameters of the mic pre. For instance the MAX4466 circuit you tested has an input impedance of 47K, which is probably more than an order of magnitude too high for a dynamic mic.Note that you usually don't want an exact impedance match, so building an amp with an input impedance of 600 ohm is probably a mistake. Check the datasheet for your mic, and see what load impedance is recommended.It may be possible to give you pointers to advice, or schematic snippets. But for high end / enthusiast level of performance, you should expect to have to experiment and tweak things. It is probably unlikely you will find an existing schematic, which works 'to taste'.

author: gerrysweeney
author_rank: Regular Contributor
timestamp: July 28, 2013, 10:01:41 am
content: The INA217 is a good choice, even for unbalanced microphones especially if you use a transformer on the front end. I built a couple of prototype pre-amps and the INA217 was astonishing quality, wide dynamic range, very low noise and rich dynamics.Personally though I would be configuring the mic for balanced wiring if at all possible.Gerry

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 28, 2013, 10:25:24 am
content: The OP needs a pre, which runs on a single +5V rail. So the INA217, OPA847 and many of their colleagues are out of the running.

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 28, 2013, 10:46:02 am
content: I only have the datasheet to judge this from, and it seems to claim the opamp hits the rails at about 1.8V from either. On a 5V supply this would leave about 1.4V of output swing, which I guess you could say is enough to drive standard audio line levels.Please see the third figure on page 7 ofthe datasheet.

author: fcb
author_rank: Super Contributor
timestamp: July 28, 2013, 11:18:25 am
content: Unbalanced dynamic mikes does not = quality.You also haven't specified what rails you have available or want to use, but I'm going to guess you want either USB or 9V battery, if it's USB you'll need to watch the grounding carefully, in-fact you might need to isolate the supply for best quality. If your building a one-off quick&dirty unit, use a couple of 9v's. If your building something for production.. then I would use a fixed frequency push-pull transformer 5v>+/-12v and LM317/337's. If you don't have a significant ground noise issue then a 7660 works well (I use them in audio designs all the time).As far as topology goes, I would AC couple a pair of low-noise opamps like the venerable NE5532 (these are readily available, low cost and probably in the studio chain of 90% of the music you listen to). There's also sorts of exotica available, but you won't benefit from it. Definitely spread the gain across a couple of stages, and watch your headroom (which will be the second biggest headache after ground-coupled noise). Screening will also help.

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 28, 2013, 11:36:53 am
content: Quote from: Pippy on July 28, 2013, 10:51:14 amThat would be one way of getting around this limitation. However I am hoping for a bit more info from the OP regarding the project details. For instance I could suggest a dual opamp, AD8606, which might do the job in a single package. But right now I am just threading water.fcb,The industry standard NE553x wouldn't work at all on a 5V rail. They may cut as much as 3V from each rail, and are specified as requiring a minimum of +/- 5V supplies (10V single rail).----Edit: I cannot see any reason why the MAX4466 shouldn't be able to do the job. Given the OP has already tested this, then I suspect something else is causing problems, not his choice of active device. The MAX4466 may not be too fond of loads below 10K, but that shouldn't be an immediate show stopper...?

author: fcb
author_rank: Super Contributor
timestamp: July 28, 2013, 12:07:54 pm
content: I wouldn't be thinking at this stage about the choice of opamp.If this was a subcontract design, I would firstly want to a basic spec:Mike level @ ?SPLWhat is the audio source (voice/ambient/surveillance/machine/etc...) - dynamic range required.Overload handling (compressor/limiter required or even desired)Output level.Frequency response (20Hz-20KHz assumed).Power supply availableAnd from this you'll calculate desired gain, etc...If your soundcard is designed for 0.3Vrms then you'll get a some headroom with a 5V rail (assuming r-r performance, and a 5V voltage rail - you'll get a maximum output of 1.75Vrms).

author: atwoz
author_rank: Regular Contributor
timestamp: July 28, 2013, 03:15:49 pm
content: Thanks for the help guys.I believe I will have to lower the input impedance seen by the 600 Ohm Mic. I also have to lower the value of the feedback resistors a little. I will remake a design and post the schematic here so you guys can see.Regarding the specs of the design, here you go:The mic: The application will need to accept 300Ohm and 600Ohm Dynamic Microphones. Like thePG48andPG58from Shure which are 300 Ohms. Also there will be some other 600Ohm unbalanced mics (don't have the models atm)Power Supply: I was planning on using either a 5v (regulated from 12v with filtering) or 3.3v (regultated from 5v with filtering). The first stage in the power supply comes from a switching wall adapter so it will be a little noisy.Sound source: The application is for voice only, like a karaoke. It doesn't have to be top quality, it just have to sound acceptable.The output: Will be connected directly to the computers 3.5mm mic in. I'm not sure exactly what voltage levels computer sound cards usually want. Does anyone know?Gain Control: I would like to control the gain of the preamp in software using a digital pot or an LDR with a light source.I will work in a new design today and post the Schematic ASAP.Thanks a lot for the help everyone. I really appreciate it.

author: atwoz
author_rank: Regular Contributor
timestamp: July 28, 2013, 07:52:52 pm
content: Here is the new design I intend to test. Let me know what you think.The Op. Amp. is rail to rail.

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 28, 2013, 08:28:56 pm
content: That looks close to spot on for your application.You need a 100uF decoupling cap on the 'center tap' of the pair of 27K resistors, which sets the midpoint input voltage. Even then, your 5V supply had better be clean, or you will couple rail noise directly into the amp input.Also, the input impedance is set by the resistor between this node, and the line from the mic. So currently your input impedance is about 15K.Schematic misses the 100 pF feed forward compensation capacitor on the second, optional stage, and the output overshoot resistor is shown as 47K, suspect you meant 47 ohm, like in the first stage.The pair of 100pF caps could perhaps benefit from being low distortion types, though this might be massive overkill: Polypropylene, polystyrene or NP0/C0G ceramics. You can make these larger, if you wish to cut down on high frequency noise/hiss. Currently your -6 dB cutoff frequency will be about 60 KHz if you use both stages.Edit: Depending on the actual opamp used, then you might need a 0.1uF decoupling cap right at the opamp power pin, in parallel with the 10 uF. This can prevent high frequency oscillations and other nasty problems.Edit, part II. Of course the input impedance is set by the 15K resistor I mentioned above, set in parallel with the 15K on the ground end of the in DC blocking cap. So currently it is about 7.5K.If needed then you can also tweak the various large value capacitors to increase the low frequency cutoff, which might come in handy for removing low frequency noise.

author: atwoz
author_rank: Regular Contributor
timestamp: July 28, 2013, 08:33:53 pm
content: Thanks so much for the help.I indeed forgot to draw the 100uF in the center tap, thanks for reminding me. And also the last resistor is 47Ohm and will also add a 100pF in the Feedback resistor of the second stage.Is 100pF a good value? I made that one up based on other designs I have seen.I will test this out later today once I go to my lab and let you know how it goes.Thanks again!

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 28, 2013, 08:51:53 pm
content: I just edited my last post again, 'under your feet'.The feedback cap serves at least one purpose, and frequently two.Depending on the opamp and the physical layout, then it can help prevent the opamp from breaking into parasitic oscillations. 10-100pF are frequently used values for this purpose. For very wideband designs, many MHz, it can be tricky to get things stable, as you cannot (easily) use this capacitor.This is due to its second function, lowering the gain of a stage as the frequency increases. At some frequency the reactance of the feedback cap is equal to that of the feedback resistor, thus cutting the gain of the amp in half / lowering it with -3dB.In your case this cutoff frequency is F = 1 / ( 2 * Pi * R * C ) ~ 60 KHz for R = 27K and C = 100pF. You could try increasing these caps to, say, 1nF, which would give a -6dB cutoff of 6KHz. That may be a bit low for speech/singing, yet should give an audible effect to experiment with.

author: fpliuzzi
author_rank: Regular Contributor
timestamp: July 28, 2013, 09:14:37 pm
content: I see by the info on the following link that PC sound card mic inputs can require a signal of as little as 10mV (100mV for some older PC audio sound cards). Not to divert you from your current preamp design path, but maybe the single transistor dynamic mic preamp shown at the bottom of that page could come in handy for a future project with modest requirements. It runs off of the +5V bias that is usually present on the ring (sometimes tip) of many PC sound card mic input jacks.www.hobby-hour.com/electronics/computer_microphone.phpRegards,Frank

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 28, 2013, 09:20:44 pm
content: Forgot to mention: There is a chance that the first stage may break into high frequency oscillations, when the gain is set to maximum. This could happen if you increase the size of the feedback cap too much, as you end up with only 220 ohm in series with the feedback cap coupled across the amp output. You might want to check for this with a scope.100pF should be fine though.

author: fcb
author_rank: Super Contributor
timestamp: July 29, 2013, 12:14:59 am
content: 100uF decoupling on the 27/27 potential divider is overkill - you'd get away with 100nF. I would try a couple of values out in the prototyping stage - 100uF's aren't the sort of thing you 'liberally sprinkle', they are expensive in SMD and a PITA in THT.Consider AC coupling your second stage, it will depend on the offset somewhat if it matters. I'd also put your basic x10 stage in at the front end, then go with a wider gain range. Do a bit of research on soundcards, I'd be surprised if anything is designed for 10mV line input unless it is a microphone input (which would then beg the question why are you building this in the first place).Power supply - the wal-wart's supply 0V isolation will be important - but I think you'll be OK. If you want to use a 12v wal-wart, i'd suggest using an LDO like the LP2951(adjustable version), and setting the the o/p to perhaps 11V, gives you more headroom, better selection of opamps, and will disapate less power. Going in at 12V and coming out at 5V is lazy and wasteful.EDIT: bad grammar and spelling correction..

author: Mike Warren
author_rank: Unknown
timestamp: July 29, 2013, 12:37:11 am
content: Am I missing something? Why not a series 1uF capacitor and a 1K resistor to ground at the mic end? This stuff really isn't that critical unless you intend using a high-end audio interface, in which case you will need higher voltage rails than a single +5V

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 29, 2013, 04:31:56 am
content: Quote from: fcb on July 29, 2013, 12:14:59 amA straight 50/50 voltage divider attenuates rail noise by 6 dB, compared to the low frequency ~80-100 dB PSRR of a good opamp. When you add a single 0.1 uF 'noise decoupling' cap to the standard 2x 100K voltage divider, you get a further 3 dB attenuation at around 30 Hz. Even at 120 Hz the added attenuation is only 12 dB or so. To get back to 80 dB 'rail suppression' takes about 500 KHz. So effectively the 'classical' 2x 100K + 0.1uF virtual ground is tantamount to coupling your power rail straight into your opamp/mic pre inputs.The 100uF cap is a crude hack recommended byAnalog Devicesas a quick fix for low noise applications, yet at least it provides an added attenuation of ~ 40 dB at 50/60 Hz. Not perfect, but you may survive if the rail is clean and the layout reasonable. Their recommended solution is to use a smaller value cap, and then filtering the virtual ground voltage in an extra, active lowpass 2. order filter stage with a very low cutoff frequency, also using fairly small capacitors. This will cost you an additional 4 passive components plus a single opamp. An alternative may sometimes be using a resistor plus a zener diode/voltage reference for the virtual ground, and then RC filtering the DC from the voltage reference. This won't have the same frequency roll-off as the active filter though.The good and gentle application engineers from Analog Devices have been trying to get people to stop using the 2x 100K + 0.1uF virtual ground 'solution' foryears. It kinda works if your rails are very clean and you don't use much in the way of voltage amplification. But low noise designs, like mic preamps, are completely ruined by this oversight.[Yes, I am aware the active filter solution has one or two potential problems.]

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 29, 2013, 04:35:34 am
content: Quote from: Mike Warren on July 29, 2013, 12:37:11 amNope. The 1K may be a bit low for a dynamic mic, but I already mentioned reducing the DC blocking cap values in a previous post. Haven't done any napkin math yet to check how small they could be, though.

author: atwoz
author_rank: Regular Contributor
timestamp: July 29, 2013, 05:26:28 am
content: So I built the circuit. It still does not work as expected even though is sounds clear (but too low), it needs more gain. I need to understand what the computer is expecting at the mics input. Tomorrow I will buy one of those cheap $2 dollar electret desktop mics and scope the signal to get a better understanding.By the way, I built the single transistor solution that was mentioned earlier and didn't sound good, too noisy.I will keep testing, thanks everyone for the help.

author: fcb
author_rank: Super Contributor
timestamp: July 29, 2013, 08:03:11 am
content: ElectroIrradiator. I would cut the nuts off an engineer who just chucks in 100uF electrolytics without good reason/experimentation, those things are (relatively) expensive to put on a board. And yes, keep increasing the size of the capacitor it will lower the noise contribution from the PSU from that part of the design - why not 1000uF? Personally, i'd rather put a gyrator in.I'm great believer in experimentation, try out a few combinations - use whatever meets your performance & cost specification.

author: atwoz
author_rank: Regular Contributor
timestamp: July 29, 2013, 01:54:52 pm
content: I was searching and found this IC:MAX9814. It is a mic amplifier with Automatic Gain Control (AGC). What do you guys think?

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 29, 2013, 04:22:05 pm
content: atwoz, PippyThe PC input may perhaps be an ordinary line in, which expects about 1Vrms, more if you want to saturate the ADC. Those line in connections are quite common on many motherboards and PCI(-e) audio cards.A dynamic mic will have a signal output level of about -60dBV or even less. If the PC input is 1Vrms line in, then you may need 60-70 dB of gain to reach an acceptable level. Your current amp has about 61 dB of gain, max, so it might actually make sense if you need some more.I had a very brief look at the MAX9814, and it appears to contain what we used to call a VOGAD: Voice Operated Gain Adjustment Device. If the AGC can be turned off, then the chip may be suitable, though I haven't read the whole datasheet yet.If the AGC cannot be disabled, then I would be dubious about whether it would work for singing. Usually you would want a manual, variable gain amp for mic volume control, but not an automatic one. That could end up sounding extremely unnatural, as the pre amp would - intentionally - remove much of the dynamic power in the voice of the singer.How bad this might be would depend on the actual delays involved, though.

author: atwoz
author_rank: Regular Contributor
timestamp: July 29, 2013, 06:59:06 pm
content: Pippy,I recorded some voice using a good quality USB mic and the preamp + dyanmic mic I built and compared the waveforms using some software. You were right, the gain is not the problem. It seems like the waveform is distorted. I will keep doing some tests. Thanks for the help, each time I get closer and closer. I will try to post the waveforms later.

author: atwoz
author_rank: Regular Contributor
timestamp: July 29, 2013, 07:24:13 pm
content: I have the theory that the preamp is filtering some of the high frequency components of the audio, making it sound hollow. The waveform lacks some peaks that voice waveforms usually have. It's mostly sinusoidal. How should I calculate the ac coupling caps? I used 100uF standard electrolytic but I didn't give much though into those. Should I use lower values?Thanks!

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 29, 2013, 07:45:42 pm
content: Which opamps are you using? The input stage may be running out of high frequency gain, if the gainbandwidth, GBW, is too low.You might also try injecting a weak signal at various points in the amp to check where the high frequencies disappear.AC coupling caps are way large enough, those aren't the problem. They would also cause low frequencies to disappear first, if they were too small.Finally, did you use the 100pF compensation caps you planned?

author: atwoz
author_rank: Regular Contributor
timestamp: July 29, 2013, 08:33:51 pm
content: Hello ElectroIrradiator!I'm using the MAX4477 with a clean 3.3v Supply. I did put the 100pF on both stages.I will test the microphone on another amplifier to see if it is working, just to rule out the mic being the problem.Ill keep you posted.

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 29, 2013, 09:51:18 pm
content: If the mic is OK, then try this: Look at the amp output, while the PC is connected. Then disconnect the PC and check output again on the scope, with no load attached. See if you can subjectively spot any difference in frequency content.The problem may be that these opamp cannot drive much of anything, particularly not at a high gain setting, and the PC probably has an input impedance around 10K. The 27K feedback resistors might also be too low for these chips. I may even have to backpedal on the 100pF feedback capacitors...

author: atwoz
author_rank: Regular Contributor
timestamp: July 29, 2013, 09:53:07 pm
content: Could I add a voltage follower inbetween the preamp and the pc?

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 29, 2013, 10:09:00 pm
content: Yes, assuming *that* opamp can drive the 10K at a gain of 1.However, I must say I find some of the information in the datasheet a bit confusing. Various figures seem to tell different things, so I wouldn't jump to conclusions just yet. Which is why I'd suggest you take things in a methodical order, as you intended.

author: atwoz
author_rank: Regular Contributor
timestamp: July 30, 2013, 01:58:53 am
content: I think I found the culprit. The microphone. I compared the output of a cheap $1 dollar electret microphone with the output of my preamp and they were different. As I said, my preamp doesn't have those high frequencies. I then checked the output directly from the microphone, and the noticed the same waveform. So, I was amplifying a bad waveform to begin with.The design seems to be correct, as you mentioned. I'm in the process of getting more microphones to test this, but I'm like 75% sure that the problem is the mic I'm currently using.I'll post the results once I have them.Thanks a lot!!

author: atwoz
author_rank: Regular Contributor
timestamp: July 30, 2013, 08:45:05 pm
content: I tested with another mic and the preamp works much better. I still need to tweak some parts but it's looking better! Thanks everyone for the help. I needed very little gain by the way, like 3V/V