# Homework Help: Operational Amplifier Comparator Circuit

1. Feb 22, 2017

### Taniaz

1. The problem statement, all variables and given/known data
The variation with time t of the potential Vin at the inverting input of the op-amp is shown in Fig. 10.2.
On the axes of Fig. 10.2, draw the variation with time t of the output potential of the op-amp.
(pictures attached)

2. Relevant equations
The potential divider equation to find the V+ (the non inverting input)

3. The attempt at a solution
I know the graph has to look like a square hat function and I know that 5 V will be the saturation limit but I'm not entirely sure where the graph starts or the important part of the graph or why they've drawn the 1.0 V line on the graph.
Please help. Thank you.

#### Attached Files:

File size:
100 KB
Views:
79
• ###### Screenshot 2017-02-22 at 19.41.57.png
File size:
111.9 KB
Views:
62
2. Feb 22, 2017

### Staff: Mentor

Examine the op-amp circuit. What type of configuration is this? What determines the threshold value where the circuit changes states?

By the way, I plan to change the name of this thread to make it more specific (too general thread names are not allowed). I'll change it after you've answered

3. Feb 22, 2017

### Taniaz

It's an inverting amplifier. So Vout is negative when the input voltage is positive. What do you mean by changes state?
Sure, sorry, I wanted to write something specific but I forgot while writing the thread.

4. Feb 22, 2017

### Staff: Mentor

Examine the circuit closely. Is there a feedback path? When exactly will the opamp output voltage change?

5. Feb 22, 2017

### Taniaz

There is a feedback path and if I'm not mistaken, is it going to the non inverting output?
It changes when the inputs are not the same?

6. Feb 22, 2017

### Staff: Mentor

Nope. Ground is not a feedback path. No signal can pass through ground and have a potential with respect to ground.
True. So what sets the threshold value? What potential is at the +input?

7. Feb 22, 2017

### Taniaz

So then it doesn't seem to have a feedback system because Vout is not connected to the inverting input either.

The + potential is 1.0V, I calculated that using the potential divider equation
V+ = (1.5x2.4)/(1.2+2.4) = 1.0 V.

What is the voltage of the - potential?

8. Feb 22, 2017

### Staff: Mentor

Correct.
What is it defined to be in the problem statement?

General hint: Look up "op amp comparator circuit"

9. Feb 22, 2017

### Taniaz

Is it 5 V? I'm not so sure about this one.

According to the graph, the highest it can be is 4 V and the lowest is 0 V

10. Feb 22, 2017

### Staff: Mentor

No.
Right. So pick a few values along the curve and decide what the op-amp output will be for those values of the input.

11. Feb 22, 2017

### Taniaz

So when Vin = 2V, Vout= V+ - V- = 1 - 2 = -1 V but what is the gain? Since it's an idea op-amp that means the gain is infinite but isn't Vout = G (V+ - V-) how do I substitute for the gain as it's infinite?

V+ will always be 1 V in this case? Because the resistances don't change?

12. Feb 22, 2017

### Taniaz

Also, I don't get a value of Vout as 5 V, the maximum it goes is from -3V till 1 V

13. Feb 22, 2017

### Staff: Mentor

While the gain may be very large (infinite for an ideal op amp), a real op amp has real-life constraints. What limits a real operational amplifier's output excursions?
Yes.

You need to follow the hint I provided in post #8. A little research will answer all your questions

14. Feb 22, 2017

### Taniaz

I don't get a value of Vout as 5 V at any point, the maximum it goes is from -3V till 1 V

15. Feb 22, 2017

### Staff: Mentor

You're not accounting for the open-loop gain of the op amp (infinite for the ideal op amp, but still very large for a real op amp).

16. Feb 22, 2017

### Taniaz

If V+ is greater is magnitude than V-, the comparator will just take the value equal to the positive power supply voltage and if V+ is slightly smaller in magnitude than V- then Vout will be equal to the negative power supply voltage?

So what I did by taking values and subtracting them to find Vout was wrong?

17. Feb 22, 2017

### Taniaz

If my above comment is true, what happens if both voltages are the same?
And in this case, the function does appear like a top hat function

18. Feb 22, 2017

### Staff: Mentor

Don't use "magnitude" here. Polarity is important. If the potential at the V+ is greater than the potential at V- then the output will head to the +5 V rail. If the potential at V+ is less than the potential at V- then the output will go to the -5V rail. (The word "rail" for the power supply voltages is used here as it sets the limits constraining the output swing. The op amp output is constrained to lie between the rails, so to speak).
Finding the potential difference at the inputs is the first step. You then have to translate that potential difference into a resulting output. That's where the gain and limiting factors (rails) come in.

19. Feb 22, 2017

### Taniaz

What happens if both voltages are the same?
And this time, the graph does appear like a top hat function

20. Feb 22, 2017

### Staff: Mentor

Then the output will be zero. Depending upon the gain of the op amp there is a tiny voltage range where it can behave as a traditional inverting amplifier. The potential difference would have to be less than the rail voltage divided by the open loop gain. So if the gain of the op amp were say, 100,000, and the rail voltage 5 V, the input difference would need to be less than 50 μV for the circuit to operate as a linear amplifier.

21. Feb 22, 2017

### Taniaz

Ok so how will I show this on my graph? Are they the vertical lines of the top hat function? My top hat function doesn't look very uniform, the negative part is longer than the positive part for some strange reason.

22. Feb 22, 2017

### Staff: Mentor

There's nothing to show for this, it's covered by the vertical transitions as you surmised.

With the given input signal the output transition from rail to rail will be all but instantaneous for an ideal op amp. As long as the gain is sufficient and the input signal not of too high a frequency you won't see the "linear mode" effects in the output.

Can you post an image of your results?

23. Feb 22, 2017

### Taniaz

So this is what I got

#### Attached Files:

• ###### 16924135_10155033150388838_1131212196_n.jpg
File size:
75.3 KB
Views:
47
24. Feb 22, 2017

### Staff: Mentor

Yes, that looks fine.

25. Feb 22, 2017

### Taniaz

So much more clearer to me now, thank you so much for your help

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted