Spread the love

Switching when a Variable voltage matches a Fixed voltage within a set range.

Have you ever needed to trigger an event when a Control Voltage is within a narrow range of values? There is a stock comparator, but on its own this will only give you a true or false if the voltage is above or below a set value.
This prefab will tell you within a very narrow range when the Variable input is equal to your Reference input and output a “True” value. (I have tested this to a +/- 1mV range either side of the Reference).
This prefab uses no 3rd party modules.

How the Voltage Detector works.

Comparator A sends a True value when the Variable is within the range -0 to -0.001 V of the Reference voltage.
Comparator B sends a true value when the Variable is within the range +0 to +0.001V of the Reference voltage.
These two voltages can be set to give the detecter a wider or narrower range.
With these values Comparator A and Comparator B will both output a “True” value when the Variable is within + or – 1mV of the Reference. The AND Gate will only output a value of “True” when both inputs are “True”. The Buffer Amps are just Level Adj modules with a 1:1 gain to prevent the two comparator References interacting.