I need to be able to control the gain of an op amp with an mcu. I know the obvious way is to use a digital potentiometer or an op amp which was already designed for this purpose.
I am wondering if this will do the trick:
basically the mcu can use the mosfet to switch another resistor in parallel to R2 which would increase the gain from 2 to about 27 in this example. So i'm thinking to have an array of mosfets, maybe 3 in total or so. Would that work ? I realize this would effect the high pass filter of C2-R2.
Another way of doing the same thing is putting R4 in series under R2 and shorting it out with the mosfet.
Which way is preferable ?
Thanks in advance !