Continue to Site

# a problem about a comparator

Status
Not open for further replies.

#### gdhp

##### Advanced Member level 4
hi all

here i was given a dc signal voltage:0 or 1.5v or 3.3v. Based on the three

voltage, three control signals should be generated to trigger three switches.

So i think use two comparators. The trigger voltage of first comparator is 1.2.

if the out of it is high, another comparator with 2.4v trigger voltage is needed.

but the method is not good. is there another notive method?

Thank you all

Added after 4 hours 18 minutes:

help!!!

I guess you could do it with two comparators but you also need some logic gates as well to detect the three levels.

I tried to follow what you were doing with the 1.2V and 2.4V levels. Take a look at the attached file (maybe this is what you were trying to say). The input is connected to both of the comparators. So you have three cases

input < 1.2V out2=LOW, out1=LOW
1.2V < input < 2.4V out2=HIGH, out1=LOW
input > 2.4V out2=HIGH, out1=HIGH

so now all you have to do is to design an logic circuit (in the rectangle) to give you the three switch control signals. For example, to detect switching for the first case, you could take out1 and and out2 put each through a NOT gate and put those outputs into an AND gate. The resulting AND gate output will only be HIGH if and only if the first condition is satisfied. Does this work for you?

Think about this a little to see if this makes sense to you or not

Best regards,
v_c

Any other circuit configuration that could minimize the hardware area?

gdhp said:
hi all

here i was given a dc signal voltage:0 or 1.5v or 3.3v. Based on the three

voltage, three control signals should be generated to trigger three switches.

So i think use two comparators. The trigger voltage of first comparator is 1.2.

if the out of it is high, another comparator with 2.4v trigger voltage is needed.

but the method is not good. is there another notive method?

Thank you all

Added after 4 hours 18 minutes:

help!!!

You can have a look on 555 timer datasheet, where is a schematic showing how 555 timer to get the clock based on two comparators and two reference signal. I guess you can borrow this idea in your application.

Hope this help
Scottie

here's what i could come up with. i think the schematic can speak for itself. I used two LM311 (1/2 of a LM339 will also) do the trick. they are used as a window comparator (is that correct english?)

i also used a 74HC139 (dual 2 to 4 line decoder) to make the three signals (less than, in between and greater than)

i hop this will solve your problem

if you need just reduce hardware area and is not concerned with speed - just use 0.8 \$ attiny (has builtin adc). Less area with soic 8 pin package and no external components at all (may be reset circuitity). ))

Thank you all for your answer. But for two comparators, the area is too large. So i think is there a comparator with two output have a window trigger voltage??

Status
Not open for further replies.