MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

What are the fundamental comparator types?
MUFF WIGGLER Forum Index -> Modular Synth General Discussion  
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
A<B
A≠B
A=B

Flipflop
Is this essentially the same result as A>B (with positive gate out) and A<B (with negative gate out) summed together with A being the input voltage and B being 0 volts? I'm sure an actual flipflop is better though but curious if the result is the same, I believe this is what a flipflop does i.e. positive voltage makes a rising edge of a gate and negative makes a falling edge. At least this is what my educated guess tells me.

Is Rising
Is Falling
Is moving
Is Static


Binary comparisons i.e. logic gates (of which I already know the different types as its easier to find). I also recently acquired a Spock. What a great module. Every type of logic x2 in 4hp. Beautiful.

Anything else?
Joe.
Window comparators; When A>B AND A<C at the same time.

So a pair of comparators, with outputs going to logic.
raccoonboy
Joe. wrote:
Window comparators; When A>B AND A<C at the same time.

So a pair of comparators, with outputs going to logic.


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<C at the same time.

So a pair of comparators, with outputs going to logic.


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.
w00t
raccoonboy
mt3 wrote:
raccoonboy wrote:
Joe. wrote:
Window comparators; When A>B AND A<C at the same time.

So a pair of comparators, with outputs going to logic.


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.
w00t


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
A<B
A≠B
A=B

Flipflop
Is this essentially the same result as A>B (with positive gate out) and A<B (with negative gate out) summed together with A being the input voltage and B being 0 volts? I'm sure an actual flipflop is better though but curious if the result is the same, I believe this is what a flipflop does i.e. positive voltage makes a rising edge of a gate and negative makes a falling edge. At least this is what my educated guess tells me.

Is Rising
Is Falling
Is moving
Is Static



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<C at the same time.

So a pair of comparators, with outputs going to logic.


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.
w00t


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.
screaming goo yo
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.
electricanada
raccoonboy wrote:
mt3 wrote:
raccoonboy wrote:
Joe. wrote:
Window comparators; When A>B AND A<C at the same time.

So a pair of comparators, with outputs going to logic.


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.
w00t


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.


Good link.
For those curious about hardware implementations, apparently all logic circuits can be implemented solely with NAND gates.
w00t
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.
w00t


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
A<B
A≠B
A=B

Flipflop
Is this essentially the same result as A>B (with positive gate out) and A<B (with negative gate out) summed together with A being the input voltage and B being 0 volts? I'm sure an actual flipflop is better though but curious if the result is the same, I believe this is what a flipflop does i.e. positive voltage makes a rising edge of a gate and negative makes a falling edge. At least this is what my educated guess tells me.

Is Rising
Is Falling
Is moving
Is Static


Binary comparisons i.e. logic gates (of which I already know the different types as its easier to find). I also recently acquired a Spock. What a great module. Every type of logic x2 in 4hp. Beautiful.

Anything else?



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.
MUFF WIGGLER Forum Index -> Modular Synth General Discussion  
Page 1 of 1
Powered by phpBB © phpBB Group