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.

how to compare two input voltages and produce an output only if they are equal?

Status
Not open for further replies.

EfeVural

New Member
Iam new in the forum. So hello everyone ! Also if this is not the place to send this message please forgive me..

I am new in electronics. And I want to learn if it is possible to compare two voltages and if they are equal then produce an output if not equal do not produce an output. Comparator produces output in terms of which input voltage is higher and than produce the result depending on that. But what i want to do is if they are equal then get an output voltage. Is this possible and if so how? Iam only allowed to use opamps resistors diodes capacitors etc.. basic elements... Thanks in advance :)
 
Iam new in the forum. So hello everyone ! Also if this is not the place to send this message please forgive me..

I am new in electronics. And I want to learn if it is possible to compare two voltages and if they are equal then produce an output if not equal do not produce an output. Comparator produces output in terms of which input voltage is higher and than produce the result depending on that. But what i want to do is if they are equal then get an output voltage. Is this possible and if so how? Iam only allowed to use opamps resistors diodes capacitors etc.. basic elements... Thanks in advance :)

hi,
Look up 'Window comparators'
 
Any window comparator will have a window size. Since all measurements have some uncertainty and error "equal" means equal within some tolerance value. This could likely be within a few millivolts or better using precision op amps and accurate resistors.
 
how about using a subtractor ciruit with the other leg of op-amp grounded.

You can subtract the two voltages, say A and B, and then set up a window-comparator that determines if the difference D = A-B is >-Δ AND <Δ, where the window width is 2*Δ.


It still takes two comparators!
 
Last edited:
I'm not entirely sure about this one, but it's an idea:
When two halves of a 393 comparator chip are wired together with the inputs swapped, it has two separate outputs. When one input is higher than the other, one of the outputs goes high and the other goes low. If the opposite input is higher, the opposite output goes high and the other low (sorry if this is really confusing--read through it a couple of times and you'll probably get it ;) ). However, the chip can not read exactly which input is higher--it must differ by a certain voltage. Therefore, there is one point where both outputs are high (when inputs are extremely close to being equal). If you connect both outputs of the 393 to some sort of AND gate, the output of the circuit will only be high when both inputs to the comparator are very close to equal.

On_with_equal_inputs.png

This is all in theory, of course, so if anyone could please let me know if something about this is wrong, it would be a great help ;)
Good luck!
Der Strom
 
Last edited:
Strom, I wouldn't rely on the intrinsic offset of a comparator to define the width of the window, which is what you're advocating.
 
Last edited:
Strom, I wouldn't rely on the intrinsic offset of a comparator to define the width of the window, which is what you're advocating.

Thanks, Mike. I understand what you mean. I'm sure there are better ways, but depending on the OPs project, it might still work. As I said, it was just an idea, and if EfeVural feels there is a better idea presented, by all means use it :) I am not saying mine is the best idea, but it certainly is the simplest yet ;)
Der Strom
 
Iam new in the forum. So hello everyone ! Also if this is not the place to send this message please forgive me..

I am new in electronics. And I want to learn if it is possible to compare two voltages and if they are equal then produce an output if not equal do not produce an output. Comparator produces output in terms of which input voltage is higher and than produce the result depending on that. But what i want to do is if they are equal then get an output voltage. Is this possible and if so how? Iam only allowed to use opamps resistors diodes capacitors etc.. basic elements... Thanks in advance :)

If I were to do it I likely would not look at first glance at a comparator, I would think about a null detector circuit similar to those that drove a galvo when galvos were popular. I would look at the analog output of an op amp configured as a null detector. When zero is zero you can assume the two inputs are the same value. Then worry about what you want to do with the output. Much like a differential voltmeter configuration. When both inputs are the same, the meter reads zero.

Ron
 
Hi again :)

Thanks for all of your answers. I found a way. I am not sure if i used i window comparator but i think at least it is something like that.

Here is how i did it: I am putting the input voltage between a window comparatar. Let say if my imput voltage is 12, then high ref=12.5 low ref=11.5. Then i put the output voltages of my window comparators to a summing amplifier. Then the output voltage gives +2VCC if input is between referance voltages. If it exceeds referances beyond either low or high; then output gives 1VCC. Then i put this voltage as an input voltage to a comparater using a referance voltafe between 1VCC and 2VCC. If it is 2VCC so bigger than ref voltage it gives an output..
 

Attachments

  • 7segment.png
    7segment.png
    24.9 KB · Views: 392
Yeah that is a lot of work to do :D if i think i am going to implement this in labarotory. By the way my project is infrared range sensing and i use tk19 as a sensor. It gives 5V or 0V at its output. I will use 9 tk19s. It will produce output according to how distant the object is( measurement will be be physically by angels). Let say if it is in a low range 2 of the tk19s will give output, if it is in a big range then 7 of the tk19s will give output. Then i sum up these voltages with sumamp. Then get the output to the the circuit i asked in the forum. Then i will take the output of this circuit two 7 segment display. Let say if 6 voltage was summed up from the tk19 the 7 segment will flash 6 since i made the right connections in advance. I plan to implement all of these to practice :D:D
 
Status
Not open for further replies.

Latest threads

Back
Top