How to switch the gain of a simple opamp circuit to unity gain

Started by hannes, September 15, 2006, 08:41:15 AM

Previous topic - Next topic

hannes

I've been working on a distortion - booster circuit where the distortion has three gain stages (pregain, main distortion, tone control recovery).
The distortion and booster can be bypassed independently (using two 3pdt switches).
I would however also like to bypass the first gain stage of the distortion (basic opamp circuit) when the boost is switched off.
In fact, it would be enough that the adjustable pregain is set to unity gain whenever the boost is switched off.
The best idea I could think of was to wire the boost switch as shown at http://www.generalguitargadgets.com/diagrams/switch_lo_3pdt_tb_dcjack.gif and then connect the free pin of the 3PDT switch to some point in the opamp circuit of the pregain stage. This point would then be grounded as soon as the boost is switched off.
However I can't think of a way to bypass a basic opamp circuit (or set the gain to unity gain) simply by connecting some point to ground without also killing the signal.
Maybe I am just missing something here, or maybe there are better alternatives (I guess the easiest way to disable an opamp gain stage, would be to short the resistor in the feedback loop, maybe using a JFET switch or something, but I can't really think of a nice way to achieve this).

Any help or advice would be greatly appreciated.

billings

If you've got your opamp wired as a noninverting amplifier - the input going into the positive input and feedback going to the negative - just short the output to the negative input to turn it into a unity gain buffer.

hannes

Quote from: billings on September 15, 2006, 08:47:26 AM
If you've got your opamp wired as a noninverting amplifier - the input going into the positive input and feedback going to the negative - just short the output to the negative input to turn it into a unity gain buffer.

Thank you for your quick reply.
I think what you suggest is what I meant with "shorting the resistor in the feedback loop".
However, the main problem is how to accomplish this with the same switch that is already being used to switch the boost on and off.
If I could achieve the same effect by connecting some point to ground, rather than connecting two points in the circuit, then I could simply use the free pin of the switch.

R.G.

There are a couple of ways.

If you are using a noninverting pre-gain stage, that's easiest. The gain of a noninverting opamp stage is 1+Rf/Ri, so the options to make it have a gain of one are all with the Rf/Ri ratio. The obvious one has already been mentioned; make Rf be 0. But you can also make Ri infinite, or practically so.

You can use  your grounding signal to open another switch in series with Ri to ground or to Vr. If your Ri switch goes to Vr, use an N-channel JFET in series with it and pull the gate to ground. Suitable devices are 2N5485, J201, 2N5292, 2SK30A and 2SK118.

You can also use your grounding signal to turn an NPN bipolar off. This is best done if you have a capacitor to ground in series with Ri. In that case, put the NPN in series with the cap and tie its base to +9 through a resistor that supplies base current, something between 10K and 47K. Shunt its base to ground with the switch.

You could also just insert a CMOS switch in there to do either shunt or series switching with your signal to ground.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

petemoore

  EDIT
  After reading the posts already entered by RG and Billings...I'm not certain these approaches are aimed at the same goal... ???
 
  Good question, or...a result I've thought'd be cool also...If words are serving to communicate here...
 Here's why I think it'd be cool
 I like boost way up over unity...for driving a DIST, this setting is so high with the distortion OFF it's rediculous, I need the DIST off setting to also immediately turn that booster down...[the booster sounds real good set lower, and great when set high to drive fuzz, it could use attenuation when boost only, much more boost when driving the fuzz].
 Here's what I'd try...
 If you're using 3pdt for bypass and indicator on the DIST, one row is used for input, one row for output, 2/3rds of the last row for LED indicator switching, that last lug as show on this page, as Sw1's top left lug http://www.generalguitargadgets.com/diagrams/switch_lo_3pdt_tb_dcjack.gif
 is a switched ground, not used !!!
 use that switched ground on the dist's bypass switch to bring the boosters level to a more 'normal' level [closer to unity] when the dist is off [I'd think for a much less shocking transistion].
 Using a fixed resistor from this sw'd ground to the booster signal path [pick your placement, I'd just tack it on the end].
 This often [poll: almost always?] unused switched Gnd. point can be put to excellent uses for...say like a little cap to input..or..etc.
 ...but, what value fixed resistor...
 yes...build the prototype with a pot wired as V/R to ground or, as a Volume Control wiring to ground [ez mods @ switch 'n pot lugs], I'd start with a >250k audio [or linear...lol], or see how much a 100k pot loads the signal down...which in many cases would be parallel to the Booster's 100k volume control pot: 2 x 100k paralleled = 50k.
 Your DMM can tell you what physically paralleled [wired] 87k and 236k parallel measures, probably around less than 84k...of course you can change the numbers
  It wouldn't be entering a cap into the switching arrangement, so I 'guess popping shouldn't be an issue...
 
Convention creates following, following creates convention.

hannes

Quote from: R.G. on September 15, 2006, 09:15:37 AM
There are a couple of ways.

If you are using a noninverting pre-gain stage, that's easiest. The gain of a noninverting opamp stage is 1+Rf/Ri, so the options to make it have a gain of one are all with the Rf/Ri ratio. The obvious one has already been mentioned; make Rf be 0. But you can also make Ri infinite, or practically so.

You can use  your grounding signal to open another switch in series with Ri to ground or to Vr. If your Ri switch goes to Vr, use an N-channel JFET in series with it and pull the gate to ground. Suitable devices are 2N5485, J201, 2N5292, 2SK30A and 2SK118.

You can also use your grounding signal to turn an NPN bipolar off. This is best done if you have a capacitor to ground in series with Ri. In that case, put the NPN in series with the cap and tie its base to +9 through a resistor that supplies base current, something between 10K and 47K. Shunt its base to ground with the switch.

You could also just insert a CMOS switch in there to do either shunt or series switching with your signal to ground.

I thought about using a JFET switch, but I overlooked the possibility of connecting it in series with Ri rather than parallel with Rf (where it would have to switch the other way around: grounded=closed, ungrounded=open).
Since I have a capacitor to ground in series with Ri, I guess I'll try the NPN bipolar approach.
Many thanks for your most helpful reply!

R.G.

I should probably qualify that. NPNs to ground can be tricky. Expect to tinker with it some.

You can also relocate the capacitor in series with Ri from ground to the bias voltage. and use the JFET there are well. You'll have to use a high value resistor, greater than a meg or so, from Vbiasto the capacitor side of the JFET to keep it at a consistent voltage level.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

hannes

Quote from: petemoore on September 15, 2006, 09:20:11 AM
 EDIT
  After reading the posts already entered by RG and Billings...I'm not certain these approaches are aimed at the same goal... ???
 
  Good question, or...a result I've thought'd be cool also...If words are serving to communicate here...
 Here's why I think it'd be cool
 I like boost way up over unity...for driving a DIST, this setting is so high with the distortion OFF it's rediculous, I need the DIST off setting to also immediately turn that booster down...[the booster sounds real good set lower, and great when set high to drive fuzz, it could use attenuation when boost only, much more boost when driving the fuzz].
 Here's what I'd try...
 If you're using 3pdt for bypass and indicator on the DIST, one row is used for input, one row for output, 2/3rds of the last row for LED indicator switching, that last lug as show on this page, as Sw1's top left lug http://www.generalguitargadgets.com/diagrams/switch_lo_3pdt_tb_dcjack.gif
 is a switched ground, not used !!!
 use that switched ground on the dist's bypass switch to bring the boosters level to a more 'normal' level [closer to unity] when the dist is off [I'd think for a much less shocking transistion].
 Using a fixed resistor from this sw'd ground to the booster signal path [pick your placement, I'd just tack it on the end].
 This often [poll: almost always?] unused switched Gnd. point can be put to excellent uses for...say like a little cap to input..or..etc.
 ...but, what value fixed resistor...
 yes...build the prototype with a pot wired as V/R to ground or, as a Volume Control wiring to ground [ez mods @ switch 'n pot lugs], I'd start with a >250k audio [or linear...lol], or see how much a 100k pot loads the signal down...which in many cases would be parallel to the Booster's 100k volume control pot: 2 x 100k paralleled = 50k.
 Your DMM can tell you what physically paralleled [wired] 87k and 236k parallel measures, probably around less than 84k...of course you can change the numbers
  It wouldn't be entering a cap into the switching arrangement, so I 'guess popping shouldn't be an issue...

Thank you for your comments.
I think our final goal is in fact the same: design a distortion - booster with a boost that is usable both independently and combined with the distortion.
However, while you were thinking of lowering the boosters level when the distortion is switched off, I was thinking of simply setting the booster to a lower level and make the boost also switch on/off an additional gain stage of the distortion.
Anyway, I also had the idea of using the unused lug of a 3PDT switch (of course this means you can't use the "grounded input" wiring: http://www.generalguitargadgets.com/diagrams/switch_lo_3pdt_ig_dcjack.gif)
The idea of lowering the level by connecting a fixed resistor to ground to the signal path is interesting, but I'm afraid this might turn your clean boost into an overdrive.

petemoore

The idea of lowering the level by connecting a fixed resistor to ground to the signal path is interesting, but I'm afraid this might turn your clean boost into an overdrive.
  I don't see how, it would simply attenuate the output just [wired the same as] as a volume control would.
Convention creates following, following creates convention.

hannes

Quote from: petemoore on September 15, 2006, 10:30:49 AM
The idea of lowering the level by connecting a fixed resistor to ground to the signal path is interesting, but I'm afraid this might turn your clean boost into an overdrive.
  I don't see how, it would simply attenuate the output just [wired the same as] as a volume control would.

Ok, sorry, I was thinking of a booster like the MXR Microamp which only has a gain control and no volume control.
With the gain turned up, grounding the fixed resistor would attenuate the output but it wouldn't clean up the way turning down the gain would.
Maybe I am just confused  :)

hannes

Quote from: R.G. on September 15, 2006, 09:44:36 AM
You can also relocate the capacitor in series with Ri from ground to the bias voltage. and use the JFET there are well. You'll have to use a high value resistor, greater than a meg or so, from Vbiasto the capacitor side of the JFET to keep it at a consistent voltage level.

Ok, I will try this approach. Thanks again.