Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How do design a circuit that tells the difference of 2 Voltages is within range

henry kissinger

Newbie level 6
Joined
Nov 19, 2021
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
130
An analog circuit has 2 input and 1 output.

If the difference of these 2 voltages is smaller than 0.05V, then the output goes to 1V

If the voltage difference are greater than 0.05V, the output is 0V

How should I build this circuit with analog circuit components?

(the output is originally at 0V)
 

fgavin

Newbie level 5
Joined
May 23, 2022
Messages
9
Helped
0
Reputation
0
Reaction score
3
Trophy points
3
Activity points
84
As other have suggested, an opamp can do all those operations. One integrated circuit that has that function can be the old timer 555.
 

barry

Advanced Member level 5
Joined
Mar 31, 2005
Messages
5,681
Helped
1,152
Reputation
2,316
Reaction score
1,220
Trophy points
1,393
Location
California, USA
Activity points
30,955
Or just use low-offset-voltage comparators, no need for the amp.
As other have suggested, an opamp can do all those operations. One integrated circuit that has that function can be the old timer 555.
Don’t know how you’re going to do this with one opamp or a timer.
 

fgavin

Newbie level 5
Joined
May 23, 2022
Messages
9
Helped
0
Reputation
0
Reaction score
3
Trophy points
3
Activity points
84
@ Barry, 555 is effectively a window comparator - which window can be varied - within limits .....
I had the impression that I had access to the resistors on the 555 that set the voltage limits, but I guess not, only the control voltage pin is available.

I was told in school that the opamp can perform any mathematical function, be it a comparator, integrator, differentiator, sum, difference(-sum), amplifier.
So far we might only need the comparator and amplifier

We need a bit more info from henry:
henry, can you clarify if for input A and input B you want this condition, if abs(A-B) < 0.05V then output = 1V? and 0 otherwise?
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
21,990
Helped
4,591
Reputation
9,196
Reaction score
4,812
Trophy points
1,393
Activity points
145,178
Hi,

More detailed, more pedantic:

"The difference between two inputs" just means "A-B".
So mathematically the task is: if (A - B) < 0.05V
So if A = 3 and B = 4 ... the result is FALSE.
If you don't want this then you probably mean: if the absolute value of the difference is < 0.05 V
This mathematically means: if |A - B | < 0.05 V
Or in hardware: difference --> rectifier --> comparator
But this is equal to: if --0.05 < (A-B) < 0.05
Or... if (A - B) < 0.05 AND (A-B) > -0.05
This could be done with the above mentioned window comparator, by using thresholds of -0.05V and +0.05V

Things you additionally need to consider/ define:
* what supply voltage do you have? (Do you have limits/ targets for the supply current?
* how accurate do you want the threshold?
* hysteresis to avoid jittery output (chattering)
* timing...how long do you allow the output to get the expectated state? Nanoseconds, milliseconds?
* define the output levels more clear. 0V as well as 1V are absolute values that allow no tolerance. This never can be realized. --> Please define the valid range for each output level.

Lets say: (example)
* LOW: -0.1V .... +0.25V
* HIGH: 0.75V ... 1.25V

Klaus
 

crutschow

Advanced Member level 5
Joined
Feb 22, 2012
Messages
4,096
Helped
952
Reputation
1,902
Reaction score
986
Trophy points
1,393
Location
Colorado USA Zulu -7
Activity points
23,181
555 is effectively a window comparator
Not really.
A window comparator generates an output when the input voltage is within the window voltage (no latch).
The 555 can be configured as a level sensitive latch, whose output goes high with the input is below 1/3 the supply voltage and low when the input goes above 2/3 the supply voltage.
Not the same thing.
 

Easy peasy

Advanced Member level 5
Joined
Aug 15, 2015
Messages
3,821
Helped
1,250
Reputation
2,500
Reaction score
1,481
Trophy points
113
Location
Melbourne
Activity points
20,517
the 555 operates when the input goes outside the window, hence window comparator is a short description, also the limits can be modified away from 1/3 and 2/3 for an experienced designer.
 

crutschow

Advanced Member level 5
Joined
Feb 22, 2012
Messages
4,096
Helped
952
Reputation
1,902
Reaction score
986
Trophy points
1,393
Location
Colorado USA Zulu -7
Activity points
23,181
the 555 operates when the input goes outside the window,
Yes, but it does nothing when the input moves back inside the window, which a normal widow comparator does.
There is a difference between a level sensitive latch and a window comparator.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
50,032
Helped
14,496
Reputation
29,262
Reaction score
13,430
Trophy points
1,393
Location
Bochum, Germany
Activity points
287,139
I feel that the discussion is a kind of theoretical. You won't actually use LM555 as windows comparator for this
application, e.g. due to lack of voltage accuracy. I'd suggest LM393 for a first try.
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top