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

As much as I’d like to, I’m not going to cover basic circuit analysis here. Therefore, this page assumes some familiarity with DC circuit analysis, although I won’t go too deep here. Anyways, this page will cover the basic math involved in analyzing op-amps, which should give us a good preparation for the next page where we cover some applications of op-amps. The main three op-amp configurations will be covered, the non-inverting op-amp, the inverting op-amp, and the differential op-amp. The basic steps involved are the same as any circuit, ie. basic node equations. Just a few things to note, for an ideal op-amp the voltage at the inputs is equal, no current can flow into or out of the inputs, and no current can flow out of the output.

Example 1: Non-Inverting Op Amp

Non Inverting Op Amp

Looking at this, we know that {V_ - } = {V_ + } and there is no current flowing into or out of the op-amp. Doing a current balance between {i_{{R_f}}} and {i_{{R_g}}} yields

{i_{{R_f}}} = {i_{{R_g}}}

where

{i_{{R_f}}} = {{{V_{out}} - {V_{in}}} \over {{R_f}}}     and

{i_{{R_g}}} = {{{V_{in}}} \over {{R_g}}}.     Substituting these into our current balance yields

{{{V_{out}} - {V_{in}}} \over {{R_f}}} = {{{V_{in}}} \over {{R_g}}}.     Solving for     {{V_{out}}}     results in

{V_{out}} - {V_{in}} = {{{R_f}} \over {{R_g}}}{V_{in}}

{V_{out}} = {V_{in}} + {{{R_f}} \over {{R_g}}}{V_{in}}

{V_{out}} = {V_{in}}\left( {1 + {{{R_f}} \over {{R_g}}}} \right)

Now it is sometimes useful to express the Gain (G) of an op-amp circuit as the ratio of the output to the input.

G = {{{V_{out}}} \over {{V_{in}}}} = 1 + {{{R_f}} \over {{R_g}}} = {{{R_f} + {R_g}} \over {{R_g}}}

Okay, so we went through the theoretical equations. Now lets try some values. Let’s say we are dealing with a small analog sine wave, with an amplitude of 10mV. We want to bump that amplitude up to 1V. So our input is 10mV, output is 1V, our required gain is 1V/10mV = 100. So we would need resistors that follow the ratio

G = 100 = 1 + {{{R_f}} \over {{R_g}}}

{{{R_f}} \over {{R_g}}} = 99

This will all get more interesting very soon, I promise. I’ll cover one more example on this page, the inverting amplifier, then the next page will have much more fun things.

Example 2: Inverting Op-Amp

Inverting Op Amp

Again, starting with {V_ - } = {V_ + }  and knowing that there is no current into or out of the Op Amp, we can start with the current balance at the node between {{R_f}} and {{R_g}}.

{i_{{R_g}}} =  - {i_{{R_f}}}

{i_{{R_g}}} = {{{V_{in}}} \over {{R_g}}}

{i_{{R_f}}} = {{{V_{out}}} \over {{R_f}}}

Solving for {{V_{out}}}

{{{V_{in}}} \over {{R_g}}} =  - {{{V_{out}}} \over {{R_f}}}

{V_{out}} =  - {{{R_f}} \over {{R_g}}}{V_{in}}

Solving for the gain G

G = {{{V_{out}}} \over {{V_{in}}}} =  - {{{R_f}} \over {{R_g}}}

Notice that this creates an amplified output that is negative. This was probably the trickiest part in going from theoretical circuits to actual circuit designs for me, so I will cover this in more detail later on.

Example 3: Differential Amplifier

Differential Op Amp

Here is a very useful configuration for op-amps. We will analyze this the same exact way as before. First, we set {V_ - } = {V_ + } and {i_ - } = {i_ + } = {i_{out}} = 0.

Next we will do a current balance at the node between {R_1} and {R_2}:

{{{V_a} - {V_ - }} \over {{R_1}}} = {{{V_ - } - {V_{out}}} \over {{R_2}}}

And a current balance between {R_3} and {R_4}

{{{V_b} - {V_ + }} \over {{R_3}}} = {{{V_ + }} \over {{R_4}}}.

Substituting {V_{in}} in for {V_ + } and {V_ -} and solving for {V_ out }

Starting with {{{V_b} - {V_{in}}} \over {{R_3}}} = {{{V_{in}}} \over {{R_4}}}    we get

{V_{in}} = {{{V_b}} \over {\left( {{{{R_3}} \over {{R_4}}} + 1} \right)}}     Substituting this into {{{V_a} - {V_{in}}} \over {{R_1}}} = {{{V_{in}} - {V_{out}}} \over {{R_2}}}   results in

{{{V_a} - {{{V_b}} \over {\left( {{{{R_3}} \over {{R_4}}} + 1} \right)}}} \over {{R_1}}} = {{{{{V_b}} \over {\left( {{{{R_3}} \over {{R_4}}} + 1} \right)}} - {V_{out}}} \over {{R_2}}}

Simplifying results in

{V_{out}} = \left( {{{{R_1} + {R_2}} \over {{R_1}}}} \right)\left( {{{{R_4}} \over {{R_3} + {R_4}}}} \right){V_b} - {{{R_2}} \over {{R_1}}}{V_a}

Now that doesn’t really look very appetizing, and there is quite a bit more to the math. I’m just going to simplify that by saying if {{{R_1}} \over {{R_2}}} = {{{R_3}} \over {{R_4}}}  then the equation reduces to

{V_{out}} = {{{R_2}} \over {{R_1}}}\left( {{V_b} - {V_a}} \right)

So this system just amplifies the difference between {V_a} and {V_b}. But now that we have a few examples, we can cover some fun tricks you can do with op-amps. Check out the next page for op-amp applications.

Previous page: Op-Amp Experimentation 1: Op-Amp Basics

Next page: Op-Amp Experimentation 3: Op-Amp Applications

 

 

Op-Amp Experimentation 2: Basic Circuit Math
Tagged on:     

Leave a Reply