1 00:00:00,000 --> 00:00:04,515 >> This amplifier circuit is referred to as a difference amplifier. 2 00:00:04,515 --> 00:00:07,980 As the name suggests, we're going to see that at the output, 3 00:00:07,980 --> 00:00:15,570 we're going to find the difference or the subtraction of V2 and V1 or V2 minus V1. 4 00:00:15,570 --> 00:00:17,400 Before we get started on this circuit, 5 00:00:17,400 --> 00:00:18,810 and before you analyze this circuit, 6 00:00:18,810 --> 00:00:21,390 let's just make a few observations. 7 00:00:21,390 --> 00:00:25,995 First of all, in the circuit that we've analyzed involving Op-amps until now, 8 00:00:25,995 --> 00:00:29,550 the sources have been on either the inverting terminal, 9 00:00:29,550 --> 00:00:31,620 or the non-inverting terminal. 10 00:00:31,620 --> 00:00:37,390 This configuration has sources V1 connected to the inverting terminal and V2 11 00:00:37,390 --> 00:00:40,520 connected to the non-inverting terminal albeit through 12 00:00:40,520 --> 00:00:44,930 this resistive network before it gets to the non-inverting terminal. 13 00:00:44,930 --> 00:00:49,470 That points out the fact that VP, 14 00:00:49,470 --> 00:00:53,300 the voltage at the inverting terminal is not exactly V2. 15 00:00:53,300 --> 00:00:56,315 So, what effect is this resistive network have? 16 00:00:56,315 --> 00:01:01,345 Well, we know that the current going into the input of the Op-amp is zero. 17 00:01:01,345 --> 00:01:07,665 Therefore, any current coming from V2 going through R3 will also go through R4. 18 00:01:07,665 --> 00:01:09,780 R3 and R4 are in series with each other, 19 00:01:09,780 --> 00:01:12,455 we have a voltage divider taking place here. 20 00:01:12,455 --> 00:01:19,850 Thus, the voltage at the non-inverting terminal is the voltage across to R4. 21 00:01:19,850 --> 00:01:24,515 It's not exactly V2 but a subdivided portion of V2. 22 00:01:24,515 --> 00:01:26,240 Lets just go ahead and make that observation, 23 00:01:26,240 --> 00:01:27,450 we'll do it up here because we need to keep room, 24 00:01:27,450 --> 00:01:29,485 this is a fairly long derivation. 25 00:01:29,485 --> 00:01:31,800 Let's just say that V sub p, 26 00:01:31,800 --> 00:01:34,510 the voltage of the non-inverting terminal is going to equal 27 00:01:34,510 --> 00:01:43,275 V2 times R4 over R3 plus R4. 28 00:01:43,275 --> 00:01:48,585 So, V sub p is just a little less than V2. 29 00:01:48,585 --> 00:01:52,820 Now keeping in mind, we have the virtual short between the terminals, 30 00:01:52,820 --> 00:01:59,425 that then means that V sub n is equal to V sub p which is equal to that. 31 00:01:59,425 --> 00:02:02,210 This should give us a little bit of flavor of what's going on here. 32 00:02:02,210 --> 00:02:04,430 We know that sources connected to 33 00:02:04,430 --> 00:02:09,169 the non-inverting terminal in our non-inverting amplifier configuration had a gain 34 00:02:09,169 --> 00:02:11,014 that is slightly larger than 35 00:02:11,014 --> 00:02:16,550 the gain experienced by sources connected to the inverting terminal. 36 00:02:16,550 --> 00:02:22,225 The non-inverting gain was one plus R2 over R1, 37 00:02:22,225 --> 00:02:25,370 whereas the inverting gain was negative of course, 38 00:02:25,370 --> 00:02:27,440 just R2 over R1. 39 00:02:27,440 --> 00:02:32,150 So, this voltage divider circuit is intended to 40 00:02:32,150 --> 00:02:37,934 reduce V2 down just a little bit so that at the output, 41 00:02:37,934 --> 00:02:42,515 V2 and V1 will experience the same gain, 42 00:02:42,515 --> 00:02:47,800 and this circuit then we'll implement a true subtraction. 43 00:02:47,800 --> 00:02:53,765 All right. So, with that, 44 00:02:53,765 --> 00:02:56,770 let's go ahead and start our analysis of this by doing 45 00:02:56,770 --> 00:03:00,760 exactly what we've done in the other circuits involving amplifiers, 46 00:03:00,760 --> 00:03:05,920 and that is write a node equation summing the currents leaving the inverting terminal. 47 00:03:05,920 --> 00:03:09,940 Again, we'll do it in terms of V sub n until we get things simplify then will substitute 48 00:03:09,940 --> 00:03:14,720 V sub n for V sub p which is going to be V2 times R4 over R3 plus R4. 49 00:03:14,720 --> 00:03:17,665 So, KCL at the node. 50 00:03:17,665 --> 00:03:19,975 We got the current leaving the node going this way. 51 00:03:19,975 --> 00:03:25,525 That's going to be V sub n minus V1 divided by R1, 52 00:03:25,525 --> 00:03:31,175 plus the current going this way through the feedback loop is going to be, 53 00:03:31,175 --> 00:03:33,065 and we're adding that in, 54 00:03:33,065 --> 00:03:38,045 V sub n minus Vout divided by R2. 55 00:03:38,045 --> 00:03:39,980 There's no current going into the inverting terminal, 56 00:03:39,980 --> 00:03:44,415 so we only have those two terms that must add to give us zero. 57 00:03:44,415 --> 00:03:47,270 Now, combining terms and factoring out the V sub n, 58 00:03:47,270 --> 00:03:56,305 then we've got V sub n times one over R1 plus one over R2, 59 00:03:56,305 --> 00:04:06,885 and then we have minus V1 over R1. 60 00:04:06,885 --> 00:04:09,660 We still have this minus Vout over R2, 61 00:04:09,660 --> 00:04:16,320 lets take it to the other side as a positive, Vout over R2. 62 00:04:16,320 --> 00:04:19,070 Now, let's get a common denominator here. 63 00:04:19,070 --> 00:04:28,770 So, we have V sub n times R1 plus R2 over R1 times R2, 64 00:04:28,770 --> 00:04:35,860 minus V1 over R1 equals Vout over R2. 65 00:04:36,590 --> 00:04:42,090 Now, we're going to multiply both sides of the equation by R2, 66 00:04:42,090 --> 00:04:46,130 to solve for Vout and we'll reverse the order of the equation. 67 00:04:46,130 --> 00:04:50,660 We're left with then Vout is equal to, 68 00:04:50,660 --> 00:04:53,650 multiplying both sides by R2, 69 00:04:53,650 --> 00:04:57,030 we have an R2 here that's kind of cancel that R2. 70 00:04:57,030 --> 00:05:07,130 So, we're left with then V sub n times R1 plus R2 over R1, 71 00:05:07,130 --> 00:05:17,640 minus V1 times R2 over R1. 72 00:05:18,290 --> 00:05:20,790 Okay, so we've got the two terms. 73 00:05:20,790 --> 00:05:23,855 We have the inverting term here, 74 00:05:23,855 --> 00:05:26,215 V1 times R2 over R1. 75 00:05:26,215 --> 00:05:28,105 We have V sub n, 76 00:05:28,105 --> 00:05:34,380 now we need to replace V sub n with V2 over 77 00:05:34,380 --> 00:05:41,480 R4 over R3 plus R4 so that we can see the dependency of the output on V2. 78 00:05:41,480 --> 00:05:43,315 Let's do that on up here. 79 00:05:43,315 --> 00:05:47,700 We've got the Vout is equal to V sub n, 80 00:05:47,700 --> 00:05:56,160 then V sub n is equal to V2 times R4 over R3 plus R4. 81 00:05:56,160 --> 00:06:05,355 So that's V sub n times R1 plus R2 over R1. 82 00:06:05,355 --> 00:06:14,880 That's our first term, minus V1 times R2 over R1. 83 00:06:14,880 --> 00:06:18,065 Thus, we see that we have different gain terms. 84 00:06:18,065 --> 00:06:21,870 We've got this multiplying effect here, 85 00:06:21,970 --> 00:06:26,750 minus V1 times R2 over R1. 86 00:06:26,750 --> 00:06:29,290 We've got a couple more steps to take until we get there, 87 00:06:29,290 --> 00:06:31,625 but let's be explicit and show all of our work here. 88 00:06:31,625 --> 00:06:37,505 First of all, let's notice that this term here R1 plus R2 over R1, 89 00:06:37,505 --> 00:06:40,030 R1 is a common denominator to both of them. 90 00:06:40,030 --> 00:06:42,390 That then gives us, 91 00:06:42,390 --> 00:06:44,270 if we identify that as such, 92 00:06:44,270 --> 00:06:50,840 let's just write this then as R4 over R3 plus R4, 93 00:06:50,840 --> 00:06:53,680 times R1 over R1. 94 00:06:53,680 --> 00:07:00,075 That's just one plus R2 over R1, 95 00:07:00,075 --> 00:07:06,070 minus V1 times R2 over R1. 96 00:07:09,920 --> 00:07:14,300 We see that this term right here really is just 97 00:07:14,300 --> 00:07:18,300 that the gain term for the non-inverting amplifier, 98 00:07:18,300 --> 00:07:20,750 there's the gain term for the inverting amplifier. 99 00:07:20,750 --> 00:07:25,940 Here's this voltage divider term which is taking V2 and subdividing it just a little bit. 100 00:07:25,940 --> 00:07:31,040 Now, what we want to do is determine the relationships between R1, R2, R3, 101 00:07:31,040 --> 00:07:36,490 and R4 that will make it so that this gain term right here, 102 00:07:36,490 --> 00:07:41,210 multiplying V2, is the same as the gain term 103 00:07:41,210 --> 00:07:46,505 multiplying V1 with the obvious exception that V1 it's got the minus sign on it. 104 00:07:46,505 --> 00:07:49,855 All right. In order to do that, 105 00:07:49,855 --> 00:07:57,420 we're going to factor in R3 out of the denominator of this term right here. 106 00:07:58,180 --> 00:08:01,795 So, we have then equals 107 00:08:01,795 --> 00:08:07,045 V2 factoring in R3 out and I'm also going to bring the R4 out in front. 108 00:08:07,045 --> 00:08:09,475 So, we'll have, let's see, 109 00:08:09,475 --> 00:08:15,739 R4 over R3 times one 110 00:08:15,739 --> 00:08:19,860 over factor in the R3 that leaves 111 00:08:19,860 --> 00:08:24,070 as a one plus factoring in R4 out there it leads me to R3, 112 00:08:24,070 --> 00:08:27,740 refactoring R3 out of this term here leaves me 113 00:08:27,740 --> 00:08:32,470 an R3 in the denominator or I have a R4 over 114 00:08:32,470 --> 00:08:38,860 R3 times one plus R2 over 115 00:08:38,860 --> 00:08:47,310 R1 minus V1 times R2 over R1. 116 00:08:47,310 --> 00:08:52,640 Kind of a mess but we've got this V2 times R4 over R3 then 117 00:08:52,640 --> 00:08:58,355 multiplying this one divided by one plus R4 over R3. 118 00:08:58,355 --> 00:09:02,840 Then multiplying this one plus R2 over R1. 119 00:09:02,840 --> 00:09:05,765 Just a second, I'm going to ask you to stop the video. 120 00:09:05,765 --> 00:09:07,435 Let me observe first of all, 121 00:09:07,435 --> 00:09:13,035 that this gain term here will equal this gain term here, 122 00:09:13,035 --> 00:09:21,930 if the ratio of R4 over R3 equals the ratio of R2 over R1. 123 00:09:22,160 --> 00:09:29,705 If the ratio R4 over R3 equals R2 over R1, 124 00:09:29,705 --> 00:09:33,560 then this term here in the denominator is the same as 125 00:09:33,560 --> 00:09:38,530 this term here in the numerator and they will cancel. 126 00:09:39,500 --> 00:09:45,710 We're left with simply then Vout is equal 127 00:09:45,710 --> 00:09:52,400 to V2 times again R4 over R3 equals R2 over R1. 128 00:09:52,400 --> 00:09:57,200 So, let's replace it here also, R2 over R1, 129 00:09:57,200 --> 00:10:04,480 minus V1 times R2 over R1. 130 00:10:06,290 --> 00:10:09,750 Now, if we factor out this R2 over R1, 131 00:10:09,750 --> 00:10:12,940 we get then and this is where we've been trying to get this whole way. 132 00:10:12,940 --> 00:10:23,045 Vout then is equal to R2 over R1 times V2 minus V1. 133 00:10:23,045 --> 00:10:27,695 From here, you can see then why this is called a difference amplifier. 134 00:10:27,695 --> 00:10:31,325 The output voltage is equal to a scaled version of 135 00:10:31,325 --> 00:10:37,355 this source voltage minus this source voltage. 136 00:10:37,355 --> 00:10:41,660 The usefulness of this amplifier configuration can't be overstated. 137 00:10:41,660 --> 00:10:44,269 What this allows us to do and it's sometimes 138 00:10:44,269 --> 00:10:47,480 also referred to as a differential amplifier. 139 00:10:47,480 --> 00:10:52,780 It allows or this circuit will sample voltages at 140 00:10:52,780 --> 00:10:58,360 two different points in a circuit and subtract one from the other. 141 00:10:58,360 --> 00:11:04,830 In control circuits, this comparison is used to or they'll 142 00:11:04,830 --> 00:11:11,455 wraps circuitry around it to drive that difference to zero. 143 00:11:11,455 --> 00:11:15,655 This type of an amplifier becomes the core of 144 00:11:15,655 --> 00:11:18,250 feedback systems or control systems where 145 00:11:18,250 --> 00:11:21,640 one voltage is meant to control another voltage. 146 00:11:21,640 --> 00:11:26,980 It also performs the obvious operation of taking one source and 147 00:11:26,980 --> 00:11:33,150 subtracting it from another or adding in depending upon the size of the V1 and V2. 148 00:11:33,150 --> 00:11:37,295 So, if I would say for now this is a very useful amplifier configuration 149 00:11:37,295 --> 00:11:40,550 and you'll see more of it as you go on with 150 00:11:40,550 --> 00:11:44,870 this course and then also into your linear electronics classes.