Is this an effective way to quickly switch between two gain settings in an inverting amplifier configuration?

image

I want to be able to switch between unity gain and half the input gain (-6dB) for an inverting opamp. The easiest way I can think of to do this is to add another resistor of the same value in parallel to the feedback resistor.

This is part of an audio output stage, and I have read that floating pins can pick up unwanted noise. To mitigate this, I added a 1M pulldown so that the parallel feedback resistor isn't floating when the switch has disconnected it.

Is this an appropriate approach, and is there anything else I should consider? I'm trying to keep this as simple as possible. Thanks!



EDIT: Updated the design as per both comments - thank you! That helped me understand what to do (and why).



Flip the switch around, with pin 2 connected to R17, so that it switches between the output and ground. Then there's no need for R29.

This is part of an audio output stage, and I have read that floating pins can pick up unwanted noise. To mitigate this, I added a 1M pulldown so that the parallel feedback resistor isn't floating when the switch has disconnected it.

The node isn't floating; it's connected to the 100 kΩ resistor so, providing your switch has low capacitance to ground your circuit should work just fine without R29.

Remember, this advice is for audio; as frequencies get into the hundreds of kHz and above things can change in that the open-circuit switch capacitance can come into play.

Ask AI
#1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 #16 #17 #18 #19 #20 #21 #22 #23 #24 #25 #26 #27 #28 #29 #30 #31 #32 #33 #34 #35 #36 #37 #38 #39 #40 #41 #42 #43 #44 #45 #46 #47 #48 #49 #50 #51 #52 #53 #54 #55 #56 #57 #58 #59 #60 #61 #62 #63 #64 #65 #66 #67 #68 #69 #70