I need to be able to switch between gain values on a precision opamp in the microvolt region using a MCU. What is the best method to do this? Noise is critical.
Low noise is the goal.
Assume a 62 ohm total of all the front end noise sources.
That produces 1.0 nanoVolts per rtHz noise density.
I suggest you have a low_noise first_stage, followed by a switched_gain second_stage.
Most important is what is the BANDWIDTH? If 100Hertz (actually 100 /(pi/2)), then the total input_referred_noise will be 1nanoVolt /rtHz * sqrt(100) = 10 nanoVolts RMS (or about 60 nanoVolts PeakPeak at the 1ppm level).
Thus 10 nanoVolts RMS, in 100Hz bandwidth, is about the lowest you can reasonly do.
Notice the switching_gain burden is NOT in the first stage, but the 2nd stage.
For gain_switching, you have numerous choices, because of the gain of the first stage provides a Gain_1 * Gain_1 advantage. Thus Gain_1 of 10 will reduce the impact of Stage_2 noise by factor of 10 * 10.
But how serious about low_noise must you be?
If you want DC_stability (low DC drift), then designing the PCB, with thermal_shorts and thermal_opens, becomes a easy learning curve.
At the 10 nanoVolt floor, you need to block or design_out incoming interferers from
electric fields, coupling onto ALL circuit nodes
magnetic fields (60Hz; spikes on 60Hz; switch_reg transients at 100 nanosecond that are minimally attenuated by copper foils)
VDD trash and even VDD as a feedback path for sustaining oscillation
Ground Plane coupling from OUTPUT back to INPUT, this causing echoes and thus settling time degradation; also any 1mA currents thru 2 squares of standard thickness copper foil will produce [1mA * 0.001 ohm == 1 microvolt error]
You can easily have a millivolt or 10 milliVolts of HFI or EFI.
Miniature mechanical latching relays are good for this application, and are used in most high end commercial test equipment. They have very low resistance when on, very low leakage when off and don't add any significant noise (including low-frequency noise such as thermal EMFs) when not switching.
You can also use a good analog switch and change taps on a voltage divider in the feedback circuit.
Or have dual parallel amplifier paths and ignore the one that might be saturated (mux after the amplifiers).
using a decent DAC?
The only other possibility is in my opinion to fake a dac with PWM