In signal condition domain, a critical functional block is a VGA or Variable Gain Amplifier. It is used in measurement devices like: the oscilloscope, spectral analyzer, network analyzer and so on.
A simple VGA consists of a few resistors with different values, an operational amplifier and components that switch between these resistors. It can be a solenoid switch or an IC electronic switch. In this case, a SN74HC4066 is a suitable device. It have 4 switches with individual control. A good feature for use with the Arduino board.
So, by making a big voltage divider and choosing between nodes, we can modify the gain equation.
Gain CoefficientRF stands for resistor feedback. If S1 is close and the rest are open according to OP, the operation gain coefficient will be:
G1 = 1 + RF/(R1+R2+R3+R4)
For S2 closed and the rest open:
G2 = 1 +(RF+R1)/(R2+R3+R4)
And so on:
G3 = 1 +(RF+R1+R2)/(R3+R4)
G4 = 1 +(RF+R1+R2+R3)/(R4)
Therefore, we can obtain 4 gain coefficients. But you may wonder if we can make combinations between gain in order to achieve other equations. Yes, we can and there is more detailed information are here.
So, with this concept in mind, we can make connections between the Arduino board, resistors, IC switch and OP AMP like in the bottom schematic. Pins 2/3/4/5 are connected to Arduino digital pin 2/3/4/5.
Arduino code is very easy because it contains digitalWrite commands and a serial communication to modify gain from the serial monitor.
Comments