in this video we're going to talk about op amps an op amp is short for an operational amplifier op amps are basically High Gain differential amplifiers these devices they amplify the difference between the input voltages V1 and V2 now the op amp has a very high input impedance but a very low output impedance the negative terminal Here is known as the inverted input so if you apply a signal to the inverted input the output signal will be 180° out of facee with that the positive terminal is the non-inverted input so if you apply a signal there the output signal will be in Phase with the input signal at V2 so here's the basic layout for the 741 operational amplifier pin two represents the inverted input and pin three represents the non-inverting input six is the output pin pins four and seven is used for the power supply that's where you'll be connecting the batteries uh to this op amp number eight is unused and one 1 and five is the offset no pins even if there's no signal applied at the input the operational amplifier can still generate an output voltage and this is known as the output offset voltage and so you could use these pins to set the output the output offset voltage to zero but that's another topic for discussion so here is a basic circuit diagram of an inverse amplifier the signal is applied to the inverted input which is represented by pin 2 and so the output will have the inverted signal RF is known as the feedback resistor this resistor takes some of the output signal and feeds it back to the input so as a result it reduces the voltage gain now when you have a feedback resist the voltage gain is said to be a closed loop voltage gain and that gain is equal to RF / RN or the input resistance now of course because the signal has been inverted we need to put a negative sign here so that's how you can calculate the gain for this particular circuit now R should be set equal to the parallel combination of these two resistors so R is going to be the product of the input resistance times the feedback resistor divid by the sum of those two resistors now what happens if we get rid of the feedback resistor and let's get rid of r as well in this case the op amp will no longer be in closed loop mode but rather it's going to be in the open loop mode so the gain will no longer be called the closed loop voltage gain instead it's going to be called the open loop of voltage gain and so that equation won't apply if we don't have a feedback resistor now the typical open loop voltage gain represented by G subv could be as high as 200,000 now the output voltage will be limited based on the supply voltages at pins 4 and 7 so keep that in mind now let's talk about how we can connect a battery or a series of batteries to the op amp so this is how you want to connect the supply voltages so let's say if we have two 9vt batteries so here's the positive terminal of one of the batteries here's the negative terminal of the other one the ground will be at the middle between those two batteries and this will be connected to basically pin seven of the op amp and this part will be connected to pin 4 of the op amp so let's put this all together so here is the 741 opamp with its two input voltages here is pin 7even and this is pin 4 and here's pin six the output pin and here we're going to put the batteries so this is negative V and over here this is positive V so this is V out this is V1 V2 and then we also need to connect the ground to it but let's add some resistors to this circuit let's turn this into an inverted op amp so this is the input resistance now we do need our feedback resistor this is going to be R and we need to connect this to the ground and the ground connection is here as well so if you want to you can just draw a line that connects those two parts of the circuit so that's how you can connect the 741 op amp to a series of batteries so you need basically two V batteries so this is 9 volts each it could be more but in the middle that's where you're going to put the ground now let's go over the next type of circuit which is the non-inverting amplifier circuit so we're going to use the 741 opamp one more time so this will be the positive terminal and this will be the negative terminal so notice that I flipped it now we're going to apply the input signal to the positive terminal so because it's a non-inverting amplifier the output signal will be in the same phase as the input signal it's not going to be inverted now we're going to have a resistor between pin 2 that is the inverted input and the ground so let's call that the input resistance and we're still going to have our feedback resistor between inputs 2 and six so notice that if you compare this circuit with the inverted amplifier circuit the feedback resistor was still between pins 6 and two so that hasn't changed now let's not forget to put the supply voltages so positive V and negative V for Pins 4 and seven now the closed loop voltage gain for this particular non-inverted amplifier is going to be it's still the feedback resistor divided by the input resistance but with an addition of one so it's the same gain as the inverted amplifier but adding one to it as well so that's how you can calculate the gain for this particular circuit now there's another term that you need to be familiar with when dealing with OP amps and it's something called sloate the transistors inside the integrated circuit of an op amp has limited switching capabilities at high frequency they may not be able to switch on and off as quickly based on how fast the signal is alternating from its positive to negative Cycles so this value becomes very important when calculating the maximum operating frequency of a particular op amp it's the slew rate divid 2 pi times the peak voltage this is the peak output voltage of this signal at Pin six now a typical slew rate value would be like5 volts per microc so that's .5 / 1 * 10- 6 seconds so that will correspond to a frequency of 500 khz what you need to understand is this as the frequency of the input signal increases the gain of the op amp decreases and so certain op amps don't work at very high frequencies some are designed to handle higher frequencies but others just don't work well at high frequencies so keep that in mind let's work on an example problem so here we have an operational amplifier circuit and we're given the voltage of the input signal and we want to calculate two things what is the closed loop voltage gain of this particular circuit and also what is the output voltage let's focus on the gain now we need to know what type of amplifier we have is it an inverting amplifier or a non-inverted amplifier now we can see that the signal is applied to the negative inverted input of the op amp so it's an inverted amplifier which means that the gain is RF over the input resistance now the feedback resistor is 40 kilohms the input resistance is 2 kilohms so -40 / 2 the closed loop voltage gain is -20 now keep in mind a negative sign simply tells us that the polarity has been reversed or that the output signal is 180° out of phase with the input signal now what is the output voltage if the gain is 20 it's going to be 20 times more than 10 molts so it's 10 molts * 20 10 * 2 is 20 so 10 * 20 is 200 so thus the output signal will have a voltage that will vary between positive and negative 200 Mill volts