Op-Amp Experimentation 3: Op-Amp Applications

First published August 12, 2016 on my old site. Copied here as written.

Op-Amp Experimentation 1: Op-Amp Basics

Op-Amp Experimentation 2: Basic Circuit Math

Op-Amp Experimentation 3: Op-Amp Applications

Op-Amp Experimentation 4: From Ideal to Real

Op-Amp Experimentation 5: Integrator

Op-Amp Experimentation 6: Differentiator

Op Amp Experimentation 7: PID Controller – coming soon
Okay, so I’m not going to post the math proving the equations, just some fun examples of what you can do with op-amps.

Addition

Image: Inductiveload, public domain, via Wikimedia Commons

The equation is Vout=−Rf(V1R1+V2R2+...+VnRn){V_{out}} = - {R_f}\left( {{{{V_1}} \over {{R_1}}} + {{{V_2}} \over {{R_2}}} + ... + {{{V_n}} \over {{R_n}}}} \right)     and if the resistors are all equal, then it is Vout=−(V1+V2+...+Vn){V_{out}} = - \left( {{V_1} + {V_2} + ... + {V_n}} \right) .

Multiplication

Image: Alessio Damato, CC BY-SA 3.0, via Wikimedia Commons

Here we have a multiplication circuit. This is actually pretty interesting, because the first two op amps take the natural log of the two inputs, then the second op amp adds them and solves the exponential of the sum. This is based on the fact that log(a*b)=log a + log b. I won’t bother posting the equation to this, because there is a much simpler way of doing things that doesn’t result in a 0.6V drop from the diodes.

Image: Alessio Damato, CC BY-SA 3.0, via Wikimedia Commons

The equation for this is Vout=R2R1v1v2Vref{V_{out}} = {{{R_2}} \over {{R_1}}}{{{v_1}{v_2}} \over {{V_{ref}}}}

Division

This is interesting, I haven’t found any quick examples on this. However I think the easiest way would be to use a relationship similar to the one used for multiplication, although use the identity log(x/y) = log(x) – log(y). If anyone figures this out let me know, I’d love to include a picture.

Integrator

Turns out it is pretty easy to do calculus with op-amps, as long as you understand that capacitors and inductors vary voltage/current with the rate of change of voltage/current. Here is a way to do integration

Image: ArthurOgawa, CC BY-SA 3.0, via Wikimedia Commons

The equation for this as long as Rn=11Ri+1Rf{R_n} = {1 \over {{1 \over {{R_i}}} + {1 \over {{R_f}}}}}  is

Vout(t1)=Vout(t0)−1RiCf∫t0t1Vin(t)dt{V_{out}}\left( {{t_1}} \right) = {V_{out}}({t_0}) - {1 \over {{R_i}{C_f}}}\int\limits_{{t_0}}^{{t_1}} {{V_{in}}\left( t \right)dt}

Derivative

An easy way to differentiate a signal is to use the circuit below:

Image: Inductiveload, public domain, via Wikimedia Commons

The equation: Vout=−RCdVindt{V_{out}} = - RC{{d{V_{in}}} \over {dt}}

Logarithmic

We already saw an example of this in the multiplication circuit, but here it is:

Image: Inductiveload, public domain, via Wikimedia Commons

The equation is Vout=VTln⁡(VinISR){V_{out}} = {V_T}\ln \left( {{{{V_{in}}} \over {{I_S}R}}} \right)

Where IS{{I_S}} is the saturation current and VT{V_T} is the thermal voltage of the diode.

Exponential

Similar to the logarithmic setup, the exponential setup is

Image: Inductiveload, public domain, via Wikimedia Commons

And the equation is Vout=−RISeVinV t{V_{out}} = - R{I_S}{e^{{{{V_{in}}} \over {V \, t}}}}

Sine Wave

Last one! To create an accurate sine wave we can use a  Wien Bridge to generate an accurate sine wave.

Image: Domaina, public domain, via Wikimedia Commons

The equation: f=12πRCf = {1 \over {2\pi RC}} . The component at the top is a light bulb – this is used so that it will heat up until its resistance Rb=R2{R_b} = {R \over 2} . Now the resistors and capacitors do not need to equal each other, but it makes the math much simpler. I am not very familiar with these, so I’ll be sure to test it out later on.

Previous: Op-Amp Experimentation 2: Basic Circuit Math

Next: Op-Amp Experimentation 4: From Ideal to Real