Is there any option how to control amplification ratio of operational amplifier by some logic signal which can be produced by arduino? I am talking about some clasic op amp like lm356 or ui741 in basic inverting or non-inverting circuit (i would like to use non-inverting circuit in my application). I know only about digital potentiometer like solution but i think that it isn't profesional and most eficient solution, so I want to know your opinion. Thanks for reply.
-
3There's nothing wrong with digipots... I made a whole mixer system using digipots and op-amps once.– MajenkoCommented Mar 13, 2021 at 22:45
-
not a question about Arduino– jsotolaCommented Mar 13, 2021 at 23:01
-
Could you provide more details on your requirements? Do you need gain adjustments in fine tuning or just large steps, like the scales of a multimeter? What are the characteristics of your input signal?– devnullCommented Mar 15, 2021 at 15:55
1 Answer
The basic principle is easy to implement. A non-inverting configuration has a resistor Ri from the inverting input to ground, and a feedback resistor Rf from the same input to the output. The signal is applied to the non-inverting input. The gain is 1+Rf/Ri. You can control the gain by changing Ri, which can be done via a CD4016 quad analog switch and 4 resistors.
HOWEVER, the Arduino is a 0-5V device. The CD4016 can handle 15V, but to switch it the digital input must pass through half the supply. The op-amps you mention will require bipolar supplies to handle AC signals (which I assume is what you want), so you could run them with +/-7.5V, with the CD4016 powered between them. Then to get the Arduino 0-5V to toggle the CD4016 you'd need some level-shifting transistors to get it to +/-7.5. The upshot is that this is surely going to be more trouble than it's worth.
However, if you are willing to drop the ancient op-amps and use a modern single-supply type (MCP6021, LT1013, etc) that runs on 0-5V, you can use input and output capacitors to convert the signal to AC, then just use the CD4016 as-is. Or JFET transistors, or even bipolars to switch the gain resistor under Arduino control if you don't need audiophile quality.