Wednesday, 13 November 2019

operational amplifier - Op amp Adder circuit and positive voltages


Reading questions on converting negative voltages to positive ones it has left me with a question that I can't seem to work out. The circuit looks like this:
Op Amp Adder


But you only have the one going to the inverting input. My question is:



When inputting a positive voltage it doesn't change/very slightly change. So do you have to implement something else for when the voltage is positive?




EDIT: Image borrowed from Kortuk's answer here


                                R
___
.------|___|----.
| |
| |
| |
| VCC |
| + |

R | | |
___ | |\| |
Input -|___|----------o-------|-\ | Output
| >----o----
.------|+/
| |/|
| |
=== ===
GND GND

Answer




Your first image has an implicit positive and negative power supply, which allows the output to swing above and below the reference voltage (ground). If you assume an ideal op-amp (usually reasonable for these circuits), then the inverting output is a virtual ground - it is driven to the same voltage as the non-inverting input. The current through the feedback resistor (Rf) must be equal to the sum of the currents flowing through the input resistors (R0, R1, Rn...).



\$ \dfrac{V_0 - V_{ref}}{R_0} + \dfrac{V_1 - V_{ref}}{R_1} + \dfrac{V_2 - V_{ref}}{R_2} = \dfrac{V_{ref} - V_{out}}{R_f} \$



To make the math easy, lets make Rin=R0=R1=R2. The output voltage becomes:



\$ V_{out} = \dfrac{-R_f (V_0 + V_1 + V_2 - 3 \cdot V_{ref})}{R_{in}} + V_{ref} \$



In the first example, Vref=Ground=0V, which simplifies the equations a bit. If (V0+V1+V2) > 0, then Vout will be negative. If Vout can't be negative, due to a lack of a negative rail or negative voltage headroom, then the circuit stops functioning as intended.


Nothing explicity requires you to have a negative rail, and single-supply operation is usually desirable for its simplicity. In order to get the expected signal swing, you need to set Vref to some value between VDD and Ground. A pair of resistors acting as a voltage divider will work, or a poteniometer would allow you to adjust the reference voltage.



In the context of this question, the object was to measure voltages that were always below your ground reference, without having a negative power supply. In that case, a reference voltage of 0 would be OK because the output voltage would never need to swing below the negative rail.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...