Is there a way to build a two-way differential circuit i.e. a circuit that compares a varying voltage to a reference, and if that voltage is rising, it gives a certain value (say 1), while if its decreasing, it gives 0. I was thinking of using a quad comparator but is there a simpler solution? TIA
How about: Take a capacitor, connector one side to your signal (assumed to be low impedance), the other side to a small resistor. Size the resistor and capacitor such that the reactance is much greater than the resistance (in general, this means a rather small R). The idea is that the circuit looks like just a capacitor to the input, so I is still very near equal to C*dv/dt, but you generate an output voltage across the resistor (Vres=C*dv/dt*R) which is the derivative of the input signal. The sign of that voltage tells you is the voltage is rising our falling -- use a single comparator to "square it up" if you need to.
You'll probably also need a bit of filtering/hysteresis in the system so that noise doesn't cause the output to oscillate wildly when the input signal is stationary.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.