If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Course: Electrical engineering>Unit 3

Lesson 1: Operational amplifier

Summing op-amp

This op-amp circuit outputs the sum of two input voltages. You can do analog arithmetic on signals. Created by Willy McAllister.

Want to join the conversation?

• couldn't we have achieved summing without an op-amp?
• You can build a circuit with just the three resistors, Ra, Rb, and Rf, without using an amplifier. What you end up with will create some relationship between the input voltages and the output voltage, but it will not be a summing function. The circuit works because the current flowing in Rf is the same as the sum of currents flowing in Ra+Rb. The resistors alone are not able to create that current, so something else has to make that happen (the op-amp). The job of the opamp is to generate whatever voltage is needed at the right end of Rf to make the current in Rf match the currents in Ra+Rb.
• I completed the EE on Khan academy. It was really well taught, thanks to Mr. Willy. All tough concepts were boiled down to simple lessons which can be grasped by anyone.

Modern electronics uses many things like Arduino and sensors, micro controllers, etc. of which I don't know anything yet. Where can I learn about them ?
• When I want to learn about a new chip I search for its data sheet on the web, and read it end to end. The micro controller chip used in the Arduino UNO is made by Microchip. The chip is is an ATmega328. https://www.microchip.com/wwwproducts/en/ATmega328

Another thing to try is search for 'learn arduino'. I did that and found this introduction: https://www.arduino.cc/en/Tutorial/Foundations
You will also come across a zillion examples of things to build.
• Is this also called an integrator or not? What is a differentiator?
• There is an opamp circuit called an integrator, but the summing circuit in this video is not it. An integrating opamp circuit includes a capacitor, typically in the feedback path. Here's an example of an integrator: http://www.electronics-tutorials.ws/opamp/opamp_6.html.

A differentior opamp circuit is less common. The output of a differentiator is the derivative of the input signal. That is, the output voltage is proportional to the slope of the input voltage. Here's an example: http://www.electronics-tutorials.ws/opamp/opamp_7.html
• please, i would like to get courses about modeling a single phase induction motor.
• What is an Integerator and Differentiator op-amp?
(1 vote)
• Hello Dr. Rex,

Start with an inverting op-amp. Here there are two resistors the feedback resistor and the input resistor.

For the integrator replace the feedback resistor with a capacitor. The output of the op-amp will the integration of the input voltage. For example, a small input voltage for a long period of time yields a large output voltage.

For the differentiating op-amp replace the input resistor with a capacitor. Now the output will be the derivative of the input. For example, no output for a DC input. steady output voltage for a ramp input.

Regards,

APD
• This seems like a really slick circuit that could be very handy when needed, but I can't think of a single need for it.
(1 vote)
• The most common application is an amplifier that combines input signals from multiple sources (microphones, guitar, piano, synthesizer, beat generator) into one analog signal that drives speakers.

The first time I used a summing opamp it was to combine three digital signals together to generate an analog television signal, like the one shown here: https://en.wikipedia.org/wiki/Analog_television#Structure_of_a_video_signal.
• Since current flows through the Rf resistor, doesn't that mean that V out has to be negative with respect to ground?
(1 vote)
• Hello Kostas,

Depends. Vout does whatever is necessary to keep the inverting terminal at zero. If Vin is pos then Vout must be neg. If Vin is neg ten Vout is pos.

Note that this is an inverting amplifier.

Regards,

APD
• where's the reading part not the video.
(1 vote)
• Do you mean the transcript? Just click the word "Transcript" next to "About" under the video.
• What happens when your two inputs are sinusoidal and are at different phases?
How would you go about finding the resistances?
(1 vote)
• The summing opamp and it surrounding resistors don't care what shape the input signals are. If you want the sum to be 2A + B = output you design the resistors to do that. The output will be the (nearly) instantaneous sum of the two sine waves, the same as the result of working out the trig function for 2sin(A) + sin(B + phi).
• These are voltage feedback opamp i want to know more about current feedback opamp and its advancement over VFA and application of CFA, can u suggest me some source to learn it.
(1 vote)

Video transcript

- [Voiceover] Another form of an op-amp circuit is called the summing op-amp. We're gonna work through how this one works. Let's draw in here now is an inverting op-amp circuit with a single input. We're gonna call this this will be V. We'll call the VA for now. And we have V out. And we worked out what how this worked before where V out was a function of VA times the ratio of these two resistors. And now I'm gonna add a little twist to this and we're gonna analyze a different kind of circuit. So I'm gonna add another resistor right here. Like this. And a second input. We'll call this VB. And so I have RB, or sorry, RA here. This will be RB. And we'll call this R feedback. And the question again is now, what is V out in terms of the inputs, VA and VB? We're gonna use the idea of a virtual ground. Virtual ground. The idea of a virtual ground applies to most op-amp circuits, and it's a really useful way to simplify the analysis. And when we use a virtual ground one of the things I like to do is just draw a little symbol here like that, for my virtual ground. The virtual ground, as a review, if the voltage coming out of this op-amp is in a reasonable range, sort of a plus or minus 10 volts, or something like that. And because the gain of this op-amp is so enormous on the order of 100,000, or a million that means that, when this is working properly that these two voltages will be really close together. They'll be only microvolts apart, at most. And, because they're so close we can just say, let's just say they're the same for the purposes of analyzing this circuit. And, since this input is at zero volts this is at zero volts. That means that this input is very close to zero volts. So this node here this node here, we say is at a virtual ground. So let's move ahead, let's analyze this circuit and what we want to find is we want to find V out as a function of VA and VB. Let's see if we can do that. So looking at my circuit the other thing I know about op-amps that's really important always is, that the current going into an op-amp input is zero, or practically zero. And for the purposes of what we're doing here we can treat it as zero. All right. So, we have zero volts on this node. We have zero current going this way. So let's go after let's go after this current right here. Let's figure out what that is. So we'll call that I. And we can express I in terms of VA and VB in these two resistor values. So we can write I equals, now what is it? Well, we have IA here. And we have IB flowing here. That means that I equals IA plus IB. All right. And let me write IA and IB in terms of Ohms Law here. So we get I equals, what is IA? IA is this voltage divided by RA. And this voltage is VA minus zero volts. So it's VA over RA. And now let's write down what's IB? IB we look at this voltage here. This voltage is VB minus zero. Or just plain VB over RB. All right, so that's one step. We've written this current in terms of what's going on on the input side over here. Now one thing we know, because this current is zero, we know, what? We know this current is I. And, if I's going into RF we'll label the voltage on RF like that. So now let's write an expression for I in terms of RF and this voltage here. What is this voltage here? Well, let's look at the two ends. This is zero volts on this node here. And on this side it's V out. So, the current there, the current on that side equals it's zero minus V out. So minus V out divided by RF. That's Ohms Law for this resistor right here. Now we know that this current equals this current. So let's just set these two expressions together. So I'll do that over here. I can write minus V out over RF equals this one VA over RA plus VB over RB. Now we can get the final function I'm just gonna multiply through by RF on both sides. And we get V out equals take the minus sign with us minus RF over RA times VA plus RF over RB times VB. So that's our answer. That's V out as a function of VA and VB, the two inputs. And you can see that the resistor ratio, there's two resistor ratios here, that are participating in the answer. So it helps to do a little special case of this. Let's let all the resistors be the same. So we'll say that RA equals RB equals RF. And just to pick a real number we'll just say they're all equal to 10 K ohms. And let's see what this becomes now. Now we have V out equals, we still have the negative sign. So this is some sort of inversion going on here. RF over RA is one. So it's just VA. And RF over RB is one. So this says VB. So this is what gives us the nickname for this expression which is called a a summing op-amp. Let's say I want to use my summing op-amp in an application where what I want is I want V out to equal say minus two times VA plus three times VB. Okay, this is what I want. How do I do that? So, these two coefficients here are functions of the resistor values. That was our original expression up here. So what I want is RF over RA to equal two. And I want RF over RB to equal three. So I can pick values it's the same RF and so I get to adjust RA and RB in here. So I can pick component values. So if I pick RF equals 12 K ohms. Then I can pick RA equals six K. And RB equals four K. And that would give me the ratios I want and that would implement this function here. So I'm gonna go fill those out on the top schematic. We'll just write those in. And we'll go fill these in here. So what we said was RF was 12 K. RA was six K ohms. RB would be four K ohms. And we've designed a circuit that implements our summing function. So, so this is a pretty useful op-amp circuit.