I am conditioning the input of a slowly drifting analog input sensor.
The sensor is a phototransistor that will sink a small amount of current when "dark" and 50x more current when "bright," but the ambient brightness will vary, so a pre-set "trigger threshold" is not good enough.
Based on this I have an incoming voltage with source impedance < 10 kOhm. I want to detect when the voltage falls "quickly" to less than half what it was before, within reasonable range for "previous" value (say, 1-2.5 Volts with 3.3V supply.) Let's say that a typical value of "quickly" is "10 millisecond fall time."
Would an opamp with a RC filter on the negative input, and a moderate feedback resistor to avoid overdriving it, plus a Schmidt trigger for conditioning the output, work alright? See the schematic in the picture.
(Note that the calculated corner frequency for the filter assumes a 0 Ohm source impedance, and the corner frequency will go down if source impedance is higher, which would be fine by me!)