Author Topic: boost and cut from non-inverting opamp amplifier  (Read 573 times)

bartimaeus

boost and cut from non-inverting opamp amplifier
« on: October 24, 2020, 07:35:24 PM »
hello! super basic question here... i'm trying to wire up a non-inverting amplifier to get unity gain, boost, or cut from a DPDT on/off/on toggle switch, with separate controls for the boost and cut levels. does this seem like it'd get the job done?



some questions that immediately spring to mind: would i be better off always boosting, and then attenuating for "unity"? should i be worried about the value of the input resistor, when i short out the pot in the feedback loop?

thank you for any thoughts or advice!

Rob Strand

Re: boost and cut from non-inverting opamp amplifier
« Reply #1 on: October 24, 2020, 07:49:16 PM »
What you have is fine but you can do it with a single SPDT by switching R2 instead of RV1, then RV2 and R2 switch to ground.

You can see the pattern in the front end of this Peavey schematic, top left.   Ignore C5, R5, S1.

http://www.freeinfosociety.com/media/images/2085.gif

The advantage of your circuit is it shorts RV1 which reduces noise.  However by choosing a smaller RV1 value you can get the noise down to a low level.
Plopping around the pot since an early age.

bartimaeus

Re: boost and cut from non-inverting opamp amplifier
« Reply #2 on: October 24, 2020, 10:53:12 PM »
thank you very much for the fast feedback!

being able to use an spdt is pretty handy, though i do want to keep this as low-noise as possible. i did some googling about feedback resistor values, and ended up with this:


do you think this will be best of both worlds? i read it's good to add a resistor on the input that matches the one in the feedback loop for "offset current compensation"?
https://electronics.stackexchange.com/questions/56727/what-is-the-purpose-of-a-resistor-in-the-feedback-path-of-a-unity-gain-buffer


Rob Strand

Re: boost and cut from non-inverting opamp amplifier
« Reply #3 on: October 24, 2020, 11:21:23 PM »
Quote
do you think this will be best of both worlds? i read it's good to add a resistor on the input that matches the one in the feedback loop for "offset current compensation"?
For audio you normally aren't too concerned about offset currents because audio eventually high-pass filters the DC somewhere along the way.   If you are building circuits which amplify DC and you want the DC offsets to be stable then it's something that is of a major concern.


The NE5532 probably shouldn't be driving any lower than 600ohm.     Since your output could feed 1K (R4) the feedback resistors probably shouldn't present below about 1.5k in order to keep the load above 600 ohms.

A hidden source of noise is the 1M input resistor R1 and the impedance of input source.   The size of C1 has an impact as well.  The NE5532 has a high input noise current so high input impedances contribute to noise.    If the input source is a guitar then the input impedances isn't low so the sets a limit to how low the noise can go.        All said and done there is often little gain using feedback resistors less than about 4.7k.

FWIW, there's a whole lot of finer points regarding bias current compensation.   The correct way to do it is the DC impedance feeding each opamp input has the same resistance.    The DC resistance to the opamp + input isn't just the series resistance R5, it is R1 + R5.  So as you can see you should match 1M+100R on the opamp - input.   That's going to be a lot of noise!    If you *had* to do bias current compensation you would use 1M+100R on the opamp -input but put a cap across the feedback resistor so there is no noise for AC.   However that would still be wrong.   The other point is the DC resistance presented to the opamp - pin  RV1 in parallel with R2.    Anyway as you can see to do bias compensation correctly there's many details.  For audio it's something to be aware of but you don't want to be compromising the noise or adding a whole lot of components to solve a problem that does't need to be solved.

But ahhh, there's still more.   In your circuit the DC offset changes because the circuit has DC gain and that's going to cause a pop when you change between the two settings.   The way around that would be a cap in series with RV1.    You will also need to put a 1M resistor across the switch so RV1 doesn't completely switch out, it leaves a 1M DC path so the cap doesn't cause pop.

You should put a 2M2 resistor to ground on the input to stop pops when you plug in the input.

   
Plopping around the pot since an early age.

bartimaeus

Re: boost and cut from non-inverting opamp amplifier
« Reply #4 on: October 25, 2020, 12:24:23 AM »
thank you again for taking the time to explain this! as always, blindly applying techniques from google just causes more problems huh!

in this case, iím happy to say itís just for audio haha! so iíll let any offset currents be. but i appreciate you explaining the right ways to deal with it!

as for the 2M2, is it acceptable to just make R1 a higher value and move it to the other side of C1, so it can set the input impedance and shunt any stray current from the cap to ground?



i tried using values near the 4.7k you mentioned while also keeping them big enough to (mostly) avoid it turning this into a highpass filter at higher gain.
« Last Edit: October 25, 2020, 12:32:34 AM by bartimaeus »

Rob Strand

Re: boost and cut from non-inverting opamp amplifier
« Reply #5 on: October 25, 2020, 01:50:06 AM »
Quote
blindly applying techniques from google just causes more problems huh!

in this case, iím happy to say itís just for audio haha! so iíll let any offset currents be. but i appreciate you explaining the right ways to deal with it!
Electronics can be a pain sometimes, too many details.

Quote
as for the 2M2, is it acceptable to just make R1 a higher value and move it to the other side of C1, so it can set the input impedance and shunt any stray current from the cap to ground?
You need to keep you 1M on the IC side of C1.  That biases the opamp (DC-wise).   You could make the 2M2 a 10M if you like.

This site generally has circuit which are good examples to follow,
https://sound-au.com/project149.htm

The circuit uses 150k input, which is a bit low.  Notice also the 560 ohms.   That helps stop RF.   If you make that resistor too high it will add to the noise.    Also notice he doesn't use the 2M2/10M on the input, he relying on the socket shorting the cap.   That works in all cases except when you have a lead plugged in with nothing on the other end.

Quote
i tried using values near the 4.7k you mentioned while also keeping them big enough to (mostly) avoid it turning this into a highpass filter at higher gain.
Yes, that's the right reasoning.   Small resistors means you need bigger caps to prevent high-pass filtering.  Large resistors let you use smaller caps but a some point the noise increases.

I just noticed yet another source of popping when you change the switch.   There will be a small DC offset at the output of the opamp.   In boost mode that DC voltage passes through to the buffer input cap.   However when you switch to boost mode that DC voltage passes through a divider which will divide down the DC.  The change in DC causes a DC glitch which cases a pop.    The only way to remove it is with more caps.
Plopping around the pot since an early age.

PRR

Re: boost and cut from non-inverting opamp amplifier
« Reply #6 on: October 25, 2020, 04:42:00 PM »
Make your output cap 10uFd. While 0.1uFd is plenty to drive full bass into guitar cord impedances, The low impedance of the opamp (most amplifiers) also serves to sop-up stray hum pickup on the output lead, and a small cap spoils that benefit.

And PLAGIARIZE!! A whole generation of SS amplifiers start with a variable-gain NI opamp. Typically a pot from +23dB to -30dB, but you can pick your three set-gains and use a switch.
  • SUPPORTER

bartimaeus

Re: boost and cut from non-inverting opamp amplifier
« Reply #7 on: October 26, 2020, 12:49:35 PM »
You need to keep you 1M on the IC side of C1.  That biases the opamp (DC-wise).   You could make the 2M2 a 10M if you like.

oh i see, thanks for clearing that up!

Quote
The circuit uses 150k input, which is a bit low.  Notice also the 560 ohms.   That helps stop RF.   If you make that resistor too high it will add to the noise.    Also notice he doesn't use the 2M2/10M on the input, he relying on the socket shorting the cap.   That works in all cases except when you have a lead plugged in with nothing on the other end.

thank you again for your help :) that schem does seems fairly straightforward, but i'd still be confused by some of the stuff he doesn't explain. speaking of which, i notice he has a cap in series with the negative input resistor to ground Ė what's the benefit of that if it's not switchable?

Quote
I just noticed yet another source of popping when you change the switch.   There will be a small DC offset at the output of the opamp.   In boost mode that DC voltage passes through to the buffer input cap.   However when you switch to boost mode that DC voltage passes through a divider which will divide down the DC.  The change in DC causes a DC glitch which cases a pop.    The only way to remove it is with more caps.

oh, nice catch! could I get away with a 1M resistor to ground next to RV2, to avoid using so many big caps?



Make your output cap 10uFd. While 0.1uFd is plenty to drive full bass into guitar cord impedances, The low impedance of the opamp (most amplifiers) also serves to sop-up stray hum pickup on the output lead, and a small cap spoils that benefit.

i'm using this as an input to an eq, which is why there's not much output filtering. but i never knew that about opamps preventing/fixing hum! usually i'd use 470nf and 100k to ground for the output, would that still do the job?

Quote
And PLAGIARIZE!! A whole generation of SS amplifiers start with a variable-gain NI opamp. Typically a pot from +23dB to -30dB, but you can pick your three set-gains and use a switch.
i'm always a bit nervous to steal too much, because there's often extra stuff going on that i don't understand. hopefully i can do a better of it once i finally finish reading the art of electronics!