Electronic – Programmable differential amplifier

adcamplifier

I would like to measure signals up to 5Mhz, between different ranges -2,2 and -36,36, I could use a differential amplifier with level shifting like here.

What is the best way to change the gain of the amplifier? Is it a good idea to use a mux/switch controlled by the ucontroller?

Best Answer

A mux or analogue switch can be used to control amplifier gain by switching in various combinations of different resistor values.

It is also possible to change the gain of some amplifier circuit topologies by changing the combination of some resistors that connect to GND. With these it is easy to selectively make the GND connections by using small nFETs or NPN transistors.

Yes it is possible to control such circuits from a microcontroller. As with any circuit, especially analogue circuits like this, you have to make sure that the added circuit connectivity in the amplifier's gain control loop does not add too much extra coupling or feedback to the circuit to introduce instability or oscillation. In the case of the microcontroller connections into the circuit you have to use care to make sure that the possibly noisy digital GND of the MCU does not contaminate the grounds of the analogue circuit and upset the signal quality above an acceptable level.