Input/Output Op-Amp Buffers: Inverted or Non-Inverted

Started by bartimaeus, November 30, 2016, 01:43:08 AM

Previous topic - Next topic

bartimaeus

I would really appreciate any advice with this! I'm trying to figure out an optimal input/output buffering setup using a single dual op-amp.

I'm currently using it to interface a digital circuit that likes a very high-gain input (I've optimized my component values for this), but I'm hoping to use it for other things in the future as well. I also want to be able to mix the dry and digital signals.

I've added some additional resistors and caps on the inputs and outputs to prevent true-bypass "pops".

These are my two ideas:


Keppy

These are both problematic.

Your inverting example mixes an inverted effected signal with the uninverted input signal, which I suspect is not what you want.

The non-inverting example is better, but the mixer is trouble again. Using resistors to sum to a high-impedance input will cause signal loss from both sources. On top of that, your bias resistor R5 is small enough that your dry signal will be attenuated by over 90% (it makes a voltage divider with R3). Summing mixers, generally speaking, are much easier to do with an inverting stage.

The easiest thing to do would be to use the non-inverting input stage with the inverting output stage. This would get you good performance, though the overall output would be inverted. Eliminate R7 (bottom schem). For unity gain in the mixer, make R5, R6 & R8 the same value. Since R5 sets the input impedance, try 1M for all three if you're using this on an unbuffered guitar. Add a coupling cap between POT1 and R6. Note that POT 1 can be much smaller, but its relationship to R6 will affect it's perceived taper.
"Electrons go where I tell them to go." - wavley

antonis

Quote from: Keppy on November 30, 2016, 03:24:45 AM
your bias resistor R5 is small enough that your dry signal will be attenuated by over 90% (it makes a voltage divider with R3).
Same for wet signal, too..  :icon_wink:
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

merlinb


anotherjim

Indeed as Merlin shows.

If I must have an inverting output mixer stage, I'm leaning towards a FET or MOSFET phase splitter input stage. That gives near unity  high impedance input and avoids the resistor noise that a high impedance inverting op-amp stage invites.
That's this type of thing...

You get inverting and non-inverting feeds.
Gain is about 0.8, that isn't a particularly obvious loss, but easily made up at the output mixer.

bartimaeus

Thank you all for the advice, I really appreciate it!

Splitting off the dry signal prior to the buffer was a stupid mistake, haha, especially in the inverted example.

I wanted the output buffer to attenuate the signal because I wanted the input buffer to boost it quite a lot. I think my values are correct for a ~10x boost (100k/10k+1=11 for non-inverted input; 100K/10K=10 for inverted input), unless I'm misunderstanding the formula?

On that guitar fx loop schem, I am correct in identifying that those components right next to the loop jack are used to prevent "pops"?

I'll definitely keep FET or MOSFET input buffers in mind when I need unity gain, but in this case I need a lot of boost. For unity gain, it seems like it might be best to have a transistor input buffer and a dual op-amp on the output to mix and then re-invert?

Here's a corrected version, where the bottom (doubly inverted) one is preferable because of how it handles the mixing stage, as I now understand?


merlinb

Quote from: bartimaeus on November 30, 2016, 11:54:59 AM
On that guitar fx loop schem, I am correct in identifying that those components right next to the loop jack are used to prevent "pops"?
The resistors to ground do, yes, by providing a charging path for the coupling capacitors. The little 47R resistors are to isolate the opamps from cable capacitance, which can otherwise cause them to oscillate.


Quote
Here's a corrected version, where the bottom (doubly inverted) one is preferable because of how it handles the mixing stage, as I now understand?
You need coupling capacitors for the Circuit-In and Circuit-Out jacks. Your top diagram also has no bias on the first opamp +ve input.

In the lower diagram R7 is wrong- get rid of it and make R5/6 equal to 100k and R8 equal to 10k. You also don't need R3 and R17 (replace with solid connection).

bartimaeus

Thank you again, Merlin! This is very helpful. I realize that buffers come up a lot, but I was having trouble figuring it all out just by reading previous stuff.

The Circuit-In and Circuit-Out on my board aren't jacks, this will all be on a single board. I just didn't bother showing the digital circuitry. I apologize that I didn't make that clearer.

But I assume that it is still good to use a coupling cap to provide a cleaner signal (remove the DC bias) to the following circuitry? That said, the 100uF cap in that diagram seems huge! Could I get away with 10uF or 22uF?

Also, does anyone know why I should have a coupling cap between pot and the resistor on the mixing side? I've built simple mixers without one before and they worked fine.

Re: the inverted diagram, I had read that R3 and R17 would cause "minimum error due to input bias current"... so probably that is not a serious issue in pedal applications?

Double inverted, with hopefully final corrections:

samhay

Nearly there. You need to either add another cap to the left of R4 or move C3 to between the junction of R4,R5 and pin 6 of the op-amp.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

ElectricDruid

Does POT1 have to be as large as 1M?

It's just that with the 100K input resistors (which I agree with, btw - this is looking much better than earlier) the resistors will load the pot significantly and you won't get the response you expect from the pot. Essentially, the impedance is seen as a parallel resistor from the wiper to ground. If that's not to screw up the response, it needs to be significantly *larger* than the pot's value. As a rule of thumb, I was told that the input impedance needs to be ten times larger than the pot - so with your 100K input resistors, you'd use a 10K pot, not 1M.

To answer some of your other questions:

You can *probably* get away with less than 10uF, but it depends on the impedance of the following circuit. The cap makes a high-pass filter with that input impedance, and if the input impedance is low, you'll lose bass frequencies. Hence the over-specced cap "just to make sure". In many situations, 100n is fine. Other times you might need 470n. I try to avoid electrolytics in the audio path in general and I rarely *need* to use them, since I rarely need values above 1uF.

The extra coupling cap between the pot and the resistor is more DC blocking. Whether you need it o not depends on whether you've got a straight AC output  or whether the audio is "embedded" on top of a DC bias level. For example, if CircuitOut provides some audio which also swings around your 4.5V Vref, then the op-amp mixer will invert that 4.5V bias and it will cancel the 4.5V bias you've carefully put in on the +ve input. That leaves your output trying to reproduce audio whilst being stuck at 0V (if it can even go that low). That's a recipe for distortion. The cap is to eliminate that issue. In the case of a known input (like your board) you can often do without, although you might need to defence the lower end of the pot to 4.5V rather than ground. It all depends on how you handle the DC going through the circuit.

The bias current problem is, like you say, mostly not a serious issue in pedals. For a start, it's only a small offset, and secondly, we're only interested in the AC component, not the DC, so we mostly block much larger DC offsets (like our 4.5V bias) than that anyway. So attach the pins direct to Vref and don't worry about it.

Good luck. It's already come a long way.

HTH,
Tom

HTH,
Tom

bartimaeus

Thank you so much, Tom! That was extremely helpful, you really went above and beyond. I'd just been using the 1M pot value from a mixer that I built years ago... now I know why the response of the pots on my mixer was always a little weird.

Quote from: ElectricDruid on December 01, 2016, 03:25:15 PM
You can *probably* get away with less than 10uF, but it depends on the impedance of the following circuit. The cap makes a high-pass filter with that input impedance, and if the input impedance is low, you'll lose bass frequencies. Hence the over-specced cap "just to make sure". In many situations, 100n is fine. Other times you might need 470n. I try to avoid electrolytics in the audio path in general and I rarely *need* to use them, since I rarely need values above 1uF.

It seems like in order to have a 0.1uF coupling cap I should ensure that the input impedance is above 150k (10Hz cuttoff, an octave below hearing). I know the impedance of a guitar pickup is around 10k-50k, but I've read that op-amp buffers generally have an input impedance above 1MΩ, so it seems like I'm safe. One could get away with 0.01uF if the impedance is above 1.5MΩ?

Quote from: samhay on December 01, 2016, 02:54:55 PM
Nearly there. You need to either add another cap to the left of R4 or move C3 to between the junction of R4,R5 and pin 6 of the op-amp.

Thanks for the reply, samhay! What is the purpose of putting of a capacitor there? I don't seem to need one after the 100k resistor on the first buffer.

samhay

^Your "circuit-in" is probably not biased to +4.5V (likely at ground). It will work as drawn, but as the op-amp side of R4 wants to sit at +4.5V, you will have to drop this voltage difference across the resistor, which is not ideal.
Another option would be to connect R4 to the left hand (positive) side of C2. You don't need any additional caps that way.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

bartimaeus

I would ideally like to use less caps.

Does this diagram reflect your suggestion?

Also, I'm going to try to try out .22uF or .47uF film for the coupling caps, since those aren't too expensive on tayda. I'll probably socket those spots to try some values with my current circuit.


ElectricDruid

Aside from that funny wire shorting out R4, that seems fine to me. What happened there?! ;)

Tom

samhay

>Does this diagram reflect your suggestion?

No. Like this -
Note I turned C3 around too.

I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

ElectricDruid

Note that Samhay has included both the DC-blocking caps C2 and C3. This is good practice, and essential if the circuit between Circuit-In and Circuit-Out is an unknown. I'd understood from your earlier comments that it wasn't, in which case you could arrange it such that the DC blocking is not required. But if you want "simple" and "safe", put them in. It's only a couple of caps, after all.

Tom

bartimaeus

#16
Thank you both so much for the help! Here's a (hopefully) final diagram to summarize everything.

The project specific version dispenses with the C3 DC-blocking cap, as that isn't needed for my circuit. It uses 0.22uF for the first coupling cap because the circuit's impedance is known to be about 100K, while the second coupling cap is a high value to prevent tone loss. The input resistor could be a higher value and the input capacitor could be a lower value, but I went for those 1M and 0.1uF since I'm using that value elsewhere in my project.


*Corrected

merlinb

#17
Quote from: bartimaeus on December 06, 2016, 11:27:12 PM
The project specific version dispenses with the C3 DC-blocking cap, as that isn't needed for my circuit.
Yes it is needed!! Otherwise U1B will be amplifying DC (you also have the +ve and -ve inputs swapped).

bartimaeus

I understand that I need to remove the DC, but I have that filtering closer to the source in my own circuit: specifically an RC highpass with a 0.1uF cap and 150k resistor.

And another careless mistake, doh! I edited my last post with a corrected diagram.

merlinb

Quote from: bartimaeus on December 07, 2016, 10:43:30 AM
I understand that I need to remove the DC,
I'm not sure you do understand... think about what will happen when you turn POT1 up and down without a cap there...