Twitter   Patreon WIGGLING 'LITE' IN GUEST MODE

Author What are the fundamental comparator types?
raccoonboy
 I've just started reading a little about comparators today. I'm not really interested (yet) in different component types that essentially achieve the same outcome but maybe one is faster or more efficient. I'm thinking more what are the different things that can be compared in the voltage world that are useful for synthesis. From what I can see we have: A>B AB (with positive gate out) and A
Joe.
 Window comparators; When A>B AND A
raccoonboy
 Joe. wrote: Window comparators; When A>B AND A

Ah cool. Didn't think of this. I guess you can do other combinations like rising AND lower than.... i guess these are similar to NAND and NOR as they are from 'combining'.

Are there any more fundemental ones I've missed?
mt3
raccoonboy wrote:
 Joe. wrote: Window comparators; When A>B AND A

Ah cool. Didn't think of this. I guess you can do other combinations like rising AND lower than.... i guess these are similar to NAND and NOR as they are from 'combining'.

Are there any more fundemental ones I've missed?

Second order. Third order.
Quantify the amount of change between two sample points, then run that through a comparator.
raccoonboy
mt3 wrote:
raccoonboy wrote:
 Joe. wrote: Window comparators; When A>B AND A

Ah cool. Didn't think of this. I guess you can do other combinations like rising AND lower than.... i guess these are similar to NAND and NOR as they are from 'combining'.

Are there any more fundemental ones I've missed?

Second order. Third order.
Quantify the amount of change between two sample points, then run that through a comparator.

Not sure I completely understand. Is there a module that does this so I can check it out?
Synthiq
 raccoonboy wrote: I've just started reading a little about comparators today. I'm not really interested (yet) in different component types that essentially achieve the same outcome but maybe one is faster or more efficient. I'm thinking more what are the different things that can be compared in the voltage world that are useful for synthesis. From what I can see we have: A>B AB (with positive gate out) and A

In the analog domain, two signals are never exactly the same since they are continuous signals so A=B is always false and A≠B is always true. The best that can be done is to use a window comparator to test if the difference between them is larger or smaller than a set value.

So if A=B is always false we can also say that if A>B is true, A<B is always false and vice versa.

A flip-flop is a memory element, not a comparator. It is used to transfer the logic level at the input to the output on the active edge of the clock signal and then hold that value at the output until the next active edge of the clock. The active edge can either be the positive or negative edge depending on the design of the flip-flop. Some flip-flops also have set and reset inputs so the output can be forced high or low independent of the clock signal.
mt3
raccoonboy wrote:
mt3 wrote:
raccoonboy wrote:
 Joe. wrote: Window comparators; When A>B AND A

Ah cool. Didn't think of this. I guess you can do other combinations like rising AND lower than.... i guess these are similar to NAND and NOR as they are from 'combining'.

Are there any more fundemental ones I've missed?

Second order. Third order.
Quantify the amount of change between two sample points, then run that through a comparator.

Not sure I completely understand. Is there a module that does this so I can check it out?

Just extending the utility of such a tool. I was referring to differentiators (and integrators), but unsure if they actually employ comparators in their circuitry.
Synnic
 Synthiq wrote: In the analog domain, two signals are never exactly the same since they are continuous signals so A=B is always false and A≠B is always true. The best that can be done is to use a window comparator to test if the difference between them is larger or smaller than a set value.

I think I see what you are getting at but this seems a rather inaccurate way to put it. It's easy enough to line up two oscillator signals using a scope and have A=B true for some period of time until drift separates them. There are also specific cases for which an A=B comparator without windowing can and does produce a useful result. Remember that the analog domain does include DC and square waves.

Arguments against the general usefulness of an A=B, or A≠B comparator that is not windowed do make sense, i.e. the points of correspondence between differing sine waves are too short to provide a useful output, etc.
raccoonboy wrote:
mt3 wrote:
raccoonboy wrote:
 Joe. wrote: Window comparators; When A>B AND A

Ah cool. Didn't think of this. I guess you can do other combinations like rising AND lower than.... i guess these are similar to NAND and NOR as they are from 'combining'.

Are there any more fundemental ones I've missed?

Second order. Third order.
Quantify the amount of change between two sample points, then run that through a comparator.

Almost. Check out the Ladik J-110.
Not sure I completely understand. Is there a module that does this so I can check it out?
raccoonboy
 I have been looking at the Ladik which is why I came up with the is equal to and is not equal too but I guess you need to use the gap function (hysteresis) to make this useful. Is this what we mean by a window?
raccoonboy
 Synthiq wrote: A flip-flop is a memory element, not a comparator.

I see. I have seen it referred to as a 1 bit memory but thought it was a comp. Cool. I still assume you can get a similar result with comparators if you use the method in my original post... ?
Synthiq
raccoonboy wrote:
 Synthiq wrote: A flip-flop is a memory element, not a comparator.

I see. I have seen it referred to as a 1 bit memory but thought it was a comp. Cool. I still assume you can get a similar result with comparators if you use the method in my original post... ?

No, you can't use a comparator as a flip-flop. A comparator output only depends on the current input voltages and has no memory. Think of a flip-flop as a digital sample & hold where the output is only updated on the edge of the clock signal.
Synnic
 A flip-flop can be composed of simple combinatorial logic in specific configurations. The simplest form uses either two NAND or two NOR gates. See Sequential Logic Circuits for a decent explanation.
mt3
 Synnic wrote: A flip-flop can be composed of simple combinatorial logic in specific configurations. The simplest form uses either two NAND or two NOR gates. See Sequential Logic Circuits for a decent explanation.

For those curious about hardware implementations, apparently all logic circuits can be implemented solely with NAND gates.
Synthiq
Synnic wrote:
 Synthiq wrote: In the analog domain, two signals are never exactly the same since they are continuous signals so A=B is always false and A≠B is always true. The best that can be done is to use a window comparator to test if the difference between them is larger or smaller than a set value.

I think I see what you are getting at but this seems a rather inaccurate way to put it. It's easy enough to line up two oscillator signals using a scope and have A=B true for some period of time until drift separates them. There are also specific cases for which an A=B comparator without windowing can and does produce a useful result. Remember that the analog domain does include DC and square waves.

Two traces on your scope aligned perfectly on your scope is no proof that they are identical neither in a mathematical sense nor even engineering sense, just that the difference between them is smaller than the resolution of your scope or your vision. And it would also require that the ground level of both traces are perfectly aligned on the display and that the gain are absolutely identical for both traces.
sizone
 mt3 wrote: Good link. For those curious about hardware implementations, apparently all logic circuits can be implemented solely with NAND gates.

or NOR
jorg
 Synnic wrote: It's easy enough to line up two oscillator signals using a scope and have A=B true

Not really; at some resolution they are still different.

True, if you compare moving signals, and they cross over each other, there is an instant of equality, but a real-world comparator will report the crossover at some other instant, due to propagation delay, and offset voltage in the comparator itself. Equality is just not realistically a practical test.

On another note, no, differentiators and integrators don't use comparators.

A comparator with hysteresis does have a window of sorts, and it does have a memory of sorts, but it is neither a window comparator nor a flip-flop.
AndreasD
 raccoonboy wrote: I've just started reading a little about comparators today. I'm not really interested (yet) in different component types that essentially achieve the same outcome but maybe one is faster or more efficient. I'm thinking more what are the different things that can be compared in the voltage world that are useful for synthesis. From what I can see we have: A>B AB (with positive gate out) and A

You might take a look at the Befaco Rampage schematics (https://www.befaco.org/en/rampage/)

A lot of yhe above is implemented there.
pugix
 raccoonboy wrote: Is Rising Is Falling Is moving Is Static

These comparisons are between values of the same signal at different points in time. A good example is Ken Stone's Slope Detector. (Has anyone else but Ken designed a slope detector? It's not a common module, but very useful.)

Note that Is Moving and Is Static are logical inverses. Ken's S.D. has a Static output, because a signal is either rising, falling, or static. Moving can be derived by negation from Static.
Fabong
pugix wrote:
 raccoonboy wrote: Is Rising Is Falling Is moving Is Static

These comparisons are between values of the same signal at different points in time. A good example is Ken Stone's Slope Detector. (Has anyone else but Ken designed a slope detector? It's not a common module, but very useful.)

Note that Is Moving and Is Static are logical inverses. Ken's S.D. has a Static output, because a signal is either rising, falling, or static. Moving can be derived by negation from Static.

I have the Ladik Derivator which detects these conditions and is very good at it too. It has adjustable sensitivity which is essential for such a module and indeed includes both static and moving conditions as well as rising and falling.
 Page 1 of 1