Quick question about a microphone pre-amp

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

mindless1

Diamond Member
Aug 11, 2001
8,754
1,759
136
New layout, looks more compact but the film caps disappeared?

Is the application for field use or at the computer? If for field use you can ignore the rest of what I wrote. If at the computer, I would think about AC-DC power, using a ~ 12V rated, unregulated wall wart then an LM7812, 12V linear regulator for a power source instead of batteries. I only mention 12V wart because they are so common, anybody that doesn't throw away everything probably has a spare lying around since they're used on so many consumer electronics and that reduces project cost over buying one. 12V rated warts would work because being an unregulated wart, and at such low current consumption, it will float to a voltage more than the ~<2V drop that a LM7812 needs for 12V output. Naturally you could go with a better PSU than that, but it seems a good match with it taking a lot more time and expense for diminishing returns from a fancier PSU.

Batteries would be a little quieter, but also higher impedance and opamps have such good PSRR that a cheap simple LM7812 should suffice at low price and minimal part count (wouldn't even need anything but the regulator itself and ideally a ~ 0.1 to 10 uF decoupling cap before it if the output wire or trace length to the bulk electrolytics on the board aren't long. At this low current level it wouldn't need heatsunk either.

Then again, I haven't tried this with a mic, not sure if it will do as well but it seems a shame to have to use batteries if AC power is available.
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
Originally posted by: mindless1
New layout, looks more compact but the film caps disappeared?

Is the application for field use or at the computer? If for field use you can ignore the rest of what I wrote. If at the computer, I would think about AC-DC power, using a ~ 12V rated, unregulated wall wart then an LM7812, 12V linear regulator for a power source instead of batteries. I only mention 12V wart because they are so common, anybody that doesn't throw away everything probably has a spare lying around since they're used on so many consumer electronics and that reduces project cost over buying one. 12V rated warts would work because being an unregulated wart, and at such low current consumption, it will float to a voltage more than the ~<2V drop that a LM7812 needs for 12V output. Naturally you could go with a better PSU than that, but it seems a good match with it taking a lot more time and expense for diminishing returns from a fancier PSU.

Batteries would be a little quieter, but also higher impedance and opamps have such good PSRR that a cheap simple LM7812 should suffice at low price and minimal part count (wouldn't even need anything but the regulator itself and ideally a ~ 0.1 to 10 uF decoupling cap before it if the output wire or trace length to the bulk electrolytics on the board aren't long. At this low current level it wouldn't need heatsunk either.

Then again, I haven't tried this with a mic, not sure if it will do as well but it seems a shame to have to use batteries if AC power is available.
lol

I came into this thread to edit my post and add that the build I'm working on right now is going to be powered by AC.

AC -> 24V linear unregulated supply -> LM317L (set to 17.875V out) -> TLE2426 -> +/-

I could've used a 12V supply, I suppose, but the higher voltage might be a bit better for the mic and opamp. There's an input bypass cap... crap, I just realized I used a 1.0 uF instead of a 0.1 uF. I'm going to replace that tomorrow. Anyway, I got rid of the film cap and replaced it with an electrolytic because I wanted the circuit to fit in an Altoids tin with two 9V batteries. In my application, any potential difference in distortion won't matter and the electrolytic will have less phase distortion down low, if that even matters, because I can fit a significantly larger capacitance in the same space (2.2 uF vs 22.0 uF in that particular build).

Also, because I don't need to fit batteries in the case for the AC-powered supply, I'm going to hang a big electrolytic over the edge of the board. I'll start with a 470 uF (small, I know) and see if I need to go any bigger. I've got at least 16.0mm diameter caps to work with.

EDIT: The only problem is that I'm getting a ~25V drop from the regulator even though my R2/R1 is about 13.3... The Vo should be ~1.25(R2/R1+1). I'm hoping it's just a faulty unit. Will replace tomorrow.
 

mindless1

Diamond Member
Aug 11, 2001
8,754
1,759
136
470uF is plenty of capacitance, you could probably get by fine with far less than that. Main thing is to keep ESR low, whether it be type of capacitor chosen or larger physical size, plus low impedance lead + trace to the ICs. You could leave the 1uF if you wanted, it might do even better though they do cost more.
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
I've got more 0.1s than 1.0s. Oh well, whatever.

Does ESR really matter? We're only talking a few mA here.
 

mindless1

Diamond Member
Aug 11, 2001
8,754
1,759
136
It matters more than capacitance beyond a certain point. At the frequencies of the regulator and opamp the ripple is effected by rate of change based on ESR. The low current would mean less capacitance is needed, usually you can get away with putting a 10uF tantalum between the regulation and the opamp, plus the smaller ceramic or film decoupling caps as close to the pins as possible. We could say that having the smaller decoupling caps near the pins greatly reduces the importance of the other cap being lowest reasonable ESR, but if one or the other would be picked you'd be better off with a 100uF cap at lower ESR than a 2200uF cap with higher ESR. I mention this largely because of your prior intent to try the faster opamp, I couldn't tell from the pic which you are presently using.
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
I'm using the OPA227 right now.

EDIT: Maybe I'll parallel two 68uF caps to reduce the impedance, then.
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
Color me retarded, but I can't figure out how to get this LM317L working. I've got a 10k resistor from output to adjustment (middle pin to bottom pin, with the flat side of the 3-pin package facing right) and a 133k resistor from the adjustment to the negative of my DC supply. Then I have a 1k resistor from output to negative to provide a load for regulation (minimum load exists for regulation).

I'm reading like 24 or 28 volts or something from Vo to neg.
 

mindless1

Diamond Member
Aug 11, 2001
8,754
1,759
136
133K seems like a pretty large value, try giving the adjustment pin more current, try a different voltage divider combo with less resistance. If it's a real national semicon LM317 your 1K load is probably fine but if it's a cheap knockoff you might also try a bit more of a load just to rule that out.

You do have a capacitor on the output? That may be needed for your meter to read it right. Anything should suffice, no particular uF needed.
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
Oh, I don't have a capacitor on the output.

It's a TI LM317L straight from TI, so it's legit. I've tried two already, so probably this is normal operation.

Thanks :)

EDIT: How important are metal film resistors here in terms of excess noise? Getting random values from my electronics shop is really adding up to $$.
 

mindless1

Diamond Member
Aug 11, 2001
8,754
1,759
136
Noise where? Metal film resistors versus common carbon/carbon-film? In the signal path some say carbon makes the sound warmer, I would not use them in the opamp feedback loop but elsewhere it's arguable whether anyone can hear a difference. As for the voltage divider on the LM317, metal film resistors aren't important at all, it would make no difference.
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
Another question - I seem to be full of them, unfortunately - are there any disadvantages to lowering the values of the gain resistors? I get about 10dB less noise for every 10x reduction in resistance (same ratio).
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
Originally posted by: mindless1
Noise where? Metal film resistors versus common carbon/carbon-film? In the signal path some say carbon makes the sound warmer, I would not use them in the opamp feedback loop but elsewhere it's arguable whether anyone can hear a difference. As for the voltage divider on the LM317, metal film resistors aren't important at all, it would make no difference.
Ah, yeah, I was asking about the divider on the LM317.

I'm going to stay with MF for the other circuitry (not that I'm going to change any of that now).
 

mindless1

Diamond Member
Aug 11, 2001
8,754
1,759
136
Check the opamp datasheet to see what it's output current capability is, you'll want to stay under that minimum, not typical, datasheet value based upon the (peak output voltage)/(resistance to ground through feedback loop). The higher output current may also put the opamp further into class B operation unless you class A bias it.

<yawn>... sleepy... G'night.
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
Will R1 = 100 ohms suffice for the LM317L?

EDIT: Ah... I have no idea how to calculate output current for a non-inverting amplifier. Closest I could find is the one for a voltage to current converter.
 

mindless1

Diamond Member
Aug 11, 2001
8,754
1,759
136
Wait, that's math. No coffee around... Eek. Sum the R1 and R2 to determine the current flow @ target output voltage (relative to it's ground, not amp ground since amp ground would be a mid-point value due to the rail splitter), multiply by voltage drop per resistor to determine if your resistors are high enough wattage to handle it. Beyond that, 100 Ohm would result in plenty of current for feedback purposes.

For opamp output current you'd want to find the peak, have to consider the next stage if it were driving a speaker but pretty negligible to line-in, so take peak output voltage (which depends on source voltage and gain you choose, or measure it) * sum of resistance to ground through feedback loop. You may not even need to change that LM317 feeback resistor values, if you hadn't yet measured with a capacitor on the output from that stage it may be all that was needed.
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
Did add a 1 uF ceramic, but the reading became 30V bang on for the 17.875V ratio of resistors. :confused:
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
R1 = 100 ohm, R2 = 1300 ohm, Vo = ~17.5

I = 17.5/(100+1300) = 12.5mA
P1 = I^2 * R1 = 15.6mW
P2 = I^2 * R2 = 0.203 (< 0.25)

Is the working voltage of a resistor the voltage that is applied to the resistor or the voltage drop across the resistor?
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
New build with unregulated linear supply

IMG_0727.JPG
IMG_0728.JPG
IMG_0729.JPG
IMG_0732.JPG
IMG_0733.JPG
IMG_0734.JPG

I realized that I'm not going to be doing any recording with this circuit (too much noise), so I figure the electro input cap and the fairly small ordinary electro bulk cap are sufficient for my purposes, which will be general voice capture and speaker testing.

In the future I will be adding an LED to indicate power and an SPDT switch for adjustable gain between that high enough for voice and that low enough for near-field testing.
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
Originally posted by: mindless1
For opamp output current you'd want to find the peak, have to consider the next stage if it were driving a speaker but pretty negligible to line-in, so take peak output voltage (which depends on source voltage and gain you choose, or measure it) * sum of resistance to ground through feedback loop.
I'm going to assume a peak Vo of 2V... but with the resistances I want to use, my sum is 1022 (22+1000). Multiplying doesn't give me anything that makes sense. Did you mean divide the peak Vo by the sum of the resistances? If that's the case, I get a peak output of about 2 mA...?
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
Hmm... How does capacitance affect the regulated DC voltage? For an output straight out of a bridge rectifier I can use the formula C = I/frp*Vrp, but that doesn't take into account any existing smoothing of the voltage.
 

mindless1

Diamond Member
Aug 11, 2001
8,754
1,759
136
I don't think there is an easy answer to that besides the obvious one we already knew, smoothing. Some noise gets through the regulator and it is good but not perfect so experimentally somebody (chip designers typically) once tried a bunch of different capacitances and capacitor types, added a bit of theory and came up with generic recommendations. Beyond that it depends on the current the load uses vs circuit impedance, and the frequency of the noise the load produces on the power rails as well as other RF pickup along the power rails. Since an active IC dynamically adjusts to the result you want, the characteristics of the noise can change some.

Till you actually have a finished circuit and can measure changes on a scope it is difficult to reach a minimalist and yet acceptible capacitance model, so beyond that people tend to use more than enough since it won't hurt anything unless they're paralleled and cause resonant frequencies or inrush current becomes too high for the parts before them.

To put it another way, you can start out with the circuit and measure noise with a scope to determine frequency and magnitude of ripple, or use a circuit simulator and select capacitance, capacitor type to address these measured values.

In your project's context, since it isn't using much current at all, my emphasis was on ignoring capacitance since any electrolytic is enough, that gains, "IF" any are audible, would come from short leaded, lowest ESR capacitors. When an opamp isn't driving a low-z load, a generic and good option on a fully developed 2 layered PCB is to just use a 1 to 10uF ceraminc capcitor then a 0.1 to 0.01uF as close to the chip pins as possible. This is assuming a prior regulation stage, and capacitance in between these two if traces or wires are a significant impedance, which they aren't typically on a small layout like yours, even though it's stripboard since it's only an opamp being powered and the load is minimal.