# Op-Amp basic problem with a LED diode

Gold Member

## Homework Statement

http://img822.imageshack.us/img822/1859/theque.jpg [Broken]

Given the following circuit, including an Op-Amp and a LED diode. The voltage on the LED diode is 1.4 Volt. In your solution assume that the Op-Amp is ideal

## Homework Equations

(In the solution...)

## The Attempt at a Solution

Did I get it?

http://img12.imageshack.us/img12/2056/thecircuitmine.jpg [Broken]

Last edited by a moderator:

Ah! no
V at the -input = +2V (that battery)
So current through R1 = 2V/2kΩ =1mA
So 1mA flows from output of amp towards the -input
making the voltage across R2 = 1mA x 10kΩ =10V
Voltage at output = 10V + 2V (that battery) = 12V (this is only just OK...it is less than +13V supply)
So voltage across RL = 12 -1.4 = 10.6V
So output current through LED = 10.6/2kΩ = 5.3mA which is about right for an LED

Gold Member
V at the -input = +2V (that battery)
So current through R1 = 2V/2kΩ =1mA

Hmm, I think I get it, because NO voltage is listed at the +end, Vout = 2V (based on the minus leg).

So 1mA flows from output of amp towards the -input

How does it get to the -input? I don't understand the current pathway.

Like this ...

http://img64.imageshack.us/img64/12/pathway1.jpg [Broken]

Or that?...

http://img195.imageshack.us/img195/7198/pathway2.jpg [Broken]

Not this time, but as a part of the bet I get to do more physics

Last edited by a moderator:
Here is another way without talking about the current.
This is an inverting amplifier and the Voltage gain is given by -R2/R1.
(you made a mistake with Vout = R2/(R1+R2) xVin.... that is for a non-inverting amplifier)

So the voltage gain = 10kΩ/2kΩ =x5
So Vout = 5xVin. But Vin = +2V (that battery) Vout = 10V BUT this is actually the voltage across R2 So the voltage out must be 10 + 2 = +12V

Remember NO current can flow into or out of the - or + inputs
Your last diagram would be perfect if you removed the blue line coming from the battery and going to the right. The blue lines with arrows are perfect.

Keep winning bets

Gold Member
Here is another way without talking about the current.
This is an inverting amplifier and the Voltage gain is given by -R2/R1.
(you made a mistake with Vout = R2/(R1+R2) xVin.... that is for a non-inverting amplifier)

Well, that's just voltage divider, regardless of what type of op-amp, no?

Remember NO current can flow into or out of the - or + inputs
Your last diagram would be perfect if you removed the blue line coming from the battery and going to the right. The blue lines with arrows are perfect.

I'm not sure why I should remove it. It is what happening, no?

So the voltage gain = 10kΩ/2kΩ =x5

Wait, but you earlier said...

the Voltage gain is given by -R2/R1.

So shouldn't it be -10kΩ/2kΩ?

You are asking very very good questions !!
I will try to deal with your middle question first
Remember NO current can flow into or out of the - or + inputs
Your last diagram would be perfect if you removed the blue line coming from the battery and going to the right. The blue lines with arrows are perfect.

Your blue line from the + on that battery shows a current flowing into the +input.... against the rules !!!

The voltage gain has a VALUE of 10/2 =5 and I was a bit sloppy not putting the -sign.
This -sign can be very confusing!! It means that the OUTPUT changes in the OPPOSITE direction to the input voltage. If you look at the voltage on the -input (with that battery connected) it is +2V. The other end of the resistor R1 is connected to 0V (the earth or ground symbol).
This means that the left hand end of R1 is DOWN compared to the right hand end of R1 (by2V)
This means that the output must be UP (this is what the -sign means). It is up by a factor of 5 so it is 5x2 greater than2 (I hope that makes sense) = 12V

The answer to your first question is voltage at - input MUST = voltage at +input (the +2V battery)

Can't wait for your next question

berkeman
Mentor
Ah! no
V at the -input = +2V (that battery)
So current through R1 = 2V/2kΩ =1mA
So 1mA flows from output of amp towards the -input
making the voltage across R2 = 1mA x 10kΩ =10V
Voltage at output = 10V + 2V (that battery) = 12V (this is only just OK...it is less than +13V supply)
So voltage across RL = 12 -1.4 = 10.6V
So output current through LED = 10.6/2kΩ = 5.3mA which is about right for an LED

Please do not do students' homework for them here at the PF. You should have pointed out the error and given a hint, and that should have been enough for Femme to continue doing the work.

I like Serena
Homework Helper
Hi Fp!

I'm trying to see if I can help you, but I don't understand yet what you wrote down.

You're using the symbols $V_{in}, V_{out}, A_f$, but what are they?
Can you perhaps mark them in your drawing?
And where did the $1.4$ come from?

AlephZero
Homework Helper
How does it get to the -input? I don't understand the current pathway.

Like this ...

http://img64.imageshack.us/img64/12/pathway1.jpg [Broken]

No. The question says use the IDEAL op amp model. That says NO current flows into either of the inputs.

Of course in real life op amps are not "ideal" and there is a tiny amount of input current, but it is so small you can usually ignore compared with everything else. The resistance between the input pins of a real op amp could be anything between say 5 MOhms for a cheap low spec part like a 741, up to more than 100 MOhms. Even with a 5 MOhm resistance, the input current would be several orders of magnitude less than the milliamps flowing in the rest of the circuit.

That's better, but still not quite right. You don't have any current flowing into the - input, but you still showed a current flowing into the + input and through the op amp somehow.

With the ideal op amp assumptions, the 2V battery doesn't have any current flowing through it. What it does is make the + input have a potential of 2V, and the op amp then makes the - input also have a potential of 2V. The output voltage and current from the op amp is "whatever it takes" to keep the - input pin at 2V.

Last edited by a moderator:
Gold Member
You are asking very very good questions !!
I will try to deal with your middle question first
Remember NO current can flow into or out of the - or + inputs
Your last diagram would be perfect if you removed the blue line coming from the battery and going to the right. The blue lines with arrows are perfect.
That's better, but still not quite right. You don't have any current flowing into the - input, but you still showed a current flowing into the + input and through the op amp somehow.
No. The question says use the IDEAL op amp model. That says NO current flows into either of the inputs.

Then what's the point of the 2 voltage battery? It has NO WHERE TO GO. It's stuck. It's useless.

The voltage gain has a VALUE of 10/2 =5 and I was a bit sloppy not putting the -sign.
This -sign can be very confusing!! It means that the OUTPUT changes in the OPPOSITE direction to the input voltage. If you look at the voltage on the -input (with that battery connected) it is +2V. The other end of the resistor R1 is connected to 0V (the earth or ground symbol).
This means that the left hand end of R1 is DOWN compared to the right hand end of R1 (by2V)
This means that the output must be UP (this is what the -sign means). It is up by a factor of 5 so it is 5x2 greater than2 (I hope that makes sense) = 12V

Bit lost you, tbh! Do you mean to tell me that currents flow to the all the grounds in the circuit?

And how come you determined it's a factor of 5? By doing Af = 1 - 10000/2 = 5?

Hi Fp!

I'm trying to see if I can help you, but I don't understand yet what you wrote down.

You're using the symbols $V_{in}, V_{out}, A_f$, but what are they?
Can you perhaps mark them in your drawing?
And where did the $1.4$ come from?

http://img72.imageshack.us/img72/1812/voutin.jpg [Broken]

But i know now it can't be true because you said no current goes into the Op-Amp.

I can't mark Af because it's the amplification factor of the Op-Amp.

1.4 is the voltage across the LED.

Last edited by a moderator:
I'll add that because you are assuming that the op amp is ideal, then
$$V_+=V_-$$
and the 2V appears at both of the inputs.

gneill
Mentor
The 2V battery has the job of setting the potential with respect to ground at the + input of the opamp. No current need flow to have a particular potential. This potential is used as a reference level by the opamp. (Imagine a little guy inside the opamp looking out a closed porthole at a voltmeter outside connected to the + lead. He takes the reading and passes it on to the rest of the gang inside the opamp. No current comes in through the window!)

You'll notice that the circuit has a path from the opamp output back to its - input via resistor R2. This is known as a feedback loop. The opamp will adjust its output voltage until the voltage on the - input matches what it sees on its + input. When this is accomplished (and very quickly indeed with an infinite gain ideal opamp!) both inputs will be at +2V. This is a typical mode of operation for an opamp.

Gold Member
I'll add that because you are assuming that the op amp is ideal, then
$$V_+=V_-$$
and the 2V appears at both of the inputs.

Right! I thought it's because a comparator op-amp....in all op-amps it's like that?

The 2V battery has the job of setting the potential with respect to ground at the + input of the opamp. No current need flow to have a particular potential. This potential is used as a reference level by the opamp. (Imagine a little guy inside the opamp looking out a closed porthole at a voltmeter outside connected to the + lead. He takes the reading and passes it on to the rest of the gang inside the opamp. No current comes in through the window!)

What? How? Are we living in a sci-fi universe where electrical components can pass messages without passing current? telekinesis?

You'll notice that the circuit has a path from the opamp output back to its - input via resistor R2. This is known as a feedback loop. The opamp will adjust its output voltage until the voltage on the - input matches what it sees on its + input. When this is accomplished (and very quickly indeed with an infinite gain ideal opamp!) both inputs will be at +2V. This is a typical mode of operation for an opamp.

OK, let me see the math for it again. I'll start with the TYPE of amplifier because I got the feeling this is a NON-INVERTING amplifier. Look,

http://img36.imageshack.us/img36/585/typeof.jpg [Broken]

In both of them voltage goes through the plus

Last edited by a moderator:
I like Serena
Homework Helper
But i know now it can't be true because you said no current goes into the Op-Amp.

I can't mark Af because it's the amplification factor of the Op-Amp.

1.4 is the voltage across the LED.

Voltage doesn't "go". It "is".
Current "goes".

Voltage is like "height" on a mountain.
Current is like water that "flows" from the mountain.

By telekinesis the little electrical men in the op-amp can see how "high" things look outside of the op-amp.
Didn't you get the memo?

When the little men see that there is a difference in height on the inputs, they start creating current that they push out of the output, hoping that will reduce the difference in height.

OK, let me see the math for it again. I'll start with the TYPE of amplifier because I got the feeling this is a NON-INVERTING amplifier. Look,

http://img36.imageshack.us/img36/585/typeof.jpg [Broken]

In both of them voltage goes through the plus

In this particular case you can choose.
You can either choose the INVERTING amplifier or the NON-INVERTING amplifier.
This is because you don't have an actual signal, just a constant voltage.

It does help if you write which one you're using and write the corresponding formula down.

Last edited by a moderator:
Gold Member
Voltage doesn't "go". It "is".
Current "goes".

Voltage is like "height" on a mountain.
Current is like water that "flows" from the mountain.

By telekinesis the little electrical men in the op-amp can see how "high" things look outside of the op-amp.
Didn't you get the memo?

When the little men see that there is a difference in height on the inputs, they start creating current that they push out of the output, hoping that will reduce the difference in height.

But I feel like I'm getting the little kids explanation instead of what's really going on explanation. I'm still not sure how the Op-Amp knows, but I do know there are no little men in it. Should I just accept it as is and go with the little men explanation?

This is because you don't have an actual signal, just a constant voltage.

I'm afraid I don't know what is the difference between "actual signal" and "constant voltage"..?

I like Serena
Homework Helper
But I feel like I'm getting the little kids explanation instead of what's really going on explanation. I'm still not sure how the Op-Amp knows, but I do know there are no little men in it. Should I just accept it as is and go with the little men explanation?

I'd go with the little men explanation.

But I'll try to explain anyway.

An op-amp is like a transistor.
A small base current on a transistor opens the gate for a much larger current to flow from collector to emitter.
An op-amp is built from a lot of transistors in such a way that this effect becomes much stronger.

The inputs do draw current in practice, just like the base current of a transistor.
But it is negligibly small compared to the current that starts flowing out of the op-amp, which is drawn from the independent power supply of the op-amp.

I'm afraid I don't know what is the difference between "actual signal" and "constant voltage"..?

With an actual signal I mean a voltage that varies in time, giving rise to different (negative or positive) amplifications.
A constant voltage is equivalent to the ground, and indeed can be used instead of a ground.

Gold Member
I'd go with the little men explanation.

But I'll try to explain anyway.

An op-amp is like a transistor.
A small base current on a transistor opens the gate for a much larger current to flow from collector to emitter.
An op-amp is built from a lot of transistors in such a way that this effect becomes much stronger.

The inputs do draw current in practice, just like the base current of a transistor.
But it is negligibly small compared to the current that starts flowing out of the op-amp, which is drawn from the independent power supply of the op-amp.

Fair enough. So, if an ideal op-amp was real no current would've flown throughout the circuit at all, right? Because that tiny bit of current that escapes really makes the entire process run.

With an actual signal I mean a voltage that varies in time, giving rise to different (negative or positive) amplifications.

That has to do with an AC source, no?

A constant voltage is equivalent to the ground, and indeed can be used instead of a ground.

hmm...well, it's not a question that's modeled on time or AC current, so that's the part that makes it obvious that it's a constant current?

I like Serena
Homework Helper
Fair enough. So, if an ideal op-amp was real no current would've flown throughout the circuit at all, right? Because that tiny bit of current that escapes really makes the entire process run.

Yep!

That has to do with an AC source, no?

For instance.

But I'll give a better example.
In your other thread with the block diagram, you have a temperature sensor.
It measures the temperature and transmits it on an electrical wire.
High temperature is high voltage, low temperature is low voltage.

This really is a signal.

hmm...well, it's not a question that's modeled on time or AC current, so that's the part that makes it obvious that it's a constant current?

Yes.

I like Serena
Homework Helper
Now that I know what your symbols are, I can tell you that your original work was fine, except for the first formula.
Your first formula does not relate Vin properly to Vout.

Gold Member
Wait, I'm still not sure how in this case I can choose between inverting and non-inverting, and in other cases I can't choose.

Are you saying that in those two I have a signal?

http://imageshack.us/photo/my-images/36/typeof.jpg/

I don't see an AC current source, and I don't see some temperature sensor in those.

How can I tell?

Now that I know what your symbols are, I can tell you that your original work was fine, except for the first formula.
Your first formula does not relate Vin properly to Vout.

So according to this:

http://img805.imageshack.us/img805/2741/shouldberight.jpg [Broken]

I just do this:

http://img521.imageshack.us/img521/1165/solsolsolsol.jpg [Broken]

Yes?

Last edited by a moderator:
NascentOxygen
Staff Emeritus
and the 2V appears at both of the inputs.
Right! I thought it's because a comparator op-amp....in all op-amps it's like that?
Op-amps have very high gain, and negative feedback causes the voltage on one input to be practically exactly equal to the voltage on the other input. If this ever turns out not to be the case, then the op-amp output is saturated (at the level of one of the supply rails) and the op-amp is not functioning as a linear amplifier.

Op-amps have high input impedance, so practically no current flows into the input terminals of the 'chip' itself.

If your external input signal is delivered via a resistor to the (-) input terminal of the op-amp linear amplifier, then you have an inverting amplifier. The dc bias applied to the (+) terminal is not the external signal.

In the upper circuit Vout/Vin = Rf/Rin ...this is the normal voltage gain of an inverting amplifier.
You have not met a resistor like the one connected to the +input and it has no effect on the gain of the amplifier.
It is there for a very sophisticated reason that has not been mentioned in any responses yet. At an advanced level it is preferrable if both the - and the + inputs have the same effective resistance ('see' the same resistance). All along you have heard that the ideal amplifier has infinite input resistance.... this is a good assumption but it is only an assumption. If the input resistance (in the amplifier) into the - and + inputs is not equal then due to tiny currents it is possible for stray voltages to be produced between the - and + inputs. These stray voltages will be amplified and could produce unwanted 'offset' voltages. That resistor from + to ground is to reduce this effect.
This sounds complicated and is something at the next level you will need to appreciate.

I like Serena
Homework Helper
Wait, I'm still not sure how in this case I can choose between inverting and non-inverting, and in other cases I can't choose.

At the inputs of an op-amp usually one leg is connected to a constant voltage, and the other leg is connected to some input Vin.

In your case both legs are connected to a constant voltage, leaving the choice what you call Vin up to you.

Are you saying that in those two I have a signal?

http://img36.imageshack.us/img36/585/typeof.jpg [Broken]

I don't see an AC current source, and I don't see some temperature sensor in those.

How can I tell?

In these drawing you do not have an AC current source or a temperature sensor.
They would be outside the scope of the drawing, but they would be connected to the point marked Vin, since they would be an input to the circuit.

Careful here.
The formulas you have belong to the figure at the bottom.

Yes, you can do this.

Except that you did not fill in the values of Rin and Rf properly, giving you the wrong answer.

Last edited by a moderator:
Gold Member
At the inputs of an op-amp usually one leg is connected to a constant voltage, and the other leg is connected to some input Vin.

In your case both legs are connected to a constant voltage, leaving the choice what you call Vin up to you.

Whenever we have "ground", though, doesn't it mean voltage there is defined to be 0? Or can it be anything?

In these drawing you do not have an AC current source or a temperature sensor.
They would be outside the scope of the drawing, but they would be connected to the point marked Vin, since they would be an input to the circuit.

Aha! But see, how do I know that? How I do know that outside the scope of the drawing there really is an AC current source or a temperature sensor? Do I just assume that if I see a op-amp with ground on one leg and Vin on another leg?

Careful here.
The formulas you have belong to the figure at the bottom.

Noted, but you said it's irrelevant since I can choose what my op-amp is in this case, right?

Yes, you can do this.

Except that you did not fill in the values of Rin and Rf properly, giving you the wrong answer.

So

Vin = Vout x Rin/Rf+Rin

2 = 2000vout / 12000

24000 = 2000Vout

Vout = 12V

Got it?

I like Serena
Homework Helper
Whenever we have "ground", though, doesn't it mean voltage there is defined to be 0? Or can it be anything?

"Ground" is usually defined as zero.
And the formulas that come with an op-amp circuit assume that.

But if you want, you can choose any constant voltage in your circuit to be zero.
I recommend you avoid this though, since it is easy to make mistakes if you do.

Aha! But see, how do I know that? How I do know that outside the scope of the drawing there really is an AC current source or a temperature sensor? Do I just assume that if I see a op-amp with ground on one leg and Vin on another leg?

You don't know what is or will be connected to Vin, so yes, you just assume so.

Noted, but you said it's irrelevant since I can choose what my op-amp is in this case, right?

Yes.

So

Vin = Vout x Rin/Rf+Rin

2 = 2000vout / 12000

24000 = 2000Vout

Vout = 12V

Got it?

Yep!

Gold Member
"Ground" is usually defined as zero.
And the formulas that come with an op-amp circuit assume that.

But if you want, you can choose any constant voltage in your circuit to be zero.
I recommend you avoid this though, since it is easy to make mistakes if you do.

I will avoid it then, and consider ground to be zero.

You don't know what is or will be connected to Vin, so yes, you just assume so.

Aha. Didn't know that's the general assumption, thanks

So, solved thanks so much.

I like Serena
Homework Helper
Final scan. I forgot the question actually asked for IL. I hope I got it?

I already wondered if you had done that, but you said you solved it.

Btw, who or what is IL?

Gold Member
I already wondered if you had done that, but you said you solved it.

I meant I solved Vout, oops!

IL is the current flowing through RL

I like Serena
Homework Helper
I meant I solved Vout, oops!

IL is the current flowing through RL

Ah, okay.
I was also wondering what the question of the problem was, since it was missing from your OP.

Which resistor is RL?
In your diagram you have 2 of them, one of 2 kOhm, and one of 1 kOhm.

Is that intended?

Gold Member
Ah, okay.
I was also wondering what the question of the problem was, since it was missing from your OP.

Ah, was it? Heh, my bad...

Which resistor is RL?
In your diagram you have 2 of them, one of 2 kOhm, and one of 1 kOhm.

Well, I've made a mistake in my last sketch drawing 2 resistors called RL. One of them shouldn't be there. Here's the corrected version with me pointing out the RL.

http://img839.imageshack.us/img839/4700/therez.jpg [Broken]

----------

FULL correction

http://img194.imageshack.us/img194/3141/dd750full.jpg [Broken]

Is that intended?

That's mili-ampere.

Last edited by a moderator:
I like Serena
Homework Helper
Ah, was it? Heh, my bad...

Well, I've made a mistake in my last sketch drawing 2 resistors called RL. One of them shouldn't be there. Here's the corrected version with me pointing out the RL.

http://img839.imageshack.us/img839/4700/therez.jpg [Broken]

Oh there it is (x)! :tongue:

FULL correction

http://img194.imageshack.us/img194/3141/dd750full.jpg [Broken]

That's mili-ampere.

Looks good now, except for the micro-ampere, or if that is an "M", the mega-ampere.
An "m" should have round caps!
Just like a pi should have nice legs when you use it!

Last edited by a moderator:
I like Serena
Homework Helper
Oh, and wait!

You used Vin, Vout, Rin, and Rf in your calculations, but they are not in your drawing!!!
Nor do you explain why and how you use them.

Gold Member
Looks good now, except for the micro-ampere, or if that is an "M", the mega-ampere.
An "m" should have round caps!
Just like a pi should have nice legs when you use it!

Well according to this it's just mA

http://www.convertunits.com/info/mili+ampere
Oh, and wait!

You used Vin, Vout, Rin, and Rf in your calculations, but they are not in your drawing!!!
Nor do you explain why and how you use them.

Vin = V1
Rf = R2
Rin = R1
Vout = well it doesn't really equal anything. it's just Vout :P

I like Serena
Homework Helper
Well according to this it's just mA

http://www.convertunits.com/info/mili+ampere

Well it looks like either μA or MA, but is should be mA.