# Homework Help: Op amps as comparators

1. Feb 28, 2014

### rms5643

Edit: I solved it, and found that it should be 30v because that causes a 24v drop across 40kohm resistor which is 6v, which is equal to the voltage at the non inverting terminal, meaning Vout will be +VSat, but I don't understand why this is correct, because my notes say that if the voltage at the non inverting terminal is greater than the voltage at the inverting terminal, then Vout will be +VSat, which is what we want to power the LED, but assuming the opposite that is, assuming Vout will be +VSat if the inverting terminal is **greater** than the non inverting terminal led to the correct answer. I do not understand why, though

1. The problem statement, all variables and given/known data
For the circuit below, to what value would the 5 V source have to be changed so that the LED lights when Vin reaches 9V?
Figure: http://i.imgur.com/1AIQvVy.jpg

2. Relevant equations
Vout = -VSat if VRef > VSignal
Vout = VSat if VRef < VSignal

3. The attempt at a solution
I used voltage division to find VRef and VSignal:
40000/(40000+10000)*5=V drop across 40kΩ = 4
3000/(3000+6000)*9=V drop across 3kΩ = 3

Then, VRef = 5v-4v = 1v, and VSignal = 9v-3v = 6v

As 6v > 1v, Vout = VSat, which should power on the LED, which means the 5 V source should not have to be changed.

Though, this clearly circumvents what this problem is trying to show me so I think there's something fundamental I am not understanding about comparator op amps.

Last edited by a moderator: Feb 28, 2014
2. Mar 1, 2014

### Staff: Mentor

The op-amp doesn't share your confusion.

Each source, in conjunction with its associated potential divider, places a voltage at an input of the op-amp. If the voltage on the + input is more positive than the voltage on the - input, the op-amp output will be at +ve saturation. Just as you say you were told.

Your approach to potential dividers needs re-examining.

3. Mar 1, 2014

### rms5643

So, my understanding of voltage division is the following:
Suppose you have a circuit with a voltage V and two resistors R1 and R2 shown as follows:

--R1--
|......|
V.....R2
|......|
-------

Then, the voltage drop across R1 is defined as follows: Vr1=R1/(R1+R2)*V
And the voltage drop across R2 is defined as follows: Vr2=R2/(R1+R2)*V

So, applying this to the circuit above, the voltage drop across the 40kΩ resistor is defined to be:
40,000/(40,000+10,000)*5=4

So, that means that there is a 4v drop across the 40kΩ resistor. So the voltage at the inverting terminal is Vin minus the drop across the 40kΩ resistor, or 5-4=1v

Doing the same for the non inverting terminal:
3,000/(3,000+6,000)*9=3,
Thus, the voltage at the non inverting terminal is 9-3=6v.

Since the voltage at the non inverting terminal is greater than the voltage at the inverting terminal, Vout is equal to +VSat, which would turn on the LED.

4. Mar 2, 2014

### Staff: Mentor

All clear now?