# Introduction to Op Amps

concept
The Operational Amplifier (Op Amp) is an integrated circuit built out of either BJTs or FETs that makes building practicle amplifiers and filters much simpler. The op amp is much easier to think about and design with than single transistors and is a base building block in so many circuits around your home. In this topic we'll cover how the op amp works in a basic way, how to analyse simple op amp circuits, and we'll cover two common amplifiers you can build with a single op amp, the inverting amplifier and non-inverting amplifier.
fact
The op amp is a three terminal device whose symbol is: The three terminals are the positive input, negative input and output
Op Amps also have two other terminals to allow you to hook it up to a power source. One of the big benefits of an op amp is that the power is applied separately to the inputs which helps to make the analysis much simpler (you don't have to check that the device is in the "active" mode, there's just always enough power to operate with). The power terminals are often left off of diagrams because they don't effect the output unless the output is supposed to be outside the range of the power supply. For instance a 5V power supply can't output 12V for obvious reasons.
fact
The output of an op amp is given by: $$V_o = A(V_+ - V_-)$$ Where $$A$$ is the amplification factor of that particular op amp (like $$\beta$$ in BJTs this number differs between every device and is never known beforehand). $$A$$ is always large (on the order of 1000)
When we build op amp circuits we hook the output to one or both of the inputs in some way (through resistors, caps, other devices) to create a feedback loop. Because $$A$$ is very large we can think of an op amp as a device which creates an output that will make sure $$V_{in} = V_{out}$$ This can be seen in the unity gain buffer: Here $$V_- = V_+ - \frac{V_o}{A} \approx V_+$$
fact
To analyse op amp circuits we follow two simple rules:
1. $$V_+ = V_-$$
2. Current does not enter or exit the input terminals
example

Analyse the following op amp circuit and find the output voltage:

Now we start with our first rule of op amp analysis: $$V_+ = V_-$$ This means that $$V_- = 0$$V Now we can find an expression for the current through $$R_1$$. $$I_{R1} = \frac{V_{in}}{R_1}$$ Now using our second rule, that no current enters or leaves the input terminals we know that all of $$I_{R1}$$ must run through $$R_2$$: $$I_{R2} = I_{R1}$$ Now since we know that $$V_+ = 0$$V and we know the current through $$R_2$$ we can calculate $$V_o$$: \begin{align} V_o & = 0 - I_{R2}R_2 \\ & = -\frac{V_{in}}{R_1}\cdot R_2 \\ & = -\frac{R_2}{R_1}V_{in} \\ \end{align}
The above example is of a particular op amp circuit known as an "inverting amplifier". One of the fundamental op amp circuits you'll need to know.
fact
The Inverting Amplifier is an op amp circuit that looks like: Its output is given by: $$V_o = -\frac{R_2}{R_1}V_{in}$$
example

Analyse the following op amp circuit and find the output voltage:

We'll start this the same way we started the inverting amplifier analysis, by using our first rule $$V_+ = V_-$$ $$V_- = V_{in}$$ Now we know that the current through $$R_1$$ is given by: \begin{align} I_{R1} & = \frac{V_-}{R_1} \\ & = \frac{V_{in}}{R_1} \\ \end{align} And since we know that no current enters or leaves $$V_+$$ all of $$I_{R1}$$ must be flowing from the output through $$R_2$$ \begin{align} I_{R2} & = I_{R1} \\ & = \frac{V_{in}}{R_1} \end{align} So we know that \begin{align} V_o & = V_+ + I_{R2}R2 \\ & = V_{in} + \frac{V_{in}}{R_1}R_2 \\ & = V_{in}\left(1 + \frac{R_2}{R_1}\right) \\ \end{align}
This circuit is called the "non inverting amplifier" since its output has the same polarity as the input.
fact
The Non Inverting Amplifier is an op amp circuit that looks like: Its output voltage is given by: $$V_o = V_{in}\left(1 + \frac{R_2}{R_1}\right)$$
practice problems