# Op Amp Introduction

The most common block I can think of when it comes to electronics is the amplifier. People often just want to take a signal and make it bigger. Maybe they want more power to drive something. Maybe it’s hard to calculate the changes in a signal when it’s so small, so they enlarge it to make the math. Maybe some control system needs a feedback loop, so you need a way to isolate the input and output by some factor. All these are made possible thanks to the operational amplifier, or op amp.

Rather than going in and explaining the ins and out of op-amp architecture, I’ll start off with what assumptions we make about an ideal op amp, and how we can use it. Later, we can get into more detail and learn the insides of one.

The op-amp has 5 ports, but only three of them really matter. The two power terminals on the top and bottom side are used to power (and later, isolate) the device. The more interesting ones are on the left and right hand sides. For these guys, we have two simple rules to keep in mind:

• The input draws no current - nothing going into the V+ or V- terminals.
• The output does whatever it can to force V+ = V-

Using the op amp in an open loop configuration (voltages from left to right, no feedback), we can assign some gain $A$ to the amplifier. This mean our circuit will be modeled as:

$$V_{out} = A*(V_{+}-V_{-})$$

For a really good op-amp, the gain will be in the hundreds of thousands or millions. But we already said we want the input voltage difference to be as small as possible, so we effectively get the output being $\infty*0 =$ …?

Great question! That’s why we don’t use in this format, instead, we prefer to use it as a closed loop system with feedback. Feedback, for the unaware, just means taking the output and tying it back into the input of the system somehow. Let’s look at some simple examples, and see where they go from there.

Let’s work out how this one goes . We’ll start as we do with most circuits, and try to assign all the node voltages that we know. Easy to see that the plus terminal is connected to ground, so according to our second rule, the plus terminal must also be ground.

The current through resistor $R_1$ is therefore going to be $V_{in}/R_1$.

According to rule one, no current can flow into the op amp either, so let’s use that with Kirchoff’s Current Law (at any given node, the amount of current going into a node must equal the amount going out). This means the exact same current continues flowing through resistor $R_2$.

Now, here is the only tricky part. We have to keep track of which direction our current and voltage orientations are. We’re going to keep our currents going in the same direction here, meaning they’ll be traveling FROM the plus terminal (ground) to $V_{out}$. Therefore our Ohm’s Law set up will be:

$$V_{out} = I \cdot R_2 = (V_{in}/R_1)*R_2$$ $$V_{out} = -V_{in} \cdot \dfrac{R_2}{R_1}$$

The minus sign is incredibly important, as we have created an inverting amplifier. Whatever voltage we input will be flipped in polarity (positive to negative or vice versa), as well as being scaled by some factor. We can clearly see that if we want a larger voltage, we make the second resistor larger, and to shrink the voltage, make the first one larger. Let’s check out one more example.

Almost the exact same, but now we’ve just moved things slightly. The voltage source is now connected directly to the op amp. Curiously, we can interpret this as a power source that delivers no current (based on rule 1), so it’s a power source that delivers no power! Don’t worry, we still get voltage from it. So let’s begin with the node voltage method we had before.

Ground is now on the far left, and we’ll have $V_{in}$ at BOTH the plus and minus terminals now (rule 2). So now we’ll have positive current flowing from the plus terminal to the ground on the left, with value $V_{in}/R_1$.

Let’s now solve for the output while maintaining the same current direction we had before. Since we said positive current flows from right to left, that means we have the following Ohm’s Law setup: $$V_{out} - V_{in} = I\cdot R_2 = (V_{in}/R_1)\cdot R_2$$ $$V_{out} = V_{in} + V_{in} \cdot R_2/R_1 = V_{in} \cdot (1 + R_2/R_1))$$

Nice, now we have another amplifier circuit, but this one doesn’t change the sign. Now we have made a non-inverting amplifier! Same as before, changing the resistors changes the gain appropriately.