Can an opamp buffer also be an amplifier or attenuator?

Started by Sage, July 02, 2014, 04:27:34 PM

Previous topic - Next topic

Sage

I'm adding an effects loop to a guitar amp that doesn't have one.  I've managed to find a +18V power source, so I thought I'd just splice a couple of buffers between the preamp and power amp, along with a dpdt toggle as a true bypass switch.  I'm looking at this dual IC buffer schematic, and I have a few questions.  It seems that other off-the-shelf effects loops I've seen attenuate the Send signal by 10db.  Then they amplify the Return signal by 16db.  I'd like to replicate this.  How would I need to alter this circuit to achieve this?

1. Can I just put a resistor (or trimpot) between pins 1 and 2 of the opamp in order to get the return boost?
2. Where does the attenuator go?

MrStab

for amplification:
you'll have to put a resistor instead of a jumper between the inverting input and output, and either a resistor & cap to ground from the inverting input, or just a resistor to vbias from the inverting input. i think the first one works out better - can't remember why, though.

here's a basic example (note that the + and - inputs are the opposite way around in this schematic):



for attenuation:
using either a trimpot, regular pot, or fixed resistors to simulate a pot, you'll wanna put the buffer/amp output to lug 3, attenuated output to lug 2, and lug 1 to ground. as shown (viewed from below):



(apologies if you know all this)

i would put the attenuation after the buffer/amp, personally.
Recovered guitar player.
Electronics manufacturer.

Sage

Thanks!  This is pretty close to what I figured.  I have several questions:

1. What's the function of the resistor and cap from the inverting input to ground?  Why is it necessary?
2. I'll be using a TL072.  What resistance values should I use for 16db of boost?  Is there a calculator I can use?
3. I see a potentiometer in the output of the boost circuit you posted.  I assume this is because R2 is a fixed resistor providing a certain amount of boost, and the potentiometer is attenuating the output in order to allow the user to control the amount of boost that gets through.  But why is the potentiometer 10k when R2 is 220k?
4. What value trimpot should I use for a maximum 10db cut?
5. What effect will this have on impedance?  I know boosters aren't quite the same thing as buffers.

ashcat_lt

#3
I still don't think you need all of this, but...  You just want to attenuate the one side that's going to the pedals, right?  And then gain just that one side back up?  Then the attenuation has to come after the "splitting buffer" for that side.  This will affect the source impedance seen by whatever follows it, being equal approximately to the parallel values of the two resistors in the voltage divider.  Best practice would probably to put another buffer after in order to get a good low-Z source that can handle whatever might happen in the loop.  If it's going to be pedals with ~1M input-Z, you probably don't need that, but then, like I said...

Quote from: Sage on July 02, 2014, 05:56:55 PM
Thanks!  This is pretty close to what I figured.  I have several questions:

1. What's the function of the resistor and cap from the inverting input to ground?  Why is it necessary?
In order to get gain out of the opamp, you need to drop voltage in the feedback loop.  The R that you're talking about is the bottom half of the voltage divider that accomplishes this.  The C is basically there so that it this divider doesn't affect the DC operating point of the opamp, which is actually ~4.5V above ground.  This does act as a shelving HPF, so the values have to be chosen carefully so that you're actually applying gain to all of the relevant frequencies.  You can leave out the cap and connect that end of the resistor to the 4.5V Vref and it will affect all frequencies without that filter action, but depending on tolerances and other things there might be a bit of DC drift.

Quote2. I'll be using a TL072.  What resistance values should I use for 16db of boost?  Is there a calculator I can use?
No matter what opamp you use, the gain through will be equal to 1+(R2/R1) - which is to say that the gain is equal to the inverse of the voltage drop caused by that voltage divider in the feedback loop.  The more you attenuate the feedback the more gain you get out.  That formula will get you a gain factor (a multipllier, or really a ratio) which you will then have to convert to db using your favorite calculator.  +16db is a little bit less than 3x gain.  The actual R values don't matter, except in terms of current draw, noise characteristics, and in helping set the cutoff frequency of the filter caused if you use that cap.

Quote3. I see a potentiometer in the output of the boost circuit you posted.  I assume this is because R2 is a fixed resistor providing a certain amount of boost, and the potentiometer is attenuating the output in order to allow the user to control the amount of boost that gets through.  But why is the potentiometer 10k when R2 is 220k?
We already talked about R2.  It doesn't really directly interact with the pot. It makes the opamp gain up the signal by some amount, and then the pot acts as a voltage divider to drop that back down.  It is 10K mostly so that the out-Z doesn't get too-too big in the middle of its rotation (see the comment above).  

Quote4. What value trimpot should I use for a maximum 10db cut?
The actual value doesn't matter except for the impedance that it shows to the rest of the circuit.  It's the ratio that matters.  Look up voltage divider, even in wiki, for the formula.  It's the inverse of the one for opamp gain listed above.

Quote5. What effect will this have on impedance?
I think I hit this one above.

QuoteI know boosters aren't quite the same thing as buffers.
Kinda depends on how you look at it.  In essence, a buffer is there to present a specific (or big enough) load to whatever preceeds it and another (usually low enough) impedance to whatever follows it.  Many folks, I think, expect that a buffer will do this with unity gain across a bandwidth wide enough for the intended signal to pass, there's no reason it can't also add gain.  An opamp amplifier almost always fulfills all three functions.


Edit - since nobody's responded yet...

This almost gets back to the reasons I don't think you need to go this far, but let me list them a bit more explicitly:

1)  The send from your amp is already buffered, will present plenty-low-Z to anything you might plug it into, and in fact will almost certainly split to any reasonable number of reasonable loads without breaking a sweat.  Any input meant to take a guitar (pedal, rackmount guitar effect...) will be a near-ideal load with an impedance so high that you need not even consider it till you start paralleling unreasonable numbers of them.  The other side of the split is going to your inverting summing amplifier, right?  So you can set its impedance yourself.  I'm not looking at right now, but I thought you had settled on some reasonable sized resistors there.

B)  In the end, these are both going back to that summing amplifier, and you can get any makeup gain you need there, if you're willing to take just a little bit of a noise hit by attenuating the whole send with a (maybe 10K??) pot as a voltage divider (like the one above) before the split.  If you really want to be safe, put a single non-inverting amplifier after pot, and split the output therefrom.


"Everything useful is a voltage divider".  Look at that structure, learn how it works, and start trying to see it at every junction in a schematic.  

An "attenuator" is (ideally) a frequency independent voltage divider.  It's the two resistors or the pot that you see everywhere.

A "filter" is a frequency dependent voltage divider.  It will have a cap and/or inductor in series with one of the two resistors.  This reactive component acts exactly like a resistor whose value depends on frequency (we're not going to talk about phase just now...).

An "amplifier" is actually kind of like two voltage dividers (though there may be several in and around, controlling how it does its thing).  There is one divider at the input, composed of the source impedance (the "top resistor", and this is usually reactive to some extent - mostly inductive for guitar pickups, but there's also almost always an input cap there too) and its "input impedance" (the "bottom resistor", usually about the same as the "biasing resistor" in FETs and opamps).  The second voltage divider here actually divides the power supply rail in proportion to the voltage at the input to provide its output.  

A non-inverting opamp amplifier always tries to make the voltage at its inverting input equal to that at its non-inverting input, so that their difference equals 0.  It does this by changing the voltage on its output.  

If you connect the output to the - input with straight wire, you'll see that the voltage at the - input must always be exactly the same as the output, so the output just has to follow the input 1:1 to keep the inputs the same.  That's a unity gain buffer amplifier.  

If you put a voltage divider in the middle of that feedback loop, such that the output is attenuated before it gets back to the - input, the output now has to raise its voltage enough that what gets through the attenuator is the same as the + input.  If for example you're dividing it down by half, then you need 2 x gain, since (1/2) * 2 = 1.  Right?

If you just put a single resistor between the output and input, you have actually created a voltage divider.  The thing is, though, that the "bottom resistor" of the divider is the impedance of the - input, which in this case can be considered to be too big to calculate.  It's the ratio that matters, and unless that resistor is really stupid huge you'll have a unity gain buffer amplifier.  I read once somewhere the tradeoffs between a feedback resistor and straight wire, but I don't remember what or where.

The inverting summing mixer in that other thread is current driven, though.  I can see how it works, but I'm definitely not the guy to explain it to you!



Edit again, to add one more point on the non-inverting amp -

If you don't connect the output to the - input, the "top resistor" is infinite, so the voltage at the - input is always 0 because (as everybody knows) infinity/x = 0 ;).  And, of course, everybody also knows that 0 * infinity = 1 ;), so the opamp will give all the gain it possibly can, and still fail, and end up just putting out all of the voltage (within its limits) all of the time.  It'll usually swing to one of the supply rails and stay there.

ashcat_lt

#4
duplicate post, tried to edit and quoted instead...

Sage

Wow, thanks so much, ashcat_lt... that's exactly what I needed.  I'll see if I can respond to a few things...

Quote from: ashcat_lt on July 02, 2014, 07:05:00 PM
I still don't think you need all of this, but...  You just want to attenuate the one side that's going to the pedals, right?  And then gain just that one side back up?

Not exactly.  The circuit I'm discussing in this thread is separate from the splitter/mixer/booster that I was talking about in the other thread.  My guitar amp didn't actually come with an FX loop.  I managed to hack a couple of jacks in between the preamp and power amp, and it's serviceable, but I want to make it better.  I figure a buffered, padded send and an amplified return would be worth a shot.  The amp has built-in digital reverb that appears to be powered by +18V, so I thought I could piggyback off that for power.  The splitter/mixer/booster is a pedal that will sit inside this loop.

Quote from: ashcat_lt on July 02, 2014, 07:05:00 PM
1)  The send from your amp is already buffered, will present plenty-low-Z to anything you might plug it into, and in fact will almost certainly split to any reasonable number of reasonable loads without breaking a sweat.  Any input meant to take a guitar (pedal, rackmount guitar effect...) will be a near-ideal load with an impedance so high that you need not even consider it till you start paralleling unreasonable numbers of them.  The other side of the split is going to your inverting summing amplifier, right?  So you can set its impedance yourself.  I'm not looking at right now, but I thought you had settled on some reasonable sized resistors there.

This is exactly what I was thinking.  By buffering the effects loop, I won't need to buffer the splitter.  And by amplifying the return signal, I can just use a potentiometer on the pedal as a cutback, as PRR suggested in another thread, as opposed to building a booster into the pedal.

Quote from: ashcat_lt on July 02, 2014, 07:05:00 PM
In order to get gain out of the opamp, you need to drop voltage in the feedback loop.  The R that you're talking about is the bottom half of the voltage divider that accomplishes this.  The C is basically there so that it this divider doesn't affect the DC operating point of the opamp, which is actually ~4.5V above ground.  This does act as a shelving HPF, so the values have to be chosen carefully so that you're actually applying gain to all of the relevant frequencies.

My goal is to get as flat a boost as possible; how exactly do the values of the components affect which frequencies get filtered?

Quote from: ashcat_lt on July 02, 2014, 07:05:00 PM
"Everything useful is a voltage divider".  Look at that structure, learn how it works, and start trying to see it at every junction in a schematic.  

Thanks, I'll do that!

GibsonGM

Just putting this out there as a reference - this document has helped me quite a bit over the years, and it's worth downloading and referring back to!   :icon_mrgreen:

http://www.eng.yale.edu/ee-labs/morse/compo/sloa058.pdf
  • SUPPORTER
MXR Dist +, TS9/808, Easyvibe, Big Muff Pi, Blues Breaker, Guv'nor.  MOSFace, MOS Boost,  BJT boosts - LPB-2, buffers, Phuncgnosis, FF, Orange Sunshine & others, Bazz Fuss, Tonemender, Little Gem, Orange Squeezer, Ruby Tuby, filters, octaves, trems...

Sage

Quote from: GibsonGM on July 03, 2014, 07:52:35 AM
Just putting this out there as a reference - this document has helped me quite a bit over the years, and it's worth downloading and referring back to!   :icon_mrgreen:

http://www.eng.yale.edu/ee-labs/morse/compo/sloa058.pdf

Awesome reference, thank you!

ashcat_lt

Quote from: Sage on July 03, 2014, 01:36:54 AMMy goal is to get as flat a boost as possible; how exactly do the values of the components affect which frequencies get filtered?
It's really as easy as 1/(2 * pi * R * C).

Course then you want to know which R we're talking about.  :) 

In this case, I think the important cutoff will be the one where R is the resistor going toward ground.  R in ohms and C in farads.

Sage

Here's what I came up with using Jack Orman's Multi-Purpose OpAmp PCB as a platform.  My intent is for the input to go into a buffer, and then into an attenuator (R13), and then into the send.  The return is then fed into an amplifier that boosts the signal 16db and then goes to the output.

Here is the layout of the PCB:


And here is my take on it:


My primary concern is that the values are screwy.  The resistor and capacitor values I've chosen here are a mishmash of a couple of Orman's examples, one with two independent buffers and another with a clean booster, and I'm trying to basically combine those two concepts here.  Does this look like it'll work?

I'm also a little worried about some components I've deleted -- particularly R2 and C4.

If anybody has any feedback, I'd appreciate it.

Sage

I *think* changing C10 to 1uF will lower the frequency cutoff for the input, correct?  Is there any drawback to this?

I wonder if I can use a double-ganged potentiometer for R13, and have the second set of lugs control the gain of the return signal in place of R3/R1?  The idea would be to set the gain to match the amount of attenuation on the send.