Basically, I'm struggling to design a circuit with the following requirements:
Requirement 1: Output is high (say 5v) when the two input voltages are different. [If it makes it any easier the output voltage only needs to be high when, say, input 2 is lower than input 1. That is the output is 5v when voltage 2 is less than voltage 1.]
Requirement 2: As soon as the 2 voltages are equal, the output shoots down to 0v (grounded/low). [Or as soon as voltage 2 is in a few microvolts or nanovolts below voltage 1, ie they are very close, then the output immediately shoots to 0v.
Requirement 3: Once the 2 input voltages are no longer equal the output goes back to high (5v). [As soon as voltage 2 is out of the microvolts or nanovolts range below voltage 1, ie voltage 2 is below voltage 1 (voltage 2 will never be higher than voltage 1, it can only match it) then the output immediately shoots up to 5v.
I've tried using a basic subtractor using opamps, but you see the 2 input voltages are sinusoidal. This means the difference between the 2 inputs can be very small, and the output as a result, slowly decreases to 0 rather than immediately 'trigger/shoot down' to 0. It would be useful if the output was a steady 5v and as soon as say the 2 inputs are within a very small range of each other (say a few microvolts or nanovolts) then the output immediately drops to 0. Once the two input voltages are no longer in that range, then the output shoots back to 5v.
Thank you! Any help is appreciated.