Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

comparator circuit

Status
Not open for further replies.

bmace36

New Member
I have this circuit, and I need to find the voltage at TP1 that will result in CR1 turning on. Can anyone help
 

Attachments

  • problem 13.pdf
    95 KB · Views: 341
If I do the math for the R5, R6, and R7, I get 7v on the top comparator and 6v on the bottom. The reference voltage would be 7v for the top and 6v for the bottom.
 
Last edited:
If I do the math for the R5, R6, and R7, I get 7v on the top comparator and 6v on the bottom.

That is correct.

JimB
 
Obviously the top comparator changes state when it's input goes past 7V and the bottom comparator changes state when the input goes past 6V. It's called a window comparator.
 
Hi,

Maybe i looked at this too fast, but it looks like something is wrong with the question here or the schematic.

BOTH non inverting comparator inputs have a positive voltage applied, which is greater than 0v. With 0v input to the circuit, BOTH comparator outputs will be high. With both outputs high, the opto never turns on. With the opto off, CR1 is also off. Since they state that CR1 is on, something must be wrong that keeps CR1 on when it should be off. Thing is, there is more than one single component failure that could cause this problem.

So how can we ask the the question "which component has failed?" when it could have been one of several components or several components together that have failed.
Perhaps they are asking for a list of possible component failures?

Any ideas?

If the question really is just what TP1 voltage turns the CR1 device on when everything is working right, then yes it just involves a little voltage divider theory. The .pdf asks a different question though, which is also interesting.
 
Last edited:
Al,

The circuit works fine as it is displayed. The question is about the input voltages that operate the circuit, and it could be a "trick" question for someone not exercising due diligence with this circuit.

As far as the failure ... it probably should be in a list from most likely to least likely.

The complete question, as asked by the instructor would have been helpful.
 
Hi,
According to R5, R6 & R7, U2A output is high & U3b output low only when the voltage at U2a pin 4, V_in satisfies 6v < V_in < 7v (both bounding voltages w.r.t. ground).
Component failure, usually means (for a resistor or capacitor or diode) an open circuit. But what about for a transistor or op-amp or comparator ? If R1, R2,...R7 are each in turn replaced by a 20 Meg resistor (ie open circuit for all practical purposes), U2A out = U3b out for each case. So the failed component cannot be a resistor.

So we're back to my earlier question. In searching for answers I found this:
https://books.google.co.uk/books?id...EwAA#v=onepage&q=op amp failure modes&f=false

For a failed U1a the possible output voltages are: +15v, 0v & -15v w.r.t. ground. Since none of these satisfies the above boundary conditions for V_in, U1a isn't the failed component, and V_in must be 0v.
If U2a has failed then U3b hasn't. The possible output voltages for a failed U2a would be +15V, 0v, -15v w.r.t. ground and the output voltage for U3b will be +15v w.r.t. ground. Since none of these possibilities would cause U4 to turn on, a failed U2a is ruled out.

If U3b has failed then its possible outputs would be +15v, 0v, -15v w.r.t. ground, whereas U2a output would be +15v w.r.t. ground. Two of the possible outputs for a failed U3b, namely 0v & -15v would cause U4 to turn on & light CR1.

Finally, in U4 we have two possible failure modes. First, the LED is busted. In this case the phototransistor will never turn on, which rules out the LED bust. Second, the phototransistor is busted. This leads to two possible outcomes (a) a permanent open circuit between the collector & emitter, and (b) a permanent short circuit between the same. Outcome (b) will result in CR1 lighting.

Hence, the two possible component failures which result in CR1 getting lit with TP1 at 0v w.r.t. ground, are U3b and the phototransistor in optocoupler U4. Whew (sadly there is no emoticon for tired / brain fatigue! I would've loved to put one in here:) ) !
 
3... R4 > 90M (comparator input bias current) :) :)
komp1.jpg
komp2.jpg
komp3.jpg
:)
Regards,
Csaba
 
Hi Zabb,
Your simulator gives an answer different from than the one I used (LTSpice). I wonder which is right and why the difference ?
 
Hi,
To get to the bottom of this, I have just completed a practical test of the relevant part of the circuit (ie R5, R6 & R7, U2a, U3b, R8 and R10. Instead of +-15 volts dual supply I used +-12v since that what I have to hand. Instead of an optocoupler LED, I used an ordinary 5mm red LED. I used +10v w.r.t. ground to feed the divider chain R5, R6, R7. The inverting inputs of both comparators were joined, and were unconnected to anything else.

I could not get the LED to light.

It would be helpful if someone else would try this practical test to confirm or deny this result.
 
Hi,

If the question is when does it turn on normally, then we have the following...

The LED turns on when the opto turns on.
The opto turns on when comparator pin 2 goes high and pin 1 goes low.
Pin 2 goes high when pin 4 goes lower than 7 volts.
Pin 1 goes low when pin 4 goes higher than 6 volts.
Statements 3 and 4 above taken together means that the opto and thus the LED turn on when the input at pin 4 is between 6 and 7 volts.
Pin 4 is between 6 and 7 volts when the input is between -7 and -6 volts, because the input amp is an inverter.
Thus, the LED lights when the input is between -7 volts and -6 volts.

To turn the LED on with 0v input however (a failure mode) could happen if:
1. The output of the opto was shorted (more likely).
2. The comparator was bad.
3. The op amp was bad.

Since #2 and #3 would require very specific kinds of failures, the most likely is the opto though.
 
The equivalent circuit of the tested comparator is also simulated using the LTspice/SwCAD IV simulator.
complt.jpg
Regards,
Csaba
 

Attachments

  • LM339.zip
    1.6 KB · Views: 217
Csaba,

If the voltage at TP1 is too negative, CR1 turns off as designed. The problem is that CR1 is ON when TP1 is at 0 Volts. Which component has failed?

The problem statement shows the LED as energized once the input is higher than negative 7 volts, the "lower" trigger (upper comparator) and remains energized when the input passes negative 6 volts, the "higher" trigger. Your solution only increased the window. It certainly satisfies the question, but, I took the question to be any voltage more positive than negative 6 volts as causing the LED to remain energized. Of course I could have read way too much into the question, but if I were testing the circuit, I would have done a DC sweep from the maximum negative to the maximum positive voltages that it would have received.

I haven't found much information of the probability of comparators failing in the two possible output states (saturation + and saturation -), I took the no output state as "floating" and not 0V, in fact, if you measured it, you probably would have measured something other than zero.

There was an old MIL-STD book that had probabilities of failures of different components, but, I didn't see Operational Amplifiers in there ... because the book was OLD, like me.

As far as the Ramura's problem of the circuit not working ... I'd like him to post his circuit.

As far as the simulation program differences, https://edn.com/electronics-blogs/anablog/4311485/Spice-simulation-Tina-TI-LTSpice-PSpice-and-more is a good read. The "Best" is whatever is "best" in your eyes. Free could be someone's metric for "BEST".
 
The problem statement ...
If the voltage at TP1 is too negative, CR1 turns off as designed. The problem is that CR1 is ON when TP1 is at 0 Volts. Which component has failed?

To turn the LED on with 0v input however (a failure mode) could happen if:
1. The output of the opto was shorted (more likely
2. The comparator was bad.
3. The op amp was bad.

All true if we do not consider the mere fact that the "too negative" voltage did not energize the LED. One specific failure in one of the comparators will satisfy the problem statement.

R4 changed value to greater than 90 Megaohms is easily dismissed by measuring the voltage sweep at the junction of the resistor and the two comparators. Resistors increasing to that value, from 5k, is unlikely.
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top